I had trouble searching for this so please excuse me if this has been posted before. If it has please link the thread. I think the common terms gave me a lot of noisy hits that wasn’t what I was attempting to do.
First off, I don’t know the best way to achieve what I am trying to do. I tried messing with the binary_sensor template and the tap_action on the card. Mainly cause I don’t know how to achieve my goal.
So what am I trying to do?
Here is a glance card. As you can see a window is open! But which one is open?
Here is my YAML:
binary_sensor:
- platform: template
sensors:
window_status:
friendly_name: "Windows"
entity_id:
- binary_sensor.front_window_n_contact
- binary_sensor.bedroom_window_2_contact
- binary_sensor.dining_room_s_window_contact
- binary_sensor.front_window_1_contact
- binary_sensor.bedroom_window_wn_contact
- binary_sensor.nursery_window_n_contact
- binary_sensor.nursery_window_1_contact
- binary_sensor.office_left_window_contact
- binary_sensor.dining_room_n_window_contact
- binary_sensor.bedroom_window_1_contact
- binary_sensor.office_window_right_contact
device_class: window
value_template: "{{ expand('group.window_all_status') | selectattr('state','eq','on') | list | count > 0 }}"
When you click on the window icon, you get the above information, which is not helpful.
The window is a binary_sensor, which results in a pretty window icon that changes states when a windows out of the group of windows are open or not.
I can use my window group! So when you click on the window group, you get a lovely list of what windows are open or closed.
Here is my YAML:
window_all_status:
entities:
- binary_sensor.front_window_n_contact
- binary_sensor.bedroom_window_2_contact
- binary_sensor.dining_room_s_window_contact
- binary_sensor.front_window_1_contact
- binary_sensor.bedroom_window_wn_contact
- binary_sensor.nursery_window_n_contact
- binary_sensor.nursery_window_1_contact
- binary_sensor.office_left_window_contact
- binary_sensor.dining_room_n_window_contact
- binary_sensor.bedroom_window_1_contact
- binary_sensor.office_window_right_contact
But this info isn’t easy to tell at a glance what is going on. I don’t have an informative open/closed status to quickly assess the status of the windows unless I click on the group to see which ones are open.
I am not wanting to use both on my dashboard but I am willing to explore other options.
I would love to have the binary_sensor icon (with color change and showing the status) where clicking on the icon gives the full list of the windows in the group.
Can this be done?
Thanks for any help or direction!