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

Switch that turns the heater's open-window detection on and off. More...

#include <platform_climate_controls.h>

Inheritance diagram for esphome::home_io_control::IOHomeOpenWindowDetectionSwitch:
Collaboration diagram for esphome::home_io_control::IOHomeOpenWindowDetectionSwitch:

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
 Write the detection setting and read it back.
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 turns the heater's open-window detection on and off.

A write sends register 0x0106 and reads it back; the switch shows what the heater answered, so it has no state until the first read (the boot poll) and never shows a command the heater did not confirm. Disabled by default and in the config entity category.

Definition at line 53 of file platform_climate_controls.h.

Member Function Documentation

◆ dump_config()

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

Dump switch configuration to the log.

Definition at line 54 of file platform_climate_controls.cpp.

◆ get_setup_priority()

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

Get setup priority so the parent hub is available first.

Returns
setup_priority::DATA.

Definition at line 63 of file platform_climate_controls.h.

◆ setup()

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

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

Definition at line 32 of file platform_climate_controls.cpp.

Here is the call graph for this function:

◆ write_state()

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

Write the detection setting and read it back.

Parameters
stateTrue to switch detection on.

Definition at line 40 of file platform_climate_controls.cpp.

Here is the call graph for this function:

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