From Crimson Meerkat, 3 Weeks ago, written in YAML.
Embed
  1. - id: '1742896826030'
  2.   alias: SCHEDULE - Kalender - Oppdater datoer
  3.   description: ''
  4.   triggers:
  5.   - trigger: time
  6.     at: 01:00:00
  7.     enabled: false
  8.   conditions: []
  9.   actions:
  10.   - action: calendar.create_event
  11.     target:
  12.       entity_id: calendar.soppelhenting
  13.     data:
  14.       summary: Restavfall
  15.       start_date: '{{ as_timestamp(states(''sensor.restavfall'')) | timestamp_custom(''%Y-%m-%d'')
  16.         }}'
  17.       end_date: '{{ (as_timestamp(states(''sensor.restavfall'')) + 86400) | timestamp_custom(''%Y-%m-%d'')
  18.         }}'
  19.   - action: calendar.create_event
  20.     target:
  21.       entity_id: calendar.soppelhenting
  22.     data:
  23.       summary: Restavfall
  24.       start_date: '{{ as_timestamp(states(''sensor.restavfall_neste'')) | timestamp_custom(''%Y-%m-%d'')
  25.         }}'
  26.       end_date: '{{ (as_timestamp(states(''sensor.restavfall_neste'')) + 86400) |
  27.        timestamp_custom(''%Y-%m-%d'') }}'
  28.   - action: calendar.create_event
  29.     target:
  30.       entity_id: calendar.soppelhenting
  31.     data:
  32.       summary: Matavfall
  33.       start_date: '{{ as_timestamp(states(''sensor.matavfall'')) | timestamp_custom(''%Y-%m-%d'')
  34.         }}'
  35.       end_date: '{{ (as_timestamp(states(''sensor.matavfall'')) + 86400) | timestamp_custom(''%Y-%m-%d'')
  36.         }}'
  37.   - action: calendar.create_event
  38.     target:
  39.       entity_id: calendar.soppelhenting
  40.     data:
  41.       summary: Matavfall
  42.       start_date: '{{ as_timestamp(states(''sensor.matavfall_neste'')) | timestamp_custom(''%Y-%m-%d'')
  43.         }}'
  44.       end_date: '{{ (as_timestamp(states(''sensor.matavfall_neste'')) + 86400) | timestamp_custom(''%Y-%m-%d'')
  45.         }}'
  46.   - action: calendar.create_event
  47.     target:
  48.       entity_id: calendar.soppelhenting
  49.     data:
  50.       summary: Papiravfall
  51.       start_date: '{{ as_timestamp(states(''sensor.papiravfall'')) | timestamp_custom(''%Y-%m-%d'')
  52.         }}'
  53.       end_date: '{{ (as_timestamp(states(''sensor.papiravfall'')) + 86400) | timestamp_custom(''%Y-%m-%d'')
  54.         }}'
  55.   - action: calendar.create_event
  56.     target:
  57.       entity_id: calendar.soppelhenting
  58.     data:
  59.       summary: Papiravfall
  60.       start_date: '{{ as_timestamp(states(''sensor.papiravfall_neste'')) | timestamp_custom(''%Y-%m-%d'')
  61.         }}'
  62.       end_date: '{{ (as_timestamp(states(''sensor.papiravfall_neste'')) + 86400) |
  63.        timestamp_custom(''%Y-%m-%d'') }}'
  64.   - action: calendar.create_event
  65.     target:
  66.       entity_id: calendar.soppelhenting
  67.     data:
  68.       summary: Glass og metall
  69.       start_date: '{{ as_timestamp(states(''sensor.glass_og_metall'')) | timestamp_custom(''%Y-%m-%d'')
  70.         }}'
  71.       end_date: '{{ (as_timestamp(states(''sensor.glass_og_metall'')) + 86400) | timestamp_custom(''%Y-%m-%d'')
  72.         }}'
  73.   - action: calendar.create_event
  74.     target:
  75.       entity_id: calendar.soppelhenting
  76.     data:
  77.       summary: Glass og metall
  78.       start_date: '{{ as_timestamp(states(''sensor.glass_og_metall_neste'')) | timestamp_custom(''%Y-%m-%d'')
  79.         }}'
  80.       end_date: '{{ (as_timestamp(states(''sensor.glass_og_metall_neste'')) + 86400)
  81.         | timestamp_custom(''%Y-%m-%d'') }}'
  82.   mode: single
  83.