simplify inetboxapp code.

This commit is contained in:
Your Name
2023-03-20 12:27:16 +01:00
parent 975797a300
commit 6689ee5c00
10 changed files with 155 additions and 223 deletions

View File

@@ -8,7 +8,7 @@ namespace truma_inetbox {
static const char *const TAG = "truma_inetbox.heater_number";
void TrumaHeaterNumber::setup() {
this->parent_->register_listener([this](const StatusFrameHeater *status_heater) {
this->parent_->add_on_heater_message_callback([this](const StatusFrameHeater *status_heater) {
switch (this->type_) {
case TRUMA_NUMBER_TYPE::TARGET_ROOM_TEMPERATURE:
this->publish_state(temp_code_to_decimal(status_heater->target_temp_room, 0));