#14983·esphome

water_heater not reporting on/off state to HA

Author: davidcCreated Mar 19, 2026Updated Sep 18, 2026

The problem

Further to #14605 (thank you for fixing!)

There may be a remaining issue in that a water_heater doesn't seem to actually report the on/off state to Home Assistant if it supports on/off but doesn't support operation_mode.

By adding debug to is_on, I can see that the state is correctly being returned from that lambda (which it's calling a lot!), but Home Assistant always shows the water_heater entity as off:

Image

(Apologies for the confusion in that my on/off switch is also named "operation mode" because that's what the kettle refers to it as).

switch:
  - id: operation_mode
    name: "Operation Mode"
    platform: tuya
    switch_datapoint: 1

water_heater:
  - id: kettle
    name: None # "Kettle"
    platform: template
    optimistic: true
    current_temperature: !lambda 'return id(current_temperature).state;'
    target_temperature: !lambda 'return id(setpoint_temperature).state;'
    is_on: !lambda 'ESP_LOGI("boiler", "IS_ON RETURNS: %s", YESNO(id(operation_mode).state)); return id(operation_mode).state;'
    icon: mdi:kettle
    visual:
      min_temperature: 40
      max_temperature: 100
      target_temperature_step: 5
    set_action:
      - lambda: |-
          ESP_LOGI("boiler", "New mode: %d", id(kettle).get_mode());
          ESP_LOGI("boiler", "New target temperature: %.1f", id(kettle).get_target_temperature());
          ESP_LOGI("boiler", "On: %s, Away: %s", YESNO(id(kettle).is_on()), YESNO(id(kettle).is_away()));
          auto call = id(setpoint_temperature).make_call();
          call.set_value(id(kettle).get_target_temperature());
          call.perform();
          id(operation_mode).control(id(kettle).is_on());
[08:59:01.804][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.804][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.815][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.836][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.836][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.841][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.862][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.862][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.866][I][boiler:167]: IS_ON RETURNS: NO
[08:59:01.871][D][switch:022]: 'Operation Mode' Turning ON.
[08:59:01.871][D][tuya:672]: Setting datapoint 1 to 1
[08:59:01.881][D][switch:065]: 'Operation Mode' >> ON
[08:59:01.883][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.883][D][water_heater:158]: 'WeeKett Replacement' >>
[08:59:01.883][D][water_heater:158]:   Mode: OFF
[08:59:01.887][D][water_heater:163]:   Current Temperature: 48.00°C
[08:59:01.891][D][water_heater:169]:   Target Temperature: 85.00°C
[08:59:01.891][D][water_heater:175]:   On: YES
[08:59:01.896][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.914][D][tuya:380]: Datapoint 1 update to ON
[08:59:01.914][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.919][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.939][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.939][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.954][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.977][I][boiler:167]: IS_ON RETURNS: YES
[08:59:01.977][I][boiler:167]: IS_ON RETURNS: YES

Which version of ESPHome has the issue?

2026.3.0

What type of installation are you using?

Docker

What platform are you using?

ESP32

Component causing the issue

template/water_heater

YAML Config

yaml

Anything in the logs that might be useful for us?

txt

Additional information

No response