Created
May 7, 2024 22:15
-
-
Save OACDesigns/3231a08010c512ad99fff19f4b6fe49a to your computer and use it in GitHub Desktop.
Home Assistant Template Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------- | |
List lights in an area: | |
---------------------------- | |
Entity IDs: | |
{{ | |
states.light | |
| selectattr('entity_id', 'in', area_entities('living_room')) | |
| rejectattr('attributes.is_hue_group', 'defined') | |
| map(attribute='entity_id') | |
| list | join(',') | |
}} | |
Friendly Name: | |
{{ | |
states.light | |
| selectattr('entity_id', 'in', area_entities('office')) | |
| rejectattr('attributes.is_hue_group', 'defined') | |
| map(attribute='attributes.friendly_name') | |
| list | join(',') | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment