home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.55k stars 30.73k forks source link

Extract smappee switch energy attributes into sensors #53321

Closed balloob closed 3 years ago

balloob commented 3 years ago

This issue is for the switch platform of the smappee integration.

The switch integration has embedded sensors for energy usage. This is no longer the preferred approach. Integrations using this approach should turn this data into standalone sensors.

This is important because Home Assistant is going to introduce home energy management (HEM) in 2021.8. HEM will be able to consume the data if it is exposed as standalone sensors.

To make sure that the sensors that represent total kWh is usable for HEM, set state_class to STATE_CLASS_TOTAL_INCREASING. See sensor documentation for more information.

Link to the architecture discussion.

balloob commented 3 years ago

Not sure why the mention bot didn't work, but @bsmappee did you see this issue?

bsmappee commented 3 years ago

@balloob no, this is the first time this issue got my attention. Will look into it asap.