dev waste calender
This commit is contained in:
parent
ae773a25ba
commit
7adf52b36e
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Notifier for Telegram-Gruppe "Zu Hause"
|
||||||
|
# https://www.home-assistant.io/integrations/notify/
|
||||||
|
name: homegroup_telegram
|
||||||
|
platform: telegram
|
||||||
|
chat_id: !secret telegram_homegroup
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
name: waste_gray
|
name: waste_gray
|
||||||
details_format: upcoming
|
details_format: upcoming
|
||||||
count: 4
|
count: 4
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
types:
|
types:
|
||||||
- 'graue Tonne'
|
- 'graue Tonne'
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
name: waste_yellow
|
name: waste_yellow
|
||||||
details_format: upcoming
|
details_format: upcoming
|
||||||
count: 4
|
count: 4
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
types:
|
types:
|
||||||
- 'gelbe Tonne/Sack'
|
- 'gelbe Tonne/Sack'
|
||||||
|
|
@ -24,25 +24,16 @@
|
||||||
name: waste_brown
|
name: waste_brown
|
||||||
details_format: upcoming
|
details_format: upcoming
|
||||||
count: 4
|
count: 4
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
types:
|
types:
|
||||||
- 'braune Tonne'
|
- 'braune Tonne'
|
||||||
|
|
||||||
- platform: waste_collection_schedule
|
|
||||||
name: waste_green
|
|
||||||
details_format: upcoming
|
|
||||||
count: 4
|
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
|
||||||
types:
|
|
||||||
- 'grüne Tonne'
|
|
||||||
|
|
||||||
- platform: waste_collection_schedule
|
- platform: waste_collection_schedule
|
||||||
name: waste_bulk
|
name: waste_bulk
|
||||||
details_format: upcoming
|
details_format: upcoming
|
||||||
count: 4
|
count: 4
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
types:
|
types:
|
||||||
- 'Sperrmüll'
|
- 'Sperrmüll'
|
||||||
|
|
@ -51,11 +42,20 @@
|
||||||
name: waste_pollutants
|
name: waste_pollutants
|
||||||
details_format: upcoming
|
details_format: upcoming
|
||||||
count: 4
|
count: 4
|
||||||
value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)'
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
types:
|
types:
|
||||||
- 'Schadstoffe'
|
- 'Schadstoffe'
|
||||||
|
|
||||||
|
- platform: waste_collection_schedule
|
||||||
|
name: waste_green
|
||||||
|
details_format: upcoming
|
||||||
|
count: 4
|
||||||
|
value_template: 'am {{value.date.strftime("%d.%m.%Y")}} in {{value.daysTo}} Tagen'
|
||||||
|
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
|
||||||
|
types:
|
||||||
|
- 'grüne Tonne'
|
||||||
|
|
||||||
- platform: waste_collection_schedule
|
- platform: waste_collection_schedule
|
||||||
name: waste_all
|
name: waste_all
|
||||||
count: 4
|
count: 4
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ telegram_bot:
|
||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
- !secret telegram_dev # dev chat
|
- !secret telegram_dev # dev chat
|
||||||
- !secret telegram_chk # christian
|
- !secret telegram_chk # christian
|
||||||
|
- !secret telegram_homegroup # home-gruppe
|
||||||
parse_mode: html
|
parse_mode: html
|
||||||
|
|
@ -17,16 +17,16 @@ waste_collection_schedule:
|
||||||
show: false
|
show: false
|
||||||
- type: grüne Tonne
|
- type: grüne Tonne
|
||||||
alias: grüne Tonne
|
alias: grüne Tonne
|
||||||
picture: /local/images/waste/tonnegruen.png
|
picture: /local/images/waste/tonnegruen.svg
|
||||||
- type: graue Tonne
|
- type: graue Tonne
|
||||||
alias: graue Tonne
|
alias: graue Tonne
|
||||||
picture: /local/images/waste/tonnegrau.png
|
picture: /local/images/waste/tonnegrau.svg
|
||||||
- type: braune Tonne
|
- type: braune Tonne
|
||||||
alias: braune Tonne
|
alias: braune Tonne
|
||||||
picture: /local/images/waste/tonnebraun.png
|
picture: /local/images/waste/tonnebraun.svg
|
||||||
- type: gelbe Tonne/Sack
|
- type: gelbe Tonne/Sack
|
||||||
alias: gelbe Tonne/Sack
|
alias: gelbe Tonne/Sack
|
||||||
picture: /local/images/waste/tonnegelb.png
|
picture: /local/images/waste/tonnegelb.svg
|
||||||
- type: Sperrmüll
|
- type: Sperrmüll
|
||||||
alias: Sperrmüll
|
alias: Sperrmüll
|
||||||
- type: Schadstoffe
|
- type: Schadstoffe
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ sequence:
|
||||||
- service: notify.dev_telegram
|
- service: notify.dev_telegram
|
||||||
data:
|
data:
|
||||||
message: test from Telegram with service "notify.dev_telegram"
|
message: test from Telegram with service "notify.dev_telegram"
|
||||||
|
- service: notify.homegroup_telegram
|
||||||
|
data:
|
||||||
|
message: test from Telegram with service "notify.homegroup_telegram"
|
||||||
mode: single
|
mode: single
|
||||||
# alias: Telegram Test1
|
# alias: Telegram Test1
|
||||||
# mode: single
|
# mode: single
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,31 @@
|
||||||
# https://www.home-assistant.io/integrations/script
|
# https://www.home-assistant.io/integrations/script
|
||||||
alias: Skript Müllbenachrichtigung
|
alias: Skript Müllbenachrichtigung
|
||||||
|
variables:
|
||||||
|
action_required: >
|
||||||
|
{%
|
||||||
|
set tomorrow = strptime((now()+timedelta(days=+1)).strftime('%Y-%m-%d'),"%Y-%m-%d")
|
||||||
|
%}
|
||||||
|
{%
|
||||||
|
set wasteDateString = states('sensor.waste_all').split("|")[2]
|
||||||
|
%}
|
||||||
|
{%
|
||||||
|
set wasteType = states('sensor.waste_all').split("|")[0]
|
||||||
|
%}
|
||||||
|
{#
|
||||||
|
set wasteDateString = "19.11.2021"
|
||||||
|
#}
|
||||||
|
{%
|
||||||
|
set wasteDate = strptime(wasteDateString,"%d.%m.%Y")
|
||||||
|
%}
|
||||||
|
{% if tomorrow == wasteDate %}
|
||||||
|
True
|
||||||
|
{% else %}
|
||||||
|
False
|
||||||
|
{% endif %}
|
||||||
sequence:
|
sequence:
|
||||||
- service: notify.dev_telegram
|
- condition: template
|
||||||
|
value_template: "{{ action_required }}"
|
||||||
|
- service: notify.homegroup_telegram
|
||||||
data:
|
data:
|
||||||
message: Mülldatem werden ausgewertet {{ states('sensor.tonnenbutton') }}
|
message: >-
|
||||||
|
{{ states('sensor.waste_all').split("|")[0] }} muss raus
|
||||||
|
|
@ -7,6 +7,7 @@ some_password: welcome
|
||||||
telegram_api_key: 448772521:AAHIIrXBVEUF7_1zYRCmGo5YHipRJyBlp7o
|
telegram_api_key: 448772521:AAHIIrXBVEUF7_1zYRCmGo5YHipRJyBlp7o
|
||||||
telegram_dev: -391668323
|
telegram_dev: -391668323
|
||||||
telegram_chk: 14652347
|
telegram_chk: 14652347
|
||||||
|
telegram_homegroup: -192460863
|
||||||
|
|
||||||
mqtt_user: mqtt_user
|
mqtt_user: mqtt_user
|
||||||
mqtt_pw: IH88EZW4mIm9LI8oJWIK
|
mqtt_pw: IH88EZW4mIm9LI8oJWIK
|
||||||
Loading…
Reference in New Issue