mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Improve speech. Group lights and windows
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
>-
|
||||
|
||||
{%- if is_state('light.living_room_all_lights', 'on') -%}
|
||||
There are
|
||||
{%- if is_state('light.all_lights', 'on') -%}
|
||||
There are
|
||||
{%- for state in states.light if state.state == 'on' -%}
|
||||
{%if loop.last %} {{ loop.index }} {% endif %}
|
||||
{% if loop.last %} {{ loop.index }} {% endif %}
|
||||
{%- endfor -%}
|
||||
lights on right now.
|
||||
lights turned on right now.
|
||||
{%- else -%}
|
||||
There are no lights on right now.
|
||||
There are no lights turned on right now.
|
||||
{%- endif -%}
|
||||
|
||||
3
templates/partials/time.yaml
Normal file
3
templates/partials/time.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
>-
|
||||
|
||||
The time is {{ now().hour }} {{ "%0.02d" | format(now().strftime("%-M") | int) }}.
|
||||
@@ -1,9 +1,12 @@
|
||||
>-
|
||||
|
||||
{%- if is_state('binary_sensor.living_room_right_window_on_off', 'on') -%}
|
||||
The living room window is opened.
|
||||
{%- endif -%}
|
||||
|
||||
{%- if is_state('binary_sensor.bedroom_right_window_on_off', 'on') -%}
|
||||
The master bedroom window is opened.
|
||||
{%- if is_state('group.all_windows', 'on') -%}
|
||||
{%- if is_state('binary_sensor.living_room_right_window_on_off', 'on') -%}
|
||||
The living room window is opened.
|
||||
{%- endif -%}
|
||||
{%- if is_state('binary_sensor.bedroom_right_window_on_off', 'on') -%}
|
||||
The master bedroom window is opened.
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
All windows are closed.
|
||||
{%- endif -%}
|
||||
|
||||
Reference in New Issue
Block a user