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

Sensor of the heater's energy since installation, in kWh (total_increasing). More...

#include <platform_water_heater.h>

Inheritance diagram for esphome::home_io_control::IOHomeDhwEnergySensor:
Collaboration diagram for esphome::home_io_control::IOHomeDhwEnergySensor:

Public Member Functions

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.
Public Member Functions inherited from esphome::home_io_control::IOHomeCompanionSensor
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.

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.
Protected Attributes inherited from esphome::home_io_control::DeviceBoundCompanion
IOHomeControlComponent * parent_ {nullptr}
std::string device_id_

Detailed Description

Sensor of the heater's energy since installation, in kWh (total_increasing).

Reads IoDevice::dhw.energy_wh (register 0x0004, Wh) and publishes it in kWh, so it fits the Home Assistant energy dashboard. No state until the first poll has read it.

Definition at line 114 of file platform_water_heater.h.

Member Function Documentation

◆ dump_config()

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

Dump sensor configuration to the log.

Definition at line 200 of file platform_water_heater.cpp.

◆ setup()

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

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

Definition at line 193 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: