Skip to content

Commit

Permalink
adding garage motion sensor update
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeraman committed May 11, 2024
1 parent 4ec2599 commit 3a7b67e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
19 changes: 19 additions & 0 deletions alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,23 @@ laundry_door:
- persistent_notification
- sonos_speak

living_sliding_door:
name: "Living Sliding door is open alert"
message: "The living sliding door has been open for {{ relative_time(states.binary_sensor.living_sliding_door.last_changed) }}"
done_message: "The living sliding door was left open for more than 2 hours. But it is now closed."
entity_id: binary_sensor.living_sliding_door
state: "on" # Optional, 'on' is the default value
repeat:
- 120
- 60
can_acknowledge: true # Optional, default is true
skip_first: true # Optional, false is the default
data:
tag: living-sliding-door
notification_id: living-sliding-door
notifiers:
- phoneapps
- persistent_notification
- sonos_speak


4 changes: 2 additions & 2 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
to: 'on'
# Garage-M2
- platform: state
entity_id: binary_sensor.motion_sensor_158d0002c716d7
entity_id: binary_sensor.garage_motion_zb_1
to: 'on'
# Loundry Door
- platform: state
Expand Down Expand Up @@ -1751,7 +1751,7 @@
to: 'on'
# Garage-M2
- platform: state
entity_id: binary_sensor.motion_sensor_158d0002c716d7
entity_id: binary_sensor.garage_motion_zb_1
to: 'on'
for:
seconds: 125
Expand Down
2 changes: 0 additions & 2 deletions customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ binary_sensor.motion_sensor_158d0002c6382d:
friendly_name: Master_Shower-M
binary_sensor.motion_sensor_158d0002c716b6:
friendly_name: Living-M
binary_sensor.motion_sensor_158d0002c716d7:
friendly_name: Garage-M2
binary_sensor.door_window_sensor_158d0002c0e236:
friendly_name: Garage-Door
binary_sensor.door_window_sensor_158d0002ca3100:
Expand Down
2 changes: 1 addition & 1 deletion groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ all_motion:
garage_motion:
name: "All Garage Motion Sensors"
entities:
- binary_sensor.motion_sensor_158d0002c716d7
- binary_sensor.garage_motion_zb_1
- binary_sensor.garage_espmulti_m_2

living_kitchen_motion:
Expand Down
19 changes: 0 additions & 19 deletions sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,25 +376,6 @@
mdi:battery-charging-wireless-outline
{% endif %}
unit_of_measurement: '%'
garage_motion_2_battery:
friendly_name: Garage Motion Sensor 2 Battery
value_template: >
{% if is_state('binary_sensor.motion_sensor_158d0002c716d7', 'unknown') %}
110
{% else %}
{{ states.binary_sensor.motion_sensor_158d0002c716d7.attributes["battery_level"] | float}}
{% endif %}
icon_template: >
{% set battery_level_xod1 = states.binary_sensor.motion_sensor_158d0002c716d7.attributes.battery_level|default(0)|int %}
{% set battery_round_xod1 = (battery_level_xod1 / 10) |int * 10 %}
{% if battery_round_xod1 >= 100 or is_state('binary_sensor.motion_sensor_158d0002c716d7', 'unknown') %}
mdi:battery
{% elif battery_round_xod1 > 0 %}
mdi:battery-{{ battery_round_xod1 }}
{% else %}
mdi:battery-charging-wireless-outline
{% endif %}
unit_of_measurement: '%'
smoke_sensor_battery:
friendly_name: Smoke Sensor Battery
value_template: >
Expand Down

0 comments on commit 3a7b67e

Please sign in to comment.