热水器实体
平台实体派生自homeassistant.components.water_heater.WaterHeaterEntity
特性
Tip
属性应该始终只从内存返回信息,而不执行 I/O(如网络请求)。实现 update() 或 async_update() 来获取数据。
允许的操作模式是基本组件中指定的状态,并且 water_heater 组件的实现不能不同。
属性必须遵循 temperature_unit 中定义的单位。
状态
支持的功能
支持的功能通过使用 WaterHeaterEntityFeature 枚举中的值来定义
和 使用按位或 (|) 运算符进行组合。
方法
set_temperature 或 async_set_temperature
设置热水器应将水加热到的温度。
set_operation_mode 或 async_set_operation_mode
设置热水器的运行模式。必须在操作列表中。
turn_away_mode_on 或 async_turn_away_mode_on
将热水器设置为离开模式。
turn_away_mode_off 或 async_turn_away_mode_off
将热水器设置回之前的运行模式。关闭离开模式。
turn_on 或 async_turn_on
打开热水器。
turn_off 或 async_turn_off
关闭热水器。

