Skip to content

Commit

Permalink
fix #536, FR100 datetime not writable
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jun 2, 2022
1 parent fe12f19 commit e7bcc38
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/devices/thermostat.cpp
Expand Up @@ -3730,13 +3730,18 @@ void Thermostat::register_device_values() {
MAKE_CF_CB(set_wwCircSwitchTime));
break;
case EMS_DEVICE_FLAG_JUNKERS:
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&dateTime_,
DeviceValueType::STRING,
FL_(tpl_datetime),
FL_(dateTime),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_datetime));
if (has_flags(EMS_DEVICE_FLAG_JUNKERS_OLD)) {
// FR100 is not writable, see. https://github.com/emsesp/EMS-ESP32/issues/536
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dateTime_, DeviceValueType::STRING, FL_(tpl_datetime), FL_(dateTime), DeviceValueUOM::NONE);
} else {
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&dateTime_,
DeviceValueType::STRING,
FL_(tpl_datetime),
FL_(dateTime),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_datetime));
}
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hybridStrategy_,
DeviceValueType::ENUM,
Expand Down

0 comments on commit e7bcc38

Please sign in to comment.