EcoWatch in Home Assistant: price, zone and brightness over MQTT

EcoWatch already knows two things your smart home wants: the current electricity price for your area, and whether this quarter hour counts as cheap, medium or expensive. Since firmware 3.3.6 the clock publishes both over MQTT and announces itself to Home Assistant, so there is nothing to configure on the Home Assistant side beyond a broker.

What you get

Home Assistant shows one device, "EcoWatch-Julia-xxxx" (or Ida or Johanna), with four entities:

  • Electricity cost: a monetary sensor with the current price in your currency per kWh.
  • Cost zone: an enum sensor with the value low, medium or high, the same decision the colour ring shows.
  • Electricity area: a select entity; change SE3 to SE4 from Home Assistant and the clock follows.
  • Brightness: a light entity for the LED ring, 0 to 100 percent, so the clock can dim with the rest of the house at night.

EcoWatch Julia as a device in Home Assistant: brightness and area controls, cost zone and electricity cost sensors, zone history

What you need

  • An MQTT broker. Most Home Assistant installs use the Mosquitto add-on; the MQTT integration must be set up.
  • EcoWatch on firmware 3.3.6 or later (check on the clock's Update page; updates are automatic by default).

Step 1: tell the clock about your broker

Open http://ecowatch.local, choose API settings, enable MQTT, and enter the broker's address, port (1883 by default), and username and password if your broker requires them. Save. The clock connects and publishes its discovery message.

EcoWatch API settings page with the Enable MQTT checkbox

Step 2: look in Home Assistant

Settings, Devices & services, MQTT. The EcoWatch device appears within a minute with the four entities above. That is the whole setup.

Ideas for automations

  • Turn the ventilation to boost, or start the heat pump's hot-water program, when Cost zone changes to low.
  • Send a notification at 13:15 with tomorrow's cheapest hours (the full price table is also available, see below).
  • Dim the clock to 20 percent at 22:00 and back at 06:00, together with the other lights.
  • Use Cost zone as a condition on your EV charger or dishwasher automations so they wait for a green hour.

For people who want more than the four entities

EcoWatch publishes on plain MQTT topics too, independent of Home Assistant:

  • ecowatch/zone every quarter hour: the current zone and price as JSON.
  • ecowatch/recieve/full: the complete price table for today and tomorrow, sent when you publish anything to ecowatch/send/full.
  • ecowatch/update: publish to force the clock to fetch new prices.
  • ecowatch/<id>/set/pixels and ecowatch/<id>/set/hours: drive individual LEDs or hours yourself, which turns the clock into a general-purpose status ring for whatever you like.

The full topic list and payloads are in the API documentation.

Note on the Shelly rules

If all you want is to switch a plug by price, you do not need Home Assistant at all; the clock does that itself, see Switch Shelly plugs by electricity price. Home Assistant is for when the price should influence things EcoWatch cannot reach, or when you want logging and dashboards.

Back to blog

Leave a comment