@@ -133,6 +133,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
133
133
monitor_typeids = {0x0A };
134
134
set_typeids = {};
135
135
register_telegram_type (monitor_typeids[0 ], " EasyMonitor" , true , MAKE_PF_CB (process_EasyMonitor));
136
+ register_telegram_type (0x02A5 , " EasyMonitor" , false , MAKE_PF_CB (process_EasyMonitor));
136
137
137
138
// CRF
138
139
} else if (model == EMSdevice::EMS_DEVICE_FLAG_CRF) {
@@ -840,13 +841,30 @@ void Thermostat::process_RC20Monitor(std::shared_ptr<const Telegram> telegram) {
840
841
841
842
// type 0x0A - data from the Nefit Easy/TC100 thermostat (0x18) - 31 bytes long
842
843
void Thermostat::process_EasyMonitor (std::shared_ptr<const Telegram> telegram) {
843
- auto hc = heating_circuit (telegram);
844
+ monitor_typeids[0 ] = telegram->type_id ;
845
+ auto hc = heating_circuit (telegram);
844
846
if (hc == nullptr ) {
845
847
return ;
846
848
}
847
849
848
- has_update (telegram, hc->roomTemp , 8 ); // is * 100
849
- has_update (telegram, hc->selTemp , 10 ); // is * 100
850
+ if (telegram->type_id == 0x0A ) {
851
+ int16_t temp = hc->roomTemp ;
852
+ if (telegram->read_value (temp, 8 ) && temp != 0 ) {
853
+ has_update (telegram, hc->roomTemp , 8 ); // is * 100
854
+ has_update (telegram, hc->selTemp , 10 ); // is * 100
855
+ toggle_fetch (0x0A , true );
856
+ }
857
+ } else if (telegram->type_id == 0x02A5 ) { // see #2277
858
+ int16_t temp = hc->roomTemp / 10 ;
859
+ if (telegram->read_value (temp, 0 )) { // is * 10
860
+ has_update (hc->roomTemp , temp * 10 ); // * 100
861
+ toggle_fetch (0x0A , false );
862
+ }
863
+ int16_t sel = hc->selTemp / 50 ;
864
+ if (telegram->read_value (sel, 6 , 1 )) { // is * 2
865
+ has_update (hc->selTemp , sel * 50 ); // * 100
866
+ }
867
+ }
850
868
851
869
add_ha_climate (hc);
852
870
}
0 commit comments