For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /developers/core/entity/water-heater.md.

Water heater 实体

homeassistant.components.water_heater.WaterHeaterEntity 派生实体平台。

属性

Tip

属性应始终仅返回内存中的信息,而不是执行 I/O(如网络请求)。实现 update()async_update() 来获取数据。

名称类型默认值描述
min_tempfloat110°F可以设置的最低温度。
max_tempfloat140°F可以设置的最高温度。
current_temperaturefloatNone当前温度。
target_temperaturefloatNone我们试图达到的温度。
target_temperature_highfloatNone我们试图达到的温度的上界。
target_temperature_lowfloatNone我们试图达到的温度的下界。
target_temperature_stepfloatNone目标温度可增加或减少的步长。
temperature_unitstrNotImplementedErrorUnitOfTemperature.CELSIUSUnitOfTemperature.FAHRENHEITUnitOfTemperature.KELVIN 之一。
current_operationstringNone当前的 operation mode。
operation_listList[str]None可能的 operation mode 列表。
supported_featuresWaterHeaterEntityFeatureWaterHeaterEntityFeature(0)(无功能)支持的功能列表。
is_away_mode_onboolNoneaway mode 的当前状态。

允许的 operation mode 是基础组件中指定的状态,water_heater 组件的实现不能有所不同。

属性必须遵循 temperature_unit 中定义的单位。

状态

状态描述
STATE_ECO节能模式,提供节能和快速加热。
STATE_ELECTRIC仅电动模式,能耗最高。
STATE_PERFORMANCE高性能模式。
STATE_HIGH_DEMAND当热水器功率不足时满足高需求。
STATE_HEAT_PUMP加热最慢,但能耗较少。
STATE_GAS仅燃气模式,能耗最高。
STATE_OFF热水器已关闭。

支持的功能

支持的功能通过使用 WaterHeaterEntityFeature 枚举中的值来定义,并使用按位或(|)运算符进行组合。

描述
TARGET_TEMPERATURE可以设置温度
OPERATION_MODE可以设置 operation mode
AWAY_MODE可以设置 away mode
ON_OFF可以开启或关闭

方法

set_temperatureasync_set_temperature

设置热水器应将水加热到的温度。

set_operation_modeasync_set_operation_mode

设置热水器的 operation mode。必须在 operation_list 中。

turn_away_mode_onasync_turn_away_mode_on

将热水器设置为 away mode。

turn_away_mode_offasync_turn_away_mode_off

将热水器恢复到上一个 operation mode。关闭 away mode。

turn_onasync_turn_on

开启热水器。

turn_offasync_turn_off

关闭热水器。