Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: template
- sensors:
- rifiuti:
- entity_id: sensor.time
- friendly_name: "Rifiuti"
- icon_template: mdi:delete-restore
- value_template: "
- {% if (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '1' %} Organico
- {% elif (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '2' %} Indifferenziato
- {% elif (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '3' %} Niente
- {% elif (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '5' %} Organico
- {% elif (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '6' %} Niente
- {% elif (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '0' %} Plastica
- {% endif %}
- {% if (now().timestamp() | int - (8*60*60)) | timestamp_custom('%w') == '4' %}
- {% if (now().isocalendar()[1] | int) % 2 == 0 %} Vetro
- {% else %} Carta
- {% endif %}
- {% endif %}
- "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement