vk496 / zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman
MIT License
6 stars 2 forks source link

lixee expose EASF01 (HC) and EAS02(HP) as home assistant statistics #12

Closed traylenator closed 2 years ago

traylenator commented 2 years ago

Been running Zlinky_TIC for a week now - all perfect - thankyou.

Currently only the total energy is exposed as a statistic and so is easy to add home assistant energy dashboard.

// For HomeAssistant                                                                                                                                                                            
const indexEnergy = () => exposes.numeric('energy', ea.STATE).withUnit('Wh').withDescription('Index Base').withProperty('currentSummDelivered');  

In my case the metrics EASF01 and EASF02 seem to correspond the Wh accumulated in off-peak (HC) and peak(HP)

If these were both statistics I could add these two statistics as independent energy inputs and improve the visualisation.

No clue how standard that mapping is, a quick google suggests it is not.

Thanks again.

Steve.

HA Statistic - https://www.home-assistant.io/more-info/statistics/

traylenator commented 2 years ago

In fact this can be achieved with a customization to add attributes to the sensor of choice.

homeassistant:
  customize:
    sensor.linky_easf01:
       friendly_name: "Total Off-Peak Rate Energy (HC)"
       state_class: total
       device_class: energy
    sensor.linky_easf02:
       friendly_name: "Total Peak Rate Energy (HP)"
       state_class: total
       device_class: energy
vk496 commented 2 years ago

As you said, it can be done from HA. I'm not sure that is something related to Z2M, since last version already publish Wh/kWh attributes with correct device_class (energy)