Hi everybody!
I just got a temperature monitoring system up and running for my central heating system. Will be useful when determining efficiency and to monitor wood consumption. I’m still very new to coding/scripting and struggle a bit from time to time. Now I kinda managed to make a half decent picture element card but now I’m stuck
What I do want to add is a text and a counter that says “Time since last fire” or something like that and then have a counter expressed in days and hours. To get the “start time” of the counter I will use the power state of a smart plug. There is a fan inside the boiler which pulls around 200W when in use. So I figure something like “Counter should start counting when power usage of smart plug goes under 150W, and reset for another count when power usage goes over 150W”
However, I also start the fan when cleaning the boiler, thus the power usage will go over the threshold. Is it possible to add “When power >150W for 30 minutes” to the reset?
I also would like to add “Total number of fires this year” to the picture element card, following the same logic as above. One cycle of power usage >150W for at least 30 minutes would mean 1 fire to add to the count.
Any help in the right direction would be really appreciated!
This is what the card looks like:
My code so far:
elements:
- type: state-label
entity: sensor.panna
style:
top: 25%
left: 72%
font-size: 16px
color: black
- type: state-label
entity: sensor.tekniktank_1
style:
top: 34%
left: 42%
font-size: 16px
color: black
- type: state-label
entity: sensor.slavtank_1
style:
top: 34%
left: 15%
font-size: 16px
color: black
- type: state-label
entity: sensor.tekniktank_2
style:
top: 53%
left: 42%
font-size: 16px
color: black
- type: state-label
entity: sensor.slavtank_2
style:
top: 53%
left: 15%
font-size: 16px
color: black
- type: state-label
entity: sensor.tekniktank_3
style:
top: 74%
left: 42%
font-size: 16px
color: black
- type: state-label
entity: sensor.slavtank_3
style:
top: 74%
left: 15%
font-size: 16px
color: black
- type: state-label
entity: sensor.retur_radiator
style:
top: 10%
left: 36%
font-size: 16px
color: darkblue
- type: state-label
entity: sensor.framledning_radiator
style:
top: 10%
left: 21%
font-size: 16px
color: darkred
- type: state-label
entity: sensor.power_127
style:
top: 61%
left: 72%
font-size: 16px
color: black
- type: icon
icon: mdi:flash
style:
top: 55%
left: 72%
font-size: 16px
color: black
- type: icon
icon: mdi:fire-off
style:
top: 83%
left: 72%
font-size: 16px
color: darkred
- type: state-label
entity: sensor.retur_radiator
style:
top: 10%
left: 36%
font-size: 16px
color: blue
image: /local/vedpanna2.png