Skip to content

Commit

Permalink
Show mode (off / heat) in Home Assistant for Moduline 200
Browse files Browse the repository at this point in the history
  • Loading branch information
kpschaper committed Nov 6, 2021
1 parent 23b6d81 commit 316832f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,15 @@ uint8_t Thermostat::HeatingCircuit::get_mode() const {
return HeatingCircuit::Mode::UNKNOWN;
}

if (model == EMSdevice::EMS_DEVICE_FLAG_RC20) {
if (model == EMSdevice::EMS_DEVICE_FLAG_RC10) {
if (mode == 1) {
return HeatingCircuit::Mode::OFF;
} else if (mode == 2) {
return HeatingCircuit::Mode::NIGHT;
} else if (mode == 4) {
return HeatingCircuit::Mode::ON;
}
} else if (model == EMSdevice::EMS_DEVICE_FLAG_RC20) {
if (mode == 0) {
return HeatingCircuit::Mode::OFF;
} else if (mode == 1) {
Expand Down Expand Up @@ -703,7 +711,8 @@ void Thermostat::process_RC10Monitor(std::shared_ptr<const Telegram> telegram) {
if (hc == nullptr) {
return;
}

has_update(telegram->read_value(hc->mode, 0));
hc->hamode = hc->mode == 4 ? 1 : 0; // set special HA mode: off, on, auto
has_update(telegram->read_value(hc->setpoint_roomTemp, 1, 1)); // is * 2, force as single byte
has_update(telegram->read_value(hc->curr_roomTemp, 2)); // is * 10
}
Expand Down

0 comments on commit 316832f

Please sign in to comment.