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

Binary sensor of one heating state of the heater: heat pump running or electric backup running. More...

#include <platform_water_heater.h>

Inheritance diagram for esphome::home_io_control::IOHomeDhwBinarySensor:
Collaboration diagram for esphome::home_io_control::IOHomeDhwBinarySensor:

Public Types

enum class  Reading : uint8_t { HEAT_PUMP , ELECTRIC_BACKUP }
 Which reading the sensor shows. More...

Public Member Functions

void set_reading (Reading reading)
 Choose the reading (codegen sets it once).
void setup () override
 Subscribe to the device's updates and publish what is already known.
void dump_config () override
 Dump sensor 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 Attributes

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

Additional Inherited Members

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.

Detailed Description

Binary sensor of one heating state of the heater: heat pump running or electric backup running.

No state until the first poll has read the register it shows, so "off" always means the heater said so.

Definition at line 126 of file platform_water_heater.h.

Member Enumeration Documentation

◆ Reading

Which reading the sensor shows.

Enumerator
HEAT_PUMP 

Register 0x0021 bytes 3/4: the heat pump runs.

ELECTRIC_BACKUP 

Register 0x0021 byte 2: the electric element heats.

Definition at line 129 of file platform_water_heater.h.

Member Function Documentation

◆ dump_config()

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

Dump sensor configuration to the log.

Definition at line 225 of file platform_water_heater.cpp.

◆ get_setup_priority()

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

Get setup priority so the parent hub is available first.

Returns
setup_priority::DATA.

Definition at line 144 of file platform_water_heater.h.

◆ set_reading()

void esphome::home_io_control::IOHomeDhwBinarySensor::set_reading ( Reading reading)
inline

Choose the reading (codegen sets it once).

Parameters
readingReading to show.

Definition at line 136 of file platform_water_heater.h.

◆ setup()

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

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

Definition at line 205 of file platform_water_heater.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ reading_

Reading esphome::home_io_control::IOHomeDhwBinarySensor::reading_ {Reading::HEAT_PUMP}
protected

Definition at line 147 of file platform_water_heater.h.


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