I try to figure how I can show 6 different png considering the day of collecting my garbage, recycling, and compost.
Garbage and recycling 1 wednesday every 2 week
Compost every week thursday
What I try to do it th day before show image of my recycling 1’ in front of the others
And when it wednesday, change the image
in for one of the 2 images where the compost bin is advanced, but depending on the current week, (recycling or trash).
Make a template sensor that is based on day of the week. Such as 0 for Sunday, 1 for Monday or you can do the day names and then use that sensor as the condition in your picture-element
Maybe I’ m not clear, the recycling and trash are 1 wednesday every 2 week but not but each their Wednesday, not at the same time.
So from Friday to Monday the image shows my 3 alligned bins, on Tuesday the image shows the recycling or waste bin (depending on which passes this week) move forward, on Wednesday, we replace the image keeping the status of the recycling or waste bin, but also moving forward
the compost bin.
I use garbage_collection integration to create de template of the day…
My problem is on the image state, when I have 2 conditions!
something like that:
If A =1 show image 1
If B =1 show image 2
If A =0 & C = 1 show image 3
If B =0 & C = 1 show image 4
If A =0 & C > 1 show image 1
If B =0 & C > 1 show image 2
If C =0 show image 5
If A >1 & B >1 & C >1 show image 6
It exclusive, all 6 possibility have her own images, and it a full card Image,
Not finish but look like it…
Just dont know how to change the image with that logical:
If A =1 show image 1
If B =1 show image 2
If A =0 & C = 1 show image 3
If B =0 & C = 1 show image 4
If A =0 & C > 1 show image 1
If B =0 & C > 1 show image 2
If C =0 show image 5
If A >1 & B >1 & C >1 show image 6
type: picture-elements
elements:
- type: state-label
entity: sensor.recyclage
attribute: days
unit: Jours
style:
top: 12%
left: 89%
- type: state-label
entity: sensor.baque_brun
attribute: days
unit: Jours
style:
top: 6%
left: 89%
- type: state-label
entity: sensor.dechet
attribute: days
unit: Jours
style:
top: 18%
left: 89%
- type: state-icon
entity: sensor.dechet
icon_size: 35px
icon_color: black
attribute: days
unit: Jours
hide_date: true
style:
top: 18%
left: 85%
- type: state-icon
entity: sensor.recyclage
icon_size: 35px
icon_color: green
hide_date: true
attribute: days
unit: Jours
style:
top: 12%
left: 85%
- type: state-icon
entity: sensor.baque_brun
icon_size: 35px
icon_color: orange
hide_date: true
attribute: days
unit: Jours
style:
top: 6%
left: 85%
name: Poubelle
image: /local/poubelle_verte.png
pannel: true