Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 65c3b1d

Browse files
committedApr 27, 2021
add back telegram 0x2x to HT3 boilers
1 parent 473c550 commit 65c3b1d

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed
 

‎src/devices/boiler.cpp

+13-16
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
5151
register_telegram_type(0x16, F("UBAParameters"), true, [&](std::shared_ptr<const Telegram> t) { process_UBAParameters(t); });
5252
register_telegram_type(0x33, F("UBAParameterWW"), true, [&](std::shared_ptr<const Telegram> t) { process_UBAParameterWW(t); });
5353
register_telegram_type(0x34, F("UBAMonitorWW"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAMonitorWW(t); });
54-
// only EMS+ and Heatpump
55-
if (model() != EMSdevice::EMS_DEVICE_FLAG_EMS && model() != EMSdevice::EMS_DEVICE_FLAG_HT3) {
54+
// not ems1.0, but HT3
55+
if (model() != EMSdevice::EMS_DEVICE_FLAG_EMS) {
5656
register_telegram_type(0x26, F("UBASettingsWW"), true, [&](std::shared_ptr<const Telegram> t) { process_UBASettingsWW(t); });
5757
register_telegram_type(0x2A, F("MC10Status"), false, [&](std::shared_ptr<const Telegram> t) { process_MC10Status(t); });
58+
}
59+
// only EMS+ and Heatpump
60+
if (model() != EMSdevice::EMS_DEVICE_FLAG_EMS && model() != EMSdevice::EMS_DEVICE_FLAG_HT3) {
5861
register_telegram_type(0xD1, F("UBAOutdoorTemp"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAOutdoorTemp(t); });
5962
register_telegram_type(0xE3, F("UBAMonitorSlowPlus"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAMonitorSlowPlus2(t); });
6063
register_telegram_type(0xE4, F("UBAMonitorFastPlus"), false, [&](std::shared_ptr<const Telegram> t) { process_UBAMonitorFastPlus(t); });
@@ -235,22 +238,18 @@ void Boiler::register_mqtt_ha_config() {
235238
if (Helpers::hasValue(maintenanceType_)) {
236239
Mqtt::register_mqtt_ha_sensor(nullptr, nullptr, F_(maintenance), device_type(), "maintenance", nullptr, nullptr);
237240
}
241+
// optional etra values for date and time if not handled by maintenance
238242
// if (Helpers::hasValue(maintenanceTime_)) {
239243
// Mqtt::register_mqtt_ha_sensor(nullptr, F_(mqtt_suffix_info), F_(maintenanceTime), device_type(), "maintenanceTime", F_(hours), nullptr);
240244
// }
241245
// if (strlen(maintenanceDate_) > 0) {
242246
// Mqtt::register_mqtt_ha_sensor(nullptr, F_(mqtt_suffix_info), F_(maintenanceDate), device_type(), "maintenanceDate", nullptr, nullptr);
243247
// }
244-
// optional in info
245-
246-
// ems+ and heatpumps only
247-
if (model() != EMSdevice::EMS_DEVICE_FLAG_EMS && model() != EMSdevice::EMS_DEVICE_FLAG_HT3) {
248-
if (Helpers::hasValue(mixerTemp_)) {
249-
Mqtt::register_mqtt_ha_sensor(nullptr, nullptr, F_(mixerTemp), device_type(), "mixerTemp", F_(degrees), nullptr);
250-
}
251-
if (Helpers::hasValue(tankMiddleTemp_)) {
252-
Mqtt::register_mqtt_ha_sensor(nullptr, nullptr, F_(tankMiddleTemp), device_type(), "tankMiddleTemp", F_(degrees), nullptr);
253-
}
248+
if (Helpers::hasValue(mixerTemp_)) {
249+
Mqtt::register_mqtt_ha_sensor(nullptr, nullptr, F_(mixerTemp), device_type(), "mixerTemp", F_(degrees), nullptr);
250+
}
251+
if (Helpers::hasValue(tankMiddleTemp_)) {
252+
Mqtt::register_mqtt_ha_sensor(nullptr, nullptr, F_(tankMiddleTemp), device_type(), "tankMiddleTemp", F_(degrees), nullptr);
254253
}
255254

256255
// information for heatpumps
@@ -363,10 +362,8 @@ void Boiler::register_mqtt_ha_config_ww() {
363362
if (Helpers::hasValue(wWWorkM_)) {
364363
Mqtt::register_mqtt_ha_sensor(nullptr, F_(mqtt_suffix_ww), F_(wWWorkM), device_type(), "wWWorkM", F_(min), nullptr);
365364
}
366-
if (model() != EMSdevice::EMS_DEVICE_FLAG_EMS && model() != EMSdevice::EMS_DEVICE_FLAG_HT3) {
367-
if (Helpers::hasValue(wWMaxPower_)) {
368-
Mqtt::register_mqtt_ha_sensor(nullptr, F_(mqtt_suffix_ww), F_(wWMaxPower), device_type(), "wWMaxPower", F_(percent), nullptr);
369-
}
365+
if (Helpers::hasValue(wWMaxPower_)) {
366+
Mqtt::register_mqtt_ha_sensor(nullptr, F_(mqtt_suffix_ww), F_(wWMaxPower), device_type(), "wWMaxPower", F_(percent), nullptr);
370367
}
371368
mqtt_ha_config_ww_ = true; // done
372369
}

0 commit comments

Comments
 (0)