Adding simulated sensors for currently exporting to/importing from the grid #136
rrozema
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to show both an energy flow card plus and a power flow card for my simulated battery. For the energy flow card all required sensor are available from the battery_sim device. For the power flow card however, no Power-equivalent exists of the simulated_sensor.energy_consumed and simulated_sensor.energy_produced energy sensors.
Here's what the energy flow card plus diagram looks like for yesterday, september 21st. I can select any period and the numbers will be adjusted to show the totals over that period.
I also want to use the power flow card to show the current 'live' situation like this:
However the power flow card requires 2 sensors to populate the left-most circle which are not provided by the battery_sim: power consumed from the grid and power exported to the grid. But, since I do have the power generated by my solar panels, the current discharge and charging rates for the (simulated) battery and the power used by my home I can calculate the missing export and import values.
This is the template I created for the simulated current consumption sensor:
And this is the template I created for the simulated current production sensor:
As an example, here are my template sensor settings, the other one is almost identical, except of course for the name and the template:
Here's the code to create the both cards shown for the energy:
And here's the code i used to create the both 'Live' information cards:
Beta Was this translation helpful? Give feedback.
All reactions