From 4beaf9612e187fc8a50166d1de4d6d498d9dc740 Mon Sep 17 00:00:00 2001 From: theipw <102994625+theipw@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:20:55 +0000 Subject: [PATCH] Create Automation Records, Temp and Wind --- Automation Records, Temp and Wind | 99 +++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Automation Records, Temp and Wind diff --git a/Automation Records, Temp and Wind b/Automation Records, Temp and Wind new file mode 100644 index 0000000..effe72a --- /dev/null +++ b/Automation Records, Temp and Wind @@ -0,0 +1,99 @@ +alias: Weather - Records, Temp & Wind +description: "" +trigger: + - platform: state + entity_id: + - sensor.gw1100a_v2_2_3_outdoor_temperature + id: temp_change + - platform: state + entity_id: + - sensor.gw1100a_v2_2_3_wind_gust + id: wind_speed +condition: [] +action: + - choose: + - conditions: + - condition: trigger + id: + - temp_change + - condition: numeric_state + entity_id: sensor.gw1100a_v2_2_3_outdoor_temperature + above: input_number.highest_recorded_temp + sequence: + - service: input_number.set_value + data: + value: "{{states('sensor.gw1100a_v2_2_3_outdoor_temperature')}}" + target: + entity_id: input_number.highest_recorded_temp + - service: input_datetime.set_datetime + data: + date: "{{ now().date() }}" + target: + entity_id: input_datetime.highest_temp_date + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - service: telegram_bot.send_message + data: + message: >- + New temperature high recorded. Now {{ + states('input_number.highest_recorded_temp') }}°C + - conditions: + - condition: trigger + id: + - temp_change + - condition: numeric_state + entity_id: sensor.gw1100a_v2_2_3_outdoor_temperature + below: input_number.lowest_recorded_temp + sequence: + - service: input_number.set_value + data: + value: "{{states('sensor.gw1100a_v2_2_3_outdoor_temperature')}}" + target: + entity_id: input_number.lowest_recorded_temp + - service: input_datetime.set_datetime + data: + date: "{{ now().date() }}" + target: + entity_id: input_datetime.lowest_temp_date + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - service: telegram_bot.send_message + data: + message: >- + New temperature low recorded. Now {{ + states('input_number.lowest_recorded_temp') }}°C + - conditions: + - condition: trigger + id: + - wind_speed + - condition: numeric_state + entity_id: sensor.gw1100a_v2_2_3_wind_gust + above: input_number.highest_recorded_wind_speed + sequence: + - service: input_number.set_value + data: + value: "{{states('sensor.gw1100a_v2_2_3_wind_gust')}}" + target: + entity_id: input_number.highest_recorded_wind_speed + - service: input_datetime.set_datetime + data: + date: "{{ now().date() }}" + target: + entity_id: input_datetime.highest_wind_speed_date + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - service: telegram_bot.send_message + data: + message: >- + New fastest wind speed recorded. Now {{ + states('input_number.highest_recorded_wind_speed') }} mph +mode: single