Skip to content

Commit 85a49a3

Browse files
committed
tmp
1 parent 093dfc5 commit 85a49a3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

mos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
author: Shelly-HomeKit contributors
22
description: A HomeKit firmware for Shelly switches
3-
version: 2.11.2
3+
version: 2.11.2-4
44

55
libs_version: latest
66
modules_version: latest

src/shelly_switch.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ void ShellySwitch::AddPowerMeter(uint16_t *iid) {
386386
float *value) {
387387
auto energy = out_pm_->GetEnergyWH();
388388
if (!energy.ok()) return kHAPError_Busy;
389-
*value = energy.ValueOrDie();
389+
*value = energy.ValueOrDie() / 1000.0f;
390390
return kHAPError_None;
391391
},
392392
true /* supports_notification */, nullptr, "eve-total-power-consumption");
@@ -400,15 +400,15 @@ void ShellySwitch::PowerMeterTimerCB() {
400400
auto current_power = out_pm_->GetPowerW();
401401
auto current_total_power = out_pm_->GetEnergyWH();
402402

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();
405405
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();
410410
total_power_char_->RaiseEvent();
411-
}
411+
// }
412412
}
413413

414414
} // namespace shelly

0 commit comments

Comments
 (0)