Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### SKRALDESPAND ###
- - platform: template
- sensors:
- skraldespand_dagrenovation:
- friendly_name: 'Dagrenovation'
- value_template: >-
- {% set cal = states.calendar.skraldespand %}
- {% set offset = -86400 %}
- {{ cal.attributes.message == "Dagrenovation" and cal.start_time.timestamp() + offset <= now().timestamp() }}
- icon_template: >-
- {% if states('sensor.skraldespand_dagrenovation') == 'false' %}
- mdi:delete
- {% else %}
- mdi:delete-empty
- {% endif %}
- skraldespand_genanvendeligt:
- friendly_name: 'Genanvendeligt'
- value_template: >-
- {% set cal = states.calendar.skraldespand %}
- {% set offset = -86400 %}
- {{ cal.attributes.message == "Genanvendeligt" and cal.start_time.timestamp() + offset <= now().timestamp() }}
- icon_template: >-
- {% if states('sensor.skraldespand_genanvendeligt') == 'false' %}
- mdi:delete
- {% else %}
- mdi:delete-empty
- {% endif %}
- skraldespand_haveaffald:
- friendly_name: 'Haveaffald'
- value_template: >-
- {% set cal = states.calendar.skraldespand %}
- {% set offset = -86400 %}
- {{ cal.attributes.message == "Haveaffald" and cal.start_time.timestamp() + offset <= now().timestamp() }}
- icon_template: >-
- {% if states('sensor.skraldespand_dhaveaffald') == 'false' %}
- mdi:delete
- {% else %}
- mdi:delete-empty
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement