You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I'd just like to say how much of a help your configuration repo has been for me as I've built out automation within my system. Truly excellent work!
I've expanded a bit on your room presence methods to what currently seems like a better fit (at least for my use case), that might be helpful to yourself or others.
I started with creating a room_presence binary sensor for every single room in the house. Each of these template sensors is able to use different rules to determine state.
For example, here's the binary sensor template for my master bedroom:
room_presence_master_bedroom:
friendly_name: "Room Presence Master Bedroom"
device_class: occupancy
value_template: >-
{% if is_state('switch.master_bedroom_do_not_disturb_switch', 'on') or
not is_state('media_player.tv_master_bedroom', 'off') or
is_state('switch.master_bedroom_main_lights', 'on') %}
on
{% else %}
off
{% endif %}
Rules are pretty simple, do not disturb is turned on via automation when I go to sleep and turned off via automation when I get up, otherwise it's always off, so pretty safe bet that do not disturb means I'm in bed and room is occupied. The FireTV in the bedroom is only ever on when someone is in there, so another safe bet, same with the lights.
vs the kitchen which has a motion sensor:
room_presence_kitchen:
friendly_name: "Room Presence Kitchen"
device_class: occupancy
value_template: >-
{% if is_state('binary_sensor.kitchen_occupancy', 'on') or
is_state('binary_sensor.garage_interior_door_contact', 'on') %}
on
{% else %}
off
{% endif %}
In the kitchen on the other hand, I have a motion sensor to automate lighting and a contact sensor on door that enters garage. This motion sensor has a very short reset of only 1 minute as kitchen tends to be a transit room for my family.
Binary sensors for all other rooms have similar rule sets either based on behaviors (ie. TV on), motion, or door contact sensors (bathroom light on and door closed is occupied else clear).
From there I have an overall room_presence template sensor which prioritizes Alexa media players based on these sensors:
Here though, I went an additional step further. I have a series of helper scripts for Alexa TTS depending on desired behavior. If I just want to have Alexa deliver a message to a single room with highest priority I use an "Alexa Speech" script:
I tend to use this only for individual personalized TTS like a good morning report to my bedroom, or a good morning announcement in the kitchen on first occupancy detection.
However, in some cases I'd like Alexa to deliver a message to all media players where room presence is detected. In that case I have an "Alexa Announce" helper script:
The announce script provides an entity list to notify.alexa_media for each room where presence is currently detected. I use this for more generalized announcements like laundry being finished.
The one thing I haven't yet incorporated is logic for last_called and last_called_timestamp, however my plan is to integrate that into either the overall sensor.room_presence and/or each individual room where an Echo is located.
The text was updated successfully, but these errors were encountered:
Thanks for helping make this code better! This is the place to request enhancements, ask questions and other things. You can also ask questions via twitter or https://jeffreystone.net
First, I'd just like to say how much of a help your configuration repo has been for me as I've built out automation within my system. Truly excellent work!
I've expanded a bit on your room presence methods to what currently seems like a better fit (at least for my use case), that might be helpful to yourself or others.
I started with creating a room_presence binary sensor for every single room in the house. Each of these template sensors is able to use different rules to determine state.
For example, here's the binary sensor template for my master bedroom:
Rules are pretty simple, do not disturb is turned on via automation when I go to sleep and turned off via automation when I get up, otherwise it's always off, so pretty safe bet that do not disturb means I'm in bed and room is occupied. The FireTV in the bedroom is only ever on when someone is in there, so another safe bet, same with the lights.
vs the kitchen which has a motion sensor:
In the kitchen on the other hand, I have a motion sensor to automate lighting and a contact sensor on door that enters garage. This motion sensor has a very short reset of only 1 minute as kitchen tends to be a transit room for my family.
Binary sensors for all other rooms have similar rule sets either based on behaviors (ie. TV on), motion, or door contact sensors (bathroom light on and door closed is occupied else clear).
From there I have an overall room_presence template sensor which prioritizes Alexa media players based on these sensors:
Here though, I went an additional step further. I have a series of helper scripts for Alexa TTS depending on desired behavior. If I just want to have Alexa deliver a message to a single room with highest priority I use an "Alexa Speech" script:
I tend to use this only for individual personalized TTS like a good morning report to my bedroom, or a good morning announcement in the kitchen on first occupancy detection.
However, in some cases I'd like Alexa to deliver a message to all media players where room presence is detected. In that case I have an "Alexa Announce" helper script:
The announce script provides an entity list to
notify.alexa_media
for each room where presence is currently detected. I use this for more generalized announcements like laundry being finished.The one thing I haven't yet incorporated is logic for
last_called
andlast_called_timestamp
, however my plan is to integrate that into either the overallsensor.room_presence
and/or each individual room where an Echo is located.The text was updated successfully, but these errors were encountered: