Skip to content

Commit

Permalink
automatic upload by server
Browse files Browse the repository at this point in the history
  • Loading branch information
FaserF committed Aug 14, 2024
1 parent 90f6d69 commit dab728d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
9 changes: 6 additions & 3 deletions automation/automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
- service: telegram_bot.send_message
data_template:
message: >
Morgen wird {% if states.sensor.bioabfall.state == "Morgen" %}die Biomülltonne{% endif %}{% if states.sensor.altpapier.state == "Morgen" %}das Altpapier{% endif %}{% if states.sensor.restmull.state == "Morgen" %}die schwarze Tonne{% endif %}{% if states.sensor.gelber_sack.state == "Morgen" %}die gelben Säcke{% endif %} abgeholt. Bitte rausstellen.
Morgen {% if states.sensor.bioabfall.state == "Morgen" %}wird die Biomülltonne{% endif %}{% if states.sensor.altpapier.state == "Morgen" %}wird das Altpapier{% endif %}{% if states.sensor.restmull.state == "Morgen" %}wird die schwarze Tonne{% endif %}{% if states.sensor.gelber_sack.state == "Morgen" %}werden die gelben Säcke{% endif %} abgeholt. Bitte rausstellen.
target: !secret telegram_chat_fabian
inline_keyboard:
- "Erledigt:/telegramwastedone"
Expand All @@ -399,7 +399,7 @@
- service: telegram_bot.send_message
data_template:
message: >
Morgen wird {% if states.sensor.bioabfall.state == "Morgen" %}die Biomülltonne{% endif %}{% if states.sensor.altpapier.state == "Morgen" %}das Altpapier{% endif %}{% if states.sensor.restmull.state == "Morgen" %}die schwarze Tonne{% endif %}{% if states.sensor.gelber_sack.state == "Morgen" %}die gelben Säcke{% endif %} abgeholt. Bitte rausstellen.
Morgen {% if states.sensor.bioabfall.state == "Morgen" %}wird die Biomülltonne{% endif %}{% if states.sensor.altpapier.state == "Morgen" %}wird das Altpapier{% endif %}{% if states.sensor.restmull.state == "Morgen" %}wird die schwarze Tonne{% endif %}{% if states.sensor.gelber_sack.state == "Morgen" %}werden die gelben Säcke{% endif %} abgeholt. Bitte rausstellen.
target: !secret telegram_chat_samuel
inline_keyboard:
- "Erledigt:/telegramwastedone"
Expand Down Expand Up @@ -9985,10 +9985,13 @@
entity_id: sensor.kadermanager_zorro
condition:
condition: template
#{% set old_comments = trigger.from_state.attributes.events[0].comments if trigger.from_state.attributes.events else [] %}
#{% set new_comments = trigger.to_state.attributes.events[0].comments if trigger.to_state.attributes.events else [] %}
#{{ new_comments | length > old_comments | length }}
value_template: >
{% set old_comments = trigger.from_state.attributes.events[0].comments if trigger.from_state.attributes.events else [] %}
{% set new_comments = trigger.to_state.attributes.events[0].comments if trigger.to_state.attributes.events else [] %}
{{ new_comments | length > old_comments | length }}
{{ new_comments != old_comments }}
action:
- service: telegram_bot.send_message
data_template:
Expand Down
12 changes: 12 additions & 0 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ template:
device_class: temperature
attributes:
forecast: "{{ daily['weather.ebersberg_ebersberg'].forecast }}"
- trigger:
- platform: event
event_type: "imap_content"
id: "reviewernetwork_mail"
sensor:
- name: reviewernetwork_mail
state: "{{ trigger.event.data['subject'] }}"
attributes:
Message: "{{ trigger.event.data['text'] }}"
Sender: "{{ trigger.event.data['sender'] }}"
Date: "{{ trigger.event.data['date'] }}"
To: "{{ trigger.event.data['headers'].get('Delivered-To', ['n/a'])[0] }}"

#command_line:
# - sensor:
Expand Down

0 comments on commit dab728d

Please sign in to comment.