Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list of custom Sensors
- - platform: time_date
- display_options:
- - 'time'
- - 'date'
- - 'date_time'
- - platform: fail2ban
- jails:
- - ssh
- - sshd
- - nextcloud
- - tandoor
- - homeassistant
- file_path: /fail2ban/fail2ban.log
- # ===== Abfallkalender =====
- # Google-Kalender (Abfuhrplan Meckenbeuren)
- # https://calendar.google.com/calendar/ical/***.ics
- # Restmüll 2-wöchentlich
- # https://www.bodenseekreis.de/umwelt-landnutzung/abfallentsorgung-privat/termine/abfuhrkalender/export/2023/meckenbeuren/kehlen/1/ics/
- # Gelber Sack
- # https://www.bodenseekreis.de/umwelt-landnutzung/abfallentsorgung-privat/termine/abfuhrkalender/export/2023/meckenbeuren/kehlen/4/ics/
- # Papier 4-wöchentlich
- # https://www.bodenseekreis.de/umwelt-landnutzung/abfallentsorgung-privat/termine/abfuhrkalender/export/2023/meckenbeuren/kehlen/10/ics/
- - platform: ics
- id: 1
- name: "ICS: Restmüll"
- url: https://calendar.google.com/calendar/ical/***.ics
- lookahead: 60
- startswith: "Restmüll"
- force_update: 600
- show_ongoing: true
- group_events: false
- icon: "mdi:trash-can"
- - platform: template
- sensors:
- kehlen_restmuell:
- unique_id: sensor.kehlen_restmuell
- friendly_name: "Restmüll"
- # value_template: "{{ state_attr('sensor.ics_1', 'remaining') }}"
- value_template: >-
- {% set remaining = state_attr('sensor.ics_1', 'remaining') %}
- {% if remaining > 1 %} in {{ remaining }} Tagen {% endif %}
- {% if remaining == 1 %} Morgen! {% endif %}
- {% if remaining == 0 %} Heute! {% endif %}
- attribute_templates:
- start: "{{ state_attr('sensor.ics_1', 'start') }}"
- end: "{{ state_attr('sensor.ics_1', 'end') }}"
- remaining: "{{ state_attr('sensor.ics_1', 'remaining') }}"
- text: "{{ states('sensor.ics_1')[:-5]
- |replace('Monday', 'Montag')
- |replace('Tuesday', 'Dienstag')
- |replace('Wednesday', 'Mittwoch')
- |replace('Thursday', 'Donnerstag')
- |replace('Friday', 'Freitag')
- |replace('Saturday', 'Samstag')
- |replace('Sunday', 'Sonntag') }}"
- icon_template: "{{ state_attr('sensor.ics_1', 'icon') }}"
- - platform: ics
- id: 2
- name: "ICS: Gelber Sack"
- url: https://calendar.google.com/calendar/ical/***.ics
- lookahead: 60
- startswith: "Gelber Sack"
- force_update: 600
- show_ongoing: true
- group_events: false
- icon: "mdi:recycle"
- - platform: template
- sensors:
- kehlen_gelber_sack:
- unique_id: sensor.kehlen_gelber_sack
- friendly_name: "Gelber Sack"
- # value_template: "{{ state_attr('sensor.ics_2', 'remaining') }}"
- value_template: >-
- {% set remaining = state_attr('sensor.ics_2', 'remaining') %}
- {% if remaining > 1 %} in {{ remaining }} Tagen {% endif %}
- {% if remaining == 1 %} Morgen! {% endif %}
- {% if remaining == 0 %} Heute! {% endif %}
- attribute_templates:
- start: "{{ state_attr('sensor.ics_2', 'start') }}"
- end: "{{ state_attr('sensor.ics_2', 'end') }}"
- remaining: "{{ state_attr('sensor.ics_2', 'remaining') }}"
- text: "{{ states('sensor.ics_2')[:-5]
- |replace('Monday', 'Montag')
- |replace('Tuesday', 'Dienstag')
- |replace('Wednesday', 'Mittwoch')
- |replace('Thursday', 'Donnerstag')
- |replace('Friday', 'Freitag')
- |replace('Saturday', 'Samstag')
- |replace('Sunday', 'Sonntag') }}"
- icon_template: "{{ state_attr('sensor.ics_2', 'icon') }}"
- - platform: ics
- id: 3
- name: "ICS: Papiertonne"
- url: https://calendar.google.com/calendar/ical/***.ics
- lookahead: 60
- startswith: "Papier"
- force_update: 600
- show_ongoing: true
- group_events: false
- icon: "mdi:package-variant"
- - platform: template
- sensors:
- kehlen_papiertonne:
- unique_id: sensor.kehlen_papiertonne
- friendly_name: "Papiertonne"
- # value_template: "{{ state_attr('sensor.ics_3', 'remaining') }}"
- value_template: >-
- {% set remaining = state_attr('sensor.ics_3', 'remaining') %}
- {% if remaining > 1 %} in {{ remaining }} Tagen {% endif %}
- {% if remaining == 1 %} Morgen! {% endif %}
- {% if remaining == 0 %} Heute! {% endif %}
- attribute_templates:
- start: "{{ state_attr('sensor.ics_3', 'start') }}"
- end: "{{ state_attr('sensor.ics_3', 'end') }}"
- remaining: "{{ state_attr('sensor.ics_3', 'remaining') }}"
- text: "{{ states('sensor.ics_3')[:-5]
- |replace('Monday', 'Montag')
- |replace('Tuesday', 'Dienstag')
- |replace('Wednesday', 'Mittwoch')
- |replace('Thursday', 'Donnerstag')
- |replace('Friday', 'Freitag')
- |replace('Saturday', 'Samstag')
- |replace('Sunday', 'Sonntag') }}"
- icon_template: "{{ state_attr('sensor.ics_3', 'icon') }}"
- - platform: ics
- id: 4
- name: "ICS: sonstiger Abfall"
- url: https://calendar.google.com/calendar/ical/***.ics
- lookahead: 356
- regex: "^(?!Restmüll|Gelber Sack|Papier).*$"
- force_update: 600
- show_ongoing: true
- group_events: false
- icon: "mdi:delete-circle-outline"
- - platform: template
- sensors:
- kehlen_sonstiger_abfall:
- unique_id: sensor.kehlen_sonstiger_abfall
- # friendly_name: "Sonstiger Abfall"
- friendly_name: "{{ state_attr('sensor.ics_4', 'description') }}"
- # value_template: "{{ state_attr('sensor.ics_4', 'remaining') }}"
- value_template: >-
- {% set remaining = state_attr('sensor.ics_4', 'remaining') %}
- {% if remaining > 1 %} in {{ remaining }} Tagen {% endif %}
- {% if remaining == 1 %} Morgen! {% endif %}
- {% if remaining == 0 %} Heute! {% endif %}
- attribute_templates:
- start: "{{ state_attr('sensor.ics_4', 'start') }}"
- end: "{{ state_attr('sensor.ics_4', 'end') }}"
- remaining: "{{ state_attr('sensor.ics_4', 'remaining') }}"
- text: "{{ states('sensor.ics_4')[:-5] }}"
- icon_template: "{{ state_attr('sensor.ics_4', 'icon') }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement