Water heater target temperature

The Water heater target temperature condition passes when a water heater entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more]’s target temperature setting meets a threshold you define. The target temperature is the setpoint you want the water heater to maintain, not the current measured water temperature. Use it when you want an automation to run only if the setpoint is already above, below, inside, or outside a range.

When you target more than one water heater, the condition’s Condition passes if option controls how the check combines results. You can require any targeted water heater to meet the threshold, or demand that all of them do.

Using this condition from the user interface

If you prefer building automations visually, Home Assistant walks you through this condition step by step. You pick what to check, tweak a few options, and save. No YAML knowledge required.

To use Water heater target temperature in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the And if section, select Add condition.
  4. Select what you want to check. Under By target (see Targets), pick the area your water heater is in, or select a device, a specific entity, a floor, or a label.
  5. From the conditions shown for that target, select Water heater target temperature.
  6. Under Threshold type, choose which setpoints should pass the condition:
    • Select Above or Below to compare the setpoint with one threshold.
    • Select In range or Outside range to compare the setpoint with a lower and upper threshold.
    • You can use a fixed number or select a temperature sensor, a temperature number entity, or a number helper as the threshold.
  7. Under Unit, select the temperature unit to use for the comparison when you enter a number.
  8. Under Condition passes if (see Behavior), pick Any or All.
  9. Under For at least, enter how long the setpoint must stay at the threshold before the condition passes.
  10. Select Save.

Options in the UI

Threshold type

The target temperature setpoint has to meet this threshold for the condition to pass. Above and Below are exclusive: a setpoint equal to the threshold does not pass. In range includes both bounds: a setpoint equal to either bound passes. Outside range excludes both bounds: a setpoint equal to either bound does not pass. Default is Above.

You can use a fixed number or select a temperature sensor, a temperature number entity, or a number helper as the threshold.

Unit

The temperature unit to use for threshold comparison. Accepts °C, °F, or K. Required when using numerical thresholds (not required when using entity references).

Condition passes if

When multiple water heaters are targeted, controls how results combine. Pick Any to pass if at least one targeted water heater meets the threshold, or All to pass only when every targeted water heater does. Default is Any.

For at least

How long the setpoint must have continuously met the threshold before the condition passes. Default is 0 (passes immediately).

Using this condition in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required. For how an automation is built in YAML, refer to Automations in YAML.

In YAML, put the settings that are specific to this condition under options. Keep target, if the condition uses one, and general settings such as alias and enabled at the top level, next to condition.

In YAML, Water heater target temperature is referred to as water_heater.is_target_temperature. A basic example looks like this:

ConditionConditions check whether something is true at that moment, for example, whether a door is closed. You can use them in automations and scripts. If a condition is not met, the actions that come after it in the same sequence do not run. At the top level of an automation or script, this stops the automation or script. [Learn more]
condition: water_heater.is_target_temperature
target:
  entity_id: water_heater.utility_room
options:
  threshold:
    type: above
    value:
      number: 55
      unit_of_measurement: "°C"

This passes when the target temperature of water_heater.utility_room is above 55°C.

To check whether the setpoint stays inside a preferred range:

ConditionConditions check whether something is true at that moment, for example, whether a door is closed. You can use them in automations and scripts. If a condition is not met, the actions that come after it in the same sequence do not run. At the top level of an automation or script, this stops the automation or script. [Learn more]
condition: water_heater.is_target_temperature
target:
  entity_id: water_heater.utility_room
options:
  threshold:
    type: between
    value_min:
      entity: input_number.water_heater_min_target
    value_max:
      entity: input_number.water_heater_max_target

Options in YAML

threshold map Required

The target temperature setpoint has to meet this threshold for the condition to pass:

  • type: above (exclusive): Sets a minimum. The setpoint must be strictly above the threshold to pass.
  • type: below (exclusive): Sets a maximum. The setpoint must be strictly below the threshold to pass.
  • type: between (inclusive): Defines a range. The setpoint must be between the two bounds, or equal to one of them, to pass.
  • type: outside (exclusive): Defines an outside-range. The setpoint must be beyond either bound to pass.

For type: above and type: below, use value with either number and unit_of_measurement, or entity. For type: between and type: outside, use value_min and value_max, each with either number and unit_of_measurement, or entity.

When using an entity, its current reading is used as the threshold at the moment the condition is evaluated. Home Assistant converts the value from the entity’s unit. If the entity has no unit, or a unit that Home Assistant can’t convert, the condition doesn’t pass.

behavior string (Optional, default: any)

