Skip to content

Commit

Permalink
Google SDK, bugfixes, UI cleanup v2023.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzyisj committed Aug 25, 2023
1 parent 04b5745 commit b07e94e
Show file tree
Hide file tree
Showing 47 changed files with 286 additions and 265 deletions.
2 changes: 1 addition & 1 deletion .HA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023.8.3
2023.8.4
13 changes: 7 additions & 6 deletions automations/alarm/automation_alarm_disarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
to: #LOCK_USER
- Unlocked (Jason)
- Unlocked (Keypad)
- Unlocked (Sheri) #SHERI
not_from:
- unknown
- unavailable
Expand Down Expand Up @@ -163,11 +162,13 @@
data:
mode: night
else:
- service: "notify.{{ person }}"
data:
message: clear_notification
data:
tag: "{{ person }}_arriving_home"
- if: "{{ person != 'hassio' }}"
then:
- service: "notify.{{ person }}"
data:
message: clear_notification
data:
tag: "{{ person }}_arriving_home"

###############################################################################
## Alarm - Danger Warning Disarm
Expand Down
5 changes: 2 additions & 3 deletions automations/alarm/automation_alarm_kiosk_motion.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
###############################################################################
## Alarm - Kiosk Motion
## Alarm - Kiosk Motion #ISSUE triggers when dining room light turns on/off
###############################################################################
- id: alarm_kiosk_motion
alias: "[Alarm] Kiosk Motion"
description: "Send camera snapshot on kiosk motion."
max_exceeded: silent
trigger:
- #TEST enabled: false #ISSUE triggers when dining room light turns on/off
platform: state
- platform: state
entity_id: binary_sensor.kiosk_internal
to: "on"
condition:
Expand Down
1 change: 0 additions & 1 deletion automations/garage_door/automation_garage_door_open.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@
data:
message: "The garage door is open."
ignore_away: true
night_play: true
10 changes: 5 additions & 5 deletions automations/hass/automation_hass_reload_device.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################################################
## Hass - Reload Device #ISSUE devices go offline, don't reload
###############################################################################
- id: hass_reload_device
- id: hass_reload_device #TEST
alias: "[Hass] Reload Device"
description: "Reload device integration when device unavailable."
mode: parallel
Expand All @@ -13,7 +13,8 @@
- switch.refrigerator_ice_plus
- sensor.rt_ax58u_boot_time
- sensor.fire_tablet_current_page
# - binary_sensor.bathroom_flood #TEST
- calendar.jazzyisj
# - binary_sensor.bathroom_flood
# - sensor.bedroom_temperature
# - switch.garage_furnace
# - light.garage_lights
Expand All @@ -24,9 +25,8 @@
# - binary_sensor.kitchen_flood
# - sensor.living_room_temperature
# - switch.outdoor_sump
- binary_sensor.side_entrance_motion
- light.workbench_light
- calendar.jazzyisj #TEST
# - binary_sensor.side_entrance_motion
# - light.workbench_light
to:
- unknown
- unavailable
Expand Down
4 changes: 4 additions & 0 deletions automations/hass/automation_hass_update_group_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
id: startup
event: start

- platform: state
entity_id: input_boolean.startup_pending
to: "off"

- platform: event
event_type: call_service
event_data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
entity_id: "{{ trigger.entity_id }}"

###############################################################################
## Media Player Clear MASS Queue #TEST #MASS clear queues to prevent restart on wrong player
## Media Player Clear MASS Queue #MASS clear queues to prevent restart on wrong player
###############################################################################
- id: media_player_clear_mass_queue
alias: "[Media Player] Clear MASS Queue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
alias: "[Media Player] Update Group Entities"
description: "Update media player entities."
mode: restart
trace:
stored_traces: 20
trigger:
- platform: homeassistant
id: startup
event: start

- platform: state
entity_id: input_boolean.startup_pending
to: "off"

- platform: event
event_type: call_service
event_data:
Expand Down
4 changes: 2 additions & 2 deletions automations/media/tts/automation_tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
# - repeat:
# for_each: "{{ tts_players }}"
# sequence:
# - service: mass.queue_command #TEST
# - service: mass.queue_command #MASS
# data:
# player_id: "{{ tts_players[repeat.index-1] ~ '_2' }}"
# command: clear
Expand All @@ -144,7 +144,7 @@
# - service: mass.queue_command
# data:
# player_id: "{{ mass_players[repeat.index-1] }}"
# command: snapshot_restore #MASS #TODO not working
# command: snapshot_restore #MASS not working
# continue_on_error: true

- service: input_boolean.turn_off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
Jason, your mobile phone went offline at
{{ as_local(states.binary_sensor.jason_phone_connected.last_changed).strftime('%-I:%M %p') }}
{% elif t == 'alert.jason_phone_bluetooth_off' %}
Jason your mobile phone bluetooth is not connected to HASS.
{% elif t == 'alert.jason_phone_bluetooth_disconnected' %}
Jason, your phone bluetooth is off.
{% elif t == 'alert.jason_phone_bluetooth_disconnected' %}
Jason your mobile phone bluetooth is not connected to HASS.
{% elif t == 'alert.jason_phone_bluetooth_device' %}
Jason, get your shit together.
{% if is_state('binary_sensor.jason_phone_headphones_connected','on') %}
Expand Down
46 changes: 15 additions & 31 deletions automations/zwave/automation_zwave_keypress_events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,11 @@
description: "Respond to Inovelli zwave dimmer/switch keypress events."
mode: parallel
variables:
# get entity from node id, select master for bulbs, switch switch to light entity
entity: >
{% set entity = (states
|selectattr('attributes.node_id','defined')
{{ states|selectattr('attributes.node_id','defined')
|selectattr('attributes.node_id','eq',trigger.event.data['node_id'])
|map(attribute='entity_id')|join) %}
{% if is_state_attr(entity,'rgb_light','control') %}
{% set entity = states.light
|selectattr('attributes.rgb_control','defined')
|selectattr('attributes.rgb_control','eq',entity)
|selectattr('attributes.rgb_light','defined')
|selectattr('attributes.rgb_light','eq','master')
|map(attribute='entity_id')|join %}
{% endif %}
{{ entity|replace('switch.','light.') }}
timer: >
{% if is_state_attr(entity,'rgb_light','master') %}
{% set entity = state_attr(entity,'rgb_control') %}
{% endif %}
{{ entity|replace('light.','timer.')|replace('switch.','timer.') }}
|map(attribute='entity_id')|join }}
timer: "{{ 'timer.' ~ entity.split('.')[1] if entity != '' else '' }}"
key_value: "{{ trigger.event.data['value'] }}"
key_name: "{{ trigger.event.data['property_key_name'] }}"
trigger:
Expand Down Expand Up @@ -64,8 +48,18 @@
event_type: zwave_js_value_notification
event_data:
value: KeyPressed5x
condition: "{{ entity != '' }}"
action:
- if: "{{ entity == '' }}"
then:
- service: system_log.write
data:
logger: "{{ this.entity_id }}"
level: error
message: "No valid entities."

- stop: "No valid entities."
error: true

- choose:
# key held down events
- conditions: "{{ key_value == 'KeyHeldDown' and has_value(timer) }}"
Expand All @@ -91,7 +85,7 @@
# 1x up events
- conditions: "{{ key_value == 'KeyPressed' and key_name == '002' }}"
sequence:
#TEMP rgb lights turned on here until zwave group assostion
#TODO rgb lights turned on here until zwave group assostion
- if: >
{{ (is_state(entity,'on') and has_value(timer)
and now() - states[entity].last_changed > timedelta(seconds=2))
Expand Down Expand Up @@ -393,13 +387,3 @@
data:
zone: "{{ iif(entity in ['light.outside_garage_lights'],'garage','master') }}"
person: hassio

- if: "{{ entity == 'light.side_entrance_light' and not is_state('person.jason','home') }}"
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.home_override_jason

- service: input_boolean.turn_on
target:
entity_id: input_boolean.jason_home
1 change: 1 addition & 0 deletions packages/media/package_tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ input_select:
- Nabu Casa
- Google Cloud
- Piper TTS
- Broadcast

input_number:
tts_volume:
Expand Down
11 changes: 6 additions & 5 deletions packages/package_bluetooth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ device_tracker:
track_battery: true
track_battery_interval: "24:00"

- platform: custom_bluetooth_tracker #TEST
interval_seconds: 30
consider_home: 60
new_device_defaults:
track_new_devices: true
#DISABLED - just no stable
# - platform: custom_bluetooth_tracker
# interval_seconds: 30
# consider_home: 60
# new_device_defaults:
# track_new_devices: true

alert:
bluetooth_offline:
Expand Down
1 change: 0 additions & 1 deletion packages/package_climate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ homeassistant:
tts_repeat: true
tts_timeout: 60
quiet_play: true
night_play: true
save_message: true
alert: true
alert.hvac_window_door_open:
Expand Down
4 changes: 2 additions & 2 deletions packages/package_fans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ homeassistant:
type: fan

fan:
- platform: virtual #TEMP untill installed
- platform: virtual #TEMP until installed
name: "Downstairs Bathroom Fan"
speed: true
direction: false
oscillate: false

- platform: virtual #TEMP untill installed
- platform: virtual #TEMP until installed
name: "Master Bathroom Fan"
speed: true
direction: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.charlie_mealtime_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.dexter_medication_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.hot_tub_maintenance_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.jason_medication_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.maddie_mealtime_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ automation:

- wait_template: "{{ is_state('input_boolean.water_plants_active','off') }}"
timeout:
minutes: 5
minutes: 2

- if:
- condition: state
Expand Down
2 changes: 1 addition & 1 deletion packages/weather/package_weather.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ sensor:
name: " Outdoor Temperature Hourly Change"
round: 1
unit_time: h # °C/h
time_window: "00:15:00"
time_window: "00:30:00" #TEST

- platform: statistics
name: "Outdoor Temperature Daily Average"
Expand Down
4 changes: 2 additions & 2 deletions scripts/light/script_turn_light_on.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ turn_light_on:
transition: "{{ transition|default(0) }}"
continue_on_error: true

#TODO um, just last iteration? solves group issue but huh?
# only run on last iteration or timer will prevent remaining bulbs turning on
# only run on last iteration or timer will prevent remaining bulbs turning on (groups)
# activate_timer: true only used on single lights / light groups
- if: "{{ repeat.last and timer != none and (activate_timer|default(false)) }}"
then:
- service: timer.start
Expand Down
22 changes: 20 additions & 2 deletions scripts/lock/script_reset_failed_locks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,29 @@ reset_failed_locks:
|map('regex_replace',find='(.*)_door_lock_idle_hardware_status',
replace='lock.\\1_door_lock',ignorecase=False)|list }}
sequence:
- service: script.lock_entry_locks
- if:
- condition: template
value_template: "{{ locks == none or locks|count == 0 }}"
then:
- service: system_log.write
data:
logger: "{{ this.entity_id }}"
level: error
message: "No valid entities."

- stop: "No valid entities."
error: true

# toggle lock to reset state from unknown
- service: lock.unlock
data:
entity_id: "{{ locks }}"

- service: lock.lock
data:
entity_id: "{{ locks }}"

- wait_template: "{{ expand(locks)|selectattr('state','ne','locked')|list|count == 0 }}"
- wait_template: "{{ expand(locks)|selectattr('state','eq','locked')|list|count == locks|count }}"
timeout: 60

- if: "{{ wait.completed }}"
Expand Down
Loading

0 comments on commit b07e94e

Please sign in to comment.