mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-18 03:15:45 +00:00
In Bed? Turn the lights out.
This commit is contained in:
15
README.md
15
README.md
@@ -139,23 +139,8 @@ command_on: "/var/www/html/rfoutlet/codesend 4543795 -l 177 -p 0"
|
|||||||
}}'
|
}}'
|
||||||
friendly_name: 'Deadbolt Status:'
|
friendly_name: 'Deadbolt Status:'
|
||||||
|
|
||||||
|
|
||||||
#Handy Little Set trick
|
|
||||||
{% for entity_id in states.group.my_group.attributes.entity_id %}
|
|
||||||
{% set domain = entity_id.split('.')[0] %}
|
|
||||||
{% set entity = entity_id.split('.')[1] %}
|
|
||||||
Temperature: {{ states[domain][entity].attributes.temperature }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
#More handy tricks!
|
|
||||||
|
|
||||||
{% set comma = joiner(', ') %}
|
|
||||||
{%- for group in states.light|groupby('state') -%}
|
|
||||||
Lights that are {{ group.grouper|upper }}:{{ ' ' }}
|
|
||||||
{%- for entity in group.list -%}
|
|
||||||
{{ comma() }}{{ entity.name }}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -16,7 +16,13 @@
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.guest_mode
|
entity_id: input_boolean.guest_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||||
|
state: 'on'
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||||
|
state: 'on'
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.Voice_notify
|
- service: script.Voice_notify
|
||||||
data_template:
|
data_template:
|
||||||
|
Reference in New Issue
Block a user