Skip to content

Commit

Permalink
Uptdate to 2025.1.0
Browse files Browse the repository at this point in the history
- add binary_sensor.precipitation_change_alert - update templates, automations, ui
- update binary_sensor.daytime_illuminance_lights availability
- work_commute_lights script - update automations
- update windrose card config
- sensor.precipitation_type bugfix
- bugfix precipitation accum templates - state_class
- remove precipitation yesterday entities
- add wind_bearing_average
- fix weather statistics / graphs
- update climate statistics / graphs
- update light groups, illuminance lighting automation
- update automation.camera_indoor_camera_control
- bugfix script.tts_play - no mass when wan offline
- kiosk tablet media player -> kiosk speaker media player
- mass custom integration to core integration
- minor ui tweaks, bugfixes
  • Loading branch information
jazzyisj committed Dec 28, 2024
1 parent f2178ed commit 0c7af90
Show file tree
Hide file tree
Showing 153 changed files with 1,757 additions and 1,910 deletions.
2 changes: 1 addition & 1 deletion .HA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.12.5
2025.1.0b2
20 changes: 8 additions & 12 deletions automations/camera/camera_indoor_camera_control.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@
event: start

- trigger: state
entity_id: binary_sensor.wyze_integration_connected
to:
- "on"
- "off"
not_from:
- unknown
- unavailable

- trigger: state
entity_id: binary_sensor.someone_home
entity_id:
- binary_sensor.wyze_integration_connected
- binary_sensor.someone_home
- input_boolean.alarm_triggered
to:
- "on"
- "off"
Expand All @@ -43,7 +37,9 @@
then:
- stop: "No valid entities."
else:
- if: "{{ is_state('binary_sensor.someone_home', 'on') }}"
- if: >
{{ is_state('binary_sensor.someone_home', 'on')
and is_state('input_boolean.alarm_triggered', 'off') }}
then:
- action: switch.turn_off
target:
Expand All @@ -56,7 +52,7 @@
###############################################################################
## Camera - Restart Wyze
###############################################################################
- id: camera_restart_wyze
- id: camera_restart_wyze #TEST
alias: "[Camera] Restart Wyze"
description: "Restart the Wyze addon."
max_exceeded: silent
Expand Down
4 changes: 2 additions & 2 deletions automations/hass/hass_update_group_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
{{ expand(integration_entities('hassio'))
| selectattr('entity_id', 'contains', '_memory_percent')
| rejectattr('entity_id', 'in', ['sensor.home_assistant_core_memory_percent',
'sensor.home_assistant_supervisor_memory_percent', 'sensor.hass_os_memory_percent'])
'sensor.home_assistant_supervisor_memory_percent'])
| map(attribute='entity_id')
| select('has_value') | list | sort }}
Expand All @@ -94,7 +94,7 @@
{{ expand(integration_entities('hassio'))
| selectattr('entity_id', 'contains', '_cpu_percent')
| rejectattr('entity_id', 'in', ['sensor.home_assistant_core_cpu_percent',
'sensor.home_assistant_supervisor_cpu_percent', 'sensor.hass_os_cpu_percent'])
'sensor.home_assistant_supervisor_cpu_percent'])
| map(attribute='entity_id')
| select('has_value') | list | sort }}
Expand Down
47 changes: 12 additions & 35 deletions automations/light/light_illuminance_lighting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,36 +77,13 @@
- wait_template: "{{ has_value('group.lights') }}"
timeout: 300

- variables: #TODO to groups
day_lux: >
{{ expand('group.lights')
| selectattr('attributes.day_lux', 'defined')
| selectattr('attributes.day_lux', 'eq', true)
| map(attribute='entity_id') | list }}
night_lux: >
{{ expand('group.lights')
| selectattr('attributes.night_lux', 'defined')
| selectattr('attributes.night_lux', 'eq', true)
| map(attribute='entity_id') | list }}
night_lights: >
{{ expand('group.lights')
| selectattr('attributes.night', 'defined')
| selectattr('attributes.night', 'eq', true)
| map(attribute='entity_id') | list }}
away_lights: >
{{ expand('group.lights')
| selectattr('attributes.away', 'eq', true)
| map(attribute='entity_id') | list }}
night_away_lights: >
{{ expand('group.lights')
| selectattr('attributes.night', 'defined')
| selectattr('attributes.away', 'eq', true)
| selectattr('attributes.night', 'eq', true)
| map(attribute='entity_id') | list }}
timed_lights: >
{{ expand('group.lights')
| selectattr('attributes.timed', 'eq', true)
| map(attribute='entity_id') | list }}
- variables:
day_lux_lights: "{{ state_attr('group.day_lux_lights', 'entity_id') }}"
night_lux_lights: "{{ state_attr('group.night_lux_lights', 'entity_id') }}"
night_lights: "{{ state_attr('group.night_lights', 'entity_id') }}"
away_lights: "{{ state_attr('group.away_lights', 'entity_id') }}"
night_away_lights: "{{ state_attr('group.night_away_lights', 'entity_id') }}"
timed_lights: "{{ state_attr('group.timed_lights', 'entity_id') }}"

- if:
- condition: trigger
Expand All @@ -127,12 +104,12 @@