When multiple water heaters are targeted, controls how results combine. Accepts all or any.

for string | integer | map (Optional, default: 00:00:00)

How long the setpoint must have continuously met the threshold before the condition passes. Accepts a duration string in HH:MM:SS format. For example, 00:10:00 waits 10 minutes. For a list of all accepted formats, refer to Durations in automations and scripts.

Targets of the condition

This condition requires a target. The target is the object that Home Assistant will check. You can point the condition at a single entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], a device, an area, a floor, or a label, and Home Assistant will evaluate every matching water_heater entity behind that target.

  • Entity: one specific water_heater entity, such as water_heater.living_room.
  • Device: every water_heater entity that belongs to a device.
  • Area: every water_heater entity in a room or area.
  • Floor: every water_heater entity on a floor.
  • Label: every water_heater entity that shares a label.

You can also select different target types in one condition. For example, you can add a specific entity and an area as targets in the same condition to check both of them at once.

To learn which entities Home Assistant includes for a device, area, floor, or label, and how it handles several entities, refer to Automation targets.

Behavior with multiple targets

When you target more than one entity (or select an area, floor, or label that contains several), the Condition passes if option controls how the results combine:

  • Any (default): the condition passes if at least one of the targeted entities matches. For example, if you check three smoke sensors and only one of them detects smoke, the condition still passes. This is useful for questions like “is there smoke anywhere in the house?”
  • All: the condition passes only when every targeted entity matches. For example, if you check the same three smoke sensors, the condition passes only once all three report cleared. This is useful for “is the entire house safe now?” checks, so your automation does not send an all-clear while one room still has a reading.

Good to know

  • The target water heater entity must expose a target temperature attribute.
  • Threshold entities must provide temperature values. Supported threshold sources are temperature sensors, temperature number entities, and input number helpers.
  • This condition checks the target temperature setpoint, not the current measured water temperature.
  • Water heaters that are unavailable or unknown are skipped. With Any, the condition passes if at least one of the other targeted water heaters matches. With All, it passes if all the other targeted water heaters match. If all targeted water heaters are unavailable or unknown, All passes and Any fails.
  • To check the current measured temperature instead of the setpoint, use Temperature value.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, open an automation, and add this condition. Trigger the automation with and without the condition met, and watch whether it continues or stops.

More examples

Real scenarios where this condition gates an automation. Copy any example and adapt it to your setup. In the visual editor, select the UI options listed in the example or paste the YAML code.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: enable away mode only when the target temperature is already low

When you leave home, enable away mode only if the water heater target temperature is already below your normal daytime setting.

  • Trigger: State changed: Person changes to not_home
  • Condition: Water heater target temperature
    • Target: Utility room water heater
    • Threshold type: Below (50°C)
  • Action: Set water heater away mode
YAML example for enabling away mode from a lower setpoint
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Enable away mode when the setpoint is already low"
triggers:
  - trigger: state
    entity_id: person.alex
    to: "not_home"
conditions:
  - condition: water_heater.is_target_temperature
    target:
      entity_id: water_heater.utility_room
    options:
      threshold:
        type: below
        value:
          number: 50
          unit_of_measurement: "°C"
actions:
  - action: water_heater.set_away_mode
    target:
      entity_id: water_heater.utility_room
    data:
      away_mode: true

Automation: notify when the target temperature stays outside the preferred range

Every hour, check whether the target temperature has stayed outside the preferred range for 10 minutes. If it has, send a notification.

  • Trigger: Time pattern: Every hour
  • Condition: Water heater target temperature
    • Target: Utility room water heater
    • Threshold type: Outside range (50-55°C)
    • For at least: 00:10:00
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
YAML example for a target temperature reminder
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Check whether the target temperature stays outside range"
triggers:
  - trigger: time_pattern
    hours: "/1"
conditions:
  - condition: water_heater.is_target_temperature
    target:
      entity_id: water_heater.utility_room
    options:
      threshold:
        type: outside
        value_min:
          number: 50
          unit_of_measurement: "°C"
        value_max:
          number: 55
          unit_of_measurement: "°C"
      for: "00:10:00"
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      message: "The water heater target temperature has stayed outside 50-55°C for 10 minutes."

Still stuck?

To find out why the condition didn’t pass, check it live in the automation editor, and look at the trace of the run. For details, refer to Testing automations. For common problems and their solutions, refer to Troubleshooting automations.

If that doesn’t help, the Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the condition you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain conditions or suggest the right one when you describe what you want in plain language.

Related conditions

Explore related conditions: