Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
esphome::home_io_control::IOHomeDhwBoostSwitch Class Reference

Switch that starts and ends the heater's boost. More...

#include <platform_water_heater.h>

Inheritance diagram for esphome::home_io_control::IOHomeDhwBoostSwitch:
Collaboration diagram for esphome::home_io_control::IOHomeDhwBoostSwitch:

Public Member Functions

void setup () override
 Subscribe to the device's updates and publish what is already known.
void dump_config () override
 Dump switch configuration to the log.
float get_setup_priority () const override
 Get setup priority so the parent hub is available first.
Public Member Functions inherited from esphome::home_io_control::DeviceBoundCompanion
void set_parent (IOHomeControlComponent *parent)
 Set the parent controller component.
void set_device_id (const std::string &id)
 Set the device ID whose state this companion sensor exposes.

Protected Member Functions

void write_state (bool state) override
 Start or end the boost; the read-back publishes the state.
Protected Member Functions inherited from esphome::home_io_control::DeviceBoundCompanion
void register_companion_binding_ (const std::function< void(const IoDevice &)> &publish)
 Shared setup() body: subscribe to this device's updates and publish the initial state.

Additional Inherited Members

Protected Attributes inherited from esphome::home_io_control::DeviceBoundCompanion
IOHomeControlComponent * parent_ {nullptr}
std::string device_id_

Detailed Description

Switch that starts and ends the heater's boost.

A write goes through IOHomeControlComponent::set_water_heater_boost(), which writes the boost duration and the operating-mode word and reads the status back; the switch shows what the heater reports in that word (ADR 0081), so it has no state until the first poll and never shows a command the heater did not confirm. Switching on asks for a boost of duration 1, the only value seen. Switching off sends the word that ends both boost and away.

It never writes at boot: setup() restores nothing, and the codegen sets restore mode DISABLED, so a reboot cannot end a boost that is running.

Todo
Experimental: confirm on a real water heater that switching on starts a boost and switching off ends it (issue #198).

Definition at line 164 of file platform_water_heater.h.

Member Function Documentation

◆ dump_config()

void esphome::home_io_control::IOHomeDhwBoostSwitch::dump_config ( )
override

Dump switch configuration to the log.

Definition at line 256 of file platform_water_heater.cpp.

◆ get_setup_priority()

float esphome::home_io_control::IOHomeDhwBoostSwitch::get_setup_priority ( ) const
inlinenodiscardoverride

Get setup priority so the parent hub is available first.

Returns
setup_priority::DATA.

Definition at line 172 of file platform_water_heater.h.

◆ setup()

void esphome::home_io_control::IOHomeDhwBoostSwitch::setup ( )
override

Subscribe to the device's updates and publish what is already known.

Definition at line 238 of file platform_water_heater.cpp.

Here is the call graph for this function:

◆ write_state()

void esphome::home_io_control::IOHomeDhwBoostSwitch::write_state ( bool state)
overrideprotected

Start or end the boost; the read-back publishes the state.

Parameters
stateTrue to start a boost.

Definition at line 247 of file platform_water_heater.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: