Skip to content

Commit

Permalink
feat: migrate temperature automations to new outdoor sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
TribuneX committed Jun 30, 2024
1 parent c0a231d commit 98a4b8f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 28 deletions.
4 changes: 2 additions & 2 deletions automation/alarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
minutes: 20
condition:
- condition: numeric_state
entity_id: sensor.openweathermap_temperature
entity_id: sensor.outdoor_temperature
below: 10
action:
- service: notify.devices_user_1
Expand All @@ -260,7 +260,7 @@
minutes: 20
condition:
- condition: numeric_state
entity_id: sensor.openweathermap_temperature
entity_id: sensor.outdoor_temperature
below: 10
action:
- service: notify.devices_user_1
Expand Down
4 changes: 2 additions & 2 deletions automation/covers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
initial_state: "on"
trigger:
- platform: numeric_state
entity_id: sensor.openweathermap_temperature
entity_id: sensor.outdoor_temperature
above: 25
- platform: state
entity_id: group.personen
Expand Down Expand Up @@ -138,7 +138,7 @@
after: "10:00"
before: "20:00"
- condition: numeric_state
entity_id: sensor.openweathermap_temperature
entity_id: sensor.outdoor_temperature
below: 25
action:
- service: script.open_front_covers
Expand Down
14 changes: 7 additions & 7 deletions automation/environment/temperature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
trigger:
- platform: numeric_state
entity_id: sensor.out_vs_in
above: 2
above: 0
condition:
condition: and
conditions:
- condition: state
entity_id: device_tracker.batphone
entity_id: group.personen
state: "home"
- condition: numeric_state
entity_id: "sensor.openweathermap_temperature"
entity_id: "sensor.outdoor_temperature"
above: "20"
- condition: state
entity_id: binary_sensor.balcony_door
Expand All @@ -20,7 +20,7 @@
- service: notify.devices_user_1
data:
title: "Doors"
message: "Close the balcony door, since it is {{states.sensor.out_vs_in.state}}°C outside."
message: "Close the living room doors, since it is {{states('sensor.out_vs_in')}}°C warmer outside."

- alias: "Temperature: Colder outside"
initial_state: "on"
Expand All @@ -32,10 +32,10 @@
condition: and
conditions:
- condition: state
entity_id: device_tracker.batphone
entity_id: group.personen
state: "home"
- condition: numeric_state
entity_id: "sensor.openweathermap_temperature"
entity_id: "sensor.outdoor_temperature"
above: "20"
- condition: state
entity_id: binary_sensor.balcony_door
Expand All @@ -44,7 +44,7 @@
- service: notify.devices_user_1
data:
title: "Doors"
message: "Open the balcony door, since it is {{states.sensor.out_vs_in.state}}°C colder outside."
message: "Open the balcony door, since it is {{states('sensor.out_vs_in')}}°C colder outside."

- alias: "Humidity warning"
initial_state: "on"
Expand Down
8 changes: 0 additions & 8 deletions includes/customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ sensor.server:
icon: mdi:server
sensor.mein_schiff_ostsee:
icon: mdi:ferry
sensor.dark_sky_daily_high_temperature:
friendly_name: High Outdoor
sensor.dark_sky_daily_low_temperature:
friendly_name: Low Outdoor
sensor.dark_sky_summary:
friendly_name: Summary
sensor.dark_sky_precip_intensity:
friendly_name: Rain
sensor.fritz_netmonitor:
friendly_name: FritzBox
icon: mdi:router-wireless
Expand Down
5 changes: 0 additions & 5 deletions includes/exclude.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ entities:
- sensor.network_in_eth0
- sensor.network_out_eth0
- sensor.out_vs_in
- sensor.dark_sky_summary
- sensor.dark_sky_hourly_summary
- sensor.dark_sky_cloud_coverage
- sensor.dark_sky_daily_high_temperature
- sensor.dark_sky_daily_low_temperature
- sensor.tribunex_home_assistant_last_build_state
- sensor.illumination_gateway
- sensor.palme_battery
Expand Down
1 change: 0 additions & 1 deletion includes/groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ docker_container:
temperature:
name: "Temperature"
entities:
- sensor.openweathermap_temperature
- sensor.office_temperature
- sensor.bath_temperature
- sensor.bedroom_temperature
Expand Down
4 changes: 2 additions & 2 deletions includes/scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ open_all_covers:
cover_name: cover.livingroom_front
- if:
- condition: numeric_state
entity_id: "sensor.openweathermap_temperature"
entity_id: "sensor.outdoor_temperature"
below: "20"
then:
- service: script.open_single_cover
Expand Down Expand Up @@ -250,7 +250,7 @@ close_all_covers:
close_front_covers:
sequence:
- condition: numeric_state
entity_id: sensor.openweathermap_temperature
entity_id: sensor.outdoor_temperature
above: 25
- condition: template
value_template: '{{ state_attr("cover.front", "current_position") == 100 }}'
Expand Down
2 changes: 1 addition & 1 deletion includes/sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
sensors:
# Inspired by https://community.home-assistant.io/t/temp-compare/19497
out_vs_in:
value_template: "{{states.sensor.openweathermap_temperature.state | round(0) - states.sensor.temperature_livingroom.state | round(0)}}"
value_template: "{{ (states('sensor.outdoor_temperature') | float) - (states('sensor.livingroom_temperature') | float) }}"
friendly_name: "Temperature Diff"

robo:
Expand Down

0 comments on commit 98a4b8f

Please sign in to comment.