al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.73k stars 672 forks source link

❄️ add second power_cost entities for lumi.acpartner.mcn04 #1895

Closed wangerry closed 1 month ago

wangerry commented 1 month ago

lumi.acpartner.mcn04 has 2 sockets, but micloud_statistics only processed 1

so change the config stat_power_cost_key to support keys array for further similar devices.

this change will add power_cost_today/month with suffix _2, _3..., won't change the entity naming for pervious devices.

FYI: I am not very familiar with the code structure, if this pr is not the proper way to achive this, let me know.

image

wangerry commented 1 month ago

This should solve the issue: https://github.com/al-one/hass-xiaomi-miot/issues/1635