Entity for sesor.states('home_power_calculated') #738
Replies: 1 comment 3 replies
-
The card will calculate home power consumption from other entities if you don't populate the home sensor in the card, but it doesn't create entities for you. You could easily create such a sensor yourself as a template sensor using the formulae: home power = import power - export power + solar power + battery discharge power - battery charge power Use get the state values for each of your existing sensors and add/subtract them as above. Word of warning though that this will be a very 'noisy' sensor as every single watt of power change of any of the underlying sensors will result in a new home power sensor value being stored in the HA database. It'll add a lot of data storage to your database, I've seen it happen myself. To get around this issue, I create my home load sensor as a time-based trigger sensor, i.e. it only updates every 5 minutes so I get less state changes stored in the HA database. Mine is a home load sensor but it's exactly the same principle for home power calculation, just change the device_class to power and state_class to measurement. This is what I have in my configuration.yaml:
|
Beta Was this translation helpful? Give feedback.
-
Hi there,
would it be possible to create an sensor-entity for the calculated powerconsumption for home when the entityfield is kept blank?
Kind regards
Timo
Beta Was this translation helpful? Give feedback.
All reactions