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 Jan 5, 2024
1 parent cd2dd3d commit dcf5d32
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 15 deletions.
66 changes: 62 additions & 4 deletions automation/automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4743,6 +4743,30 @@
is_anonymous: false
allows_multiple_answers: true
disable_notification: true
- conditions:
- condition: or
conditions:
- condition: state
entity_id: sensor.weather_ebersberg_hourly
state: "unavailable"
- condition: state
entity_id: sensor.weather_ebersberg_hourly
state: "unknown"
sequence:
- service: telegram_bot.send_poll
data_template:
target: !secret telegram_chat_5friends
question: "Morgen ist {{ states.calendar.votgaming_kalender.attributes.message }}. {% if now().month <= 4 or now().month >= 10 %} Sonne bis {{ as_timestamp(states.sun.sun.attributes.next_dusk) |float| timestamp_custom('%H:%M', false)}}.{% endif %} Wo treffen wir uns?"
options:
- "Fabi"
- "Kai & Adri"
- "Flo"
- "Maxi"
- "JUZ"
- "Wo anders (Schreiben wo!)"
is_anonymous: false
allows_multiple_answers: true
disable_notification: true
default:
- service: telegram_bot.send_poll
data_template:
Expand All @@ -4762,7 +4786,7 @@
- service: telegram_bot.send_poll
data_template:
target: !secret telegram_chat_5friends
question: "Shisha (wenn Treffen in keinem geschlossenem Raum)?"
question: "Shisha?"
options:
- "Ja"
- "Nein"
Expand Down Expand Up @@ -7023,8 +7047,12 @@
disable_notification: true
message: >
Aktuell Wetterwarnung vor markantem Wetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7046,8 +7074,12 @@
disable_notification: true
message: >
Aktuell Wetterwarnung vor markantem Wetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7057,12 +7089,16 @@
sequence:
- service: telegram_bot.send_message
data_template:
target: !secret telegram_chat_jutta
target: !secret telegram_chat_5friends
disable_notification: true
message: >
Aktuell Wetterwarnung vor markantem Wetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7083,8 +7119,12 @@
target: !secret telegram_chat_fabian
message: >
Aktuell Wetterwarnung vor Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7105,8 +7145,12 @@
target: !secret telegram_chat_samuel
message: >
Aktuell Wetterwarnung vor Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7116,11 +7160,15 @@
sequence:
- service: telegram_bot.send_message
data_template:
target: !secret telegram_chat_jutta
target: !secret telegram_chat_5friends
message: >
Aktuell Wetterwarnung vor Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7141,8 +7189,12 @@
target: !secret telegram_chat_fabian
message: >
ACHTUNG!!!! Aktuell Wetterwarnung vor extremen Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7163,9 +7215,12 @@
target: !secret telegram_chat_samuel
message: >
ACHTUNG!!!! Aktuell Wetterwarnung vor extremen Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- choose:
- conditions:
Expand All @@ -7175,12 +7230,15 @@
sequence:
- service: telegram_bot.send_message
data_template:
target: !secret telegram_chat_jutta
target: !secret telegram_chat_5friends
message: >
ACHTUNG!!!! Aktuell Wetterwarnung vor extremen Unwetter in {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.region_name }}.
*{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_headline }}*
{{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_description }}
Voraussichtlich ab {{ states.sensor.dwd_weather_warnings_809175139_current_warning_level.attributes.warning_1_end }} Uhr.
- id: server_temp_warning
Expand Down
16 changes: 11 additions & 5 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,12 @@ template:
sensor:
- name: Weather Ebersberg Hourly
unique_id: weather_ebersberg_hourly
state: "{{ hourly.forecast.temperature }}"
state: "{{ hourly['weather.ebersberg_ebersberg'].forecast[0].temperature }}"
availability: "{{ is_number(hourly['weather.ebersberg_ebersberg'].forecast[0].temperature) }}"
unit_of_measurement: °C
device_class: temperature
attributes:
forecast: "{{ hourly.forecast }}"
forecast: "{{ hourly['weather.ebersberg_ebersberg'].forecast }}"
- trigger:
- platform: time_pattern
hours: /23
Expand All @@ -324,11 +327,14 @@ template:
entity_id: weather.ebersberg_ebersberg
response_variable: daily
sensor:
- name: Weather Ebersberg daily
- name: Weather Ebersberg Daily
unique_id: weather_ebersberg_daily
state: "{{ daily.forecast.temperature }}"
state: "{{ daily['weather.ebersberg_ebersberg'].forecast[0].temperature }}"
availability: "{{ is_number(daily['weather.ebersberg_ebersberg'].forecast[0].temperature) }}"
unit_of_measurement: °C
device_class: temperature
attributes:
forecast: "{{ daily.forecast }}"
forecast: "{{ daily['weather.ebersberg_ebersberg'].forecast }}"

#command_line:
# - sensor:
Expand Down
6 changes: 0 additions & 6 deletions sensor/sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@
Inaktiv
{% endif %}
unit_of_measurement: "Minuten"
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: memory_use_percent
# - type: processor_temperature
- platform: template
sensors:
fs_caller:
Expand Down

0 comments on commit dcf5d32

Please sign in to comment.