File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
author : Shelly-HomeKit contributors
2
2
description : A HomeKit firmware for Shelly switches
3
- version : 2.11.2
3
+ version : 2.11.2-4
4
4
5
5
libs_version : latest
6
6
modules_version : latest
Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ void ShellySwitch::AddPowerMeter(uint16_t *iid) {
386
386
float *value) {
387
387
auto energy = out_pm_->GetEnergyWH ();
388
388
if (!energy.ok ()) return kHAPError_Busy ;
389
- *value = energy.ValueOrDie ();
389
+ *value = energy.ValueOrDie () / 1000 . 0f ;
390
390
return kHAPError_None ;
391
391
},
392
392
true /* supports_notification */ , nullptr , " eve-total-power-consumption" );
@@ -400,15 +400,15 @@ void ShellySwitch::PowerMeterTimerCB() {
400
400
auto current_power = out_pm_->GetPowerW ();
401
401
auto current_total_power = out_pm_->GetEnergyWH ();
402
402
403
- if (current_power.ok () && current_power.ValueOrDie () != last_power_) {
404
- last_power_ = current_power.ValueOrDie ();
403
+ // if (current_power.ok() && current_power.ValueOrDie() != last_power_) {
404
+ // last_power_ = current_power.ValueOrDie();
405
405
power_char_->RaiseEvent ();
406
- }
407
- if (current_total_power.ok () &&
408
- current_total_power.ValueOrDie () != last_total_power_) {
409
- last_total_power_ = current_total_power.ValueOrDie ();
406
+ // }
407
+ // if (current_total_power.ok() &&
408
+ // current_total_power.ValueOrDie() != last_total_power_) {
409
+ // last_total_power_ = current_total_power.ValueOrDie();
410
410
total_power_char_->RaiseEvent ();
411
- }
411
+ // }
412
412
}
413
413
414
414
} // namespace shelly
You can’t perform that action at this time.
0 commit comments