- action: script.turn_light_on
data:
lights: "{{ day_lux }}"
lights: "{{ day_lux_lights }}"
activate_timer: false
else:
- action: script.turn_light_off
data:
lights: "{{ day_lux }}"
lights: "{{ day_lux_lights }}"
activate_timer: false
else:
- if:
Expand Down Expand Up @@ -210,7 +187,7 @@
# turn on night lights
- action: script.turn_light_on
data:
lights: "{{ night_lux }}"
lights: "{{ night_lux_lights }}"
activate_timer: false
else:
- if:
Expand All @@ -228,7 +205,7 @@
# turn on day lights
- action: script.turn_light_on
data:
lights: "{{ day_lux }}"
lights: "{{ day_lux_lights }}"
activate_timer: false

- if: "{{ trigger.id in ['night_lux', 'wake'] }}"
Expand All @@ -238,7 +215,7 @@
data:
lights: >
{{ expand('group.lights')
| rejectattr('entity_id', 'in', day_lux)
| rejectattr('entity_id', 'in', day_lux_lights)
| rejectattr('entity_id', 'in', timed_lights)
| selectattr('state', 'eq', 'on')
| map(attribute='entity_id') | list }}
Expand Down
53 changes: 53 additions & 0 deletions automations/light/light_update_group_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,59 @@
| rejectattr('attributes.rgb_light', 'in', ['control', 'slave'])
| map(attribute='entity_id') | list | sort }}
- action: group.set
data:
object_id: day_lux_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.day_lux', 'defined')
| selectattr('attributes.day_lux', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: night_lux_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.night_lux', 'defined')
| selectattr('attributes.night_lux', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: night_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.night', 'defined')
| selectattr('attributes.night', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: away_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.away', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: night_away_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.night', 'defined')
| selectattr('attributes.away', 'eq', true)
| selectattr('attributes.night', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: timed_lights
entities: >
{{ expand('group.lights')
| selectattr('attributes.timed', 'eq', true)
| map(attribute='entity_id') | list }}
- action: group.set
data:
object_id: light_timers
Expand Down
63 changes: 44 additions & 19 deletions automations/light/lights/light_dining_room_light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
entity_id: input_boolean.alarm_triggered
state: "off"

- condition: state
entity_id: timer.dining_room_light
state: idle

- condition: template
value_template: "{{ iif(trigger.id == 'player', is_state('input_boolean.media_color_light_sync', 'on'), true) }}"

Expand All @@ -59,30 +63,51 @@
{% endif %}
actions:
- if:
- condition: state
entity_id: binary_sensor.nighttime_illuminance_lights
state: "off"
then:
- action: script.turn_light_on
data:
lights: light.dining_room_light_rgb
activate_timer: false
profile: default_min
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.work_commute_active
state: "on"

- action: light.turn_off
target:
entity_id: light.dining_room_light_rgb
- condition: state
entity_id: alert.work_commute_jason
state: "on"

- condition: state
entity_id: alert.late_for_work_jason
state: "on"
then:
- action: script.work_commute_lights
else:
- if: "{{ is_state('switch.adaptive_lighting_rgb_lights', 'off') }}"
- if:
- condition: state
entity_id: binary_sensor.nighttime_illuminance_lights
state: "off"

- condition: state
entity_id: binary_sensor.daytime_illuminance_lights
state: "off"
then:
- action: script.turn_light_on
data:
lights: light.dining_room_light_rgb
activate_timer: false
profile: default
profile: default_min # reset color

- action: light.turn_off
target:
entity_id: light.dining_room_light_rgb
else:
- action: adaptive_lighting.set_manual_control
data:
entity_id: switch.adaptive_lighting_rgb_lights
lights: light.dining_room_light_rgb
manual_control: false
- if: "{{ is_state('switch.adaptive_lighting_rgb_lights', 'off') }}"
then:
- action: script.turn_light_on
data:
lights: light.dining_room_light_rgb
activate_timer: false
profile: default
else:
- action: adaptive_lighting.set_manual_control
data:
entity_id: switch.adaptive_lighting_rgb_lights
lights: light.dining_room_light_rgb
manual_control: false
4 changes: 2 additions & 2 deletions automations/media/media_player/media_player_idle_player.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
triggers:
- trigger: state
entity_id:
- media_player.hass_media_player_2
- media_player.kiosk_tablet_2
- media_player.hass_media_player_mass
- media_player.kiosk_speaker_mass
to: idle
for:
seconds: 60 # allow brief disconnections without stopping media
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
- trigger: state
entity_id: &problem_players
- media_player.office_tv #ISSUE goes offline regularly
- media_player.kiosk_tablet #ISSUE goes offline regularly
- media_player.kiosk_speaker #ISSUE goes offline regularly
to:
- unknown
- unavailable
Expand Down
2 changes: 1 addition & 1 deletion automations/media/media_preset/media_play_error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- action: script.tts_play
data:
message: "The selected media has failed to play. Is Music Assistant offline?"
media_player: media_player.kiosk_tablet
media_player: media_player.kiosk_speaker
volume: 75
quiet_play: true
continue_on_error: true
Expand Down
2 changes: 1 addition & 1 deletion automations/network/network_wan_down.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mode: restart
triggers:
- trigger: state
entity_id: binary_sensor.wan
entity_id: binary_sensor.wan_offline_alert
to:
- "on"
- "off"
Expand Down
Loading

0 comments on commit 0c7af90

Please sign in to comment.