add condition in good_morning_script
This commit is contained in:
parent
796dd726fa
commit
ce118a83f6
|
|
@ -0,0 +1,5 @@
|
|||
# switch als Licht einbinden, so dass eine Grupperung als light möglich ist
|
||||
# https://community.home-assistant.io/t/light-groups-making-me-crazy/180978/6
|
||||
platform: switch
|
||||
name: Stallampen außen
|
||||
entity_id: switch.stalllicht_aussen_vorraum
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
id: 5b0bcfe4-0225-4267-afdc-af4ef5a53d49
|
||||
name: "Taglicht"
|
||||
icon: mdi:weather-sunny
|
||||
entities:
|
||||
light.attic_ceiling_spots:
|
||||
state: "on"
|
||||
color_temp: 154 # https://www.home-assistant.io/integrations/light/
|
||||
brightness: 255
|
||||
light.wohnzimmerlichter:
|
||||
state: "off"
|
||||
light.stricklicht:
|
||||
state: "off"
|
||||
light.esszimmerlichter:
|
||||
state: "off"
|
||||
light.kitchenlights:
|
||||
state: "off"
|
||||
switch.metered_wall_plug_switch_node4:
|
||||
state: "on"
|
||||
light.licht_buero_regal:
|
||||
state: "off"
|
||||
light.licht_buero_decke:
|
||||
state: "off"
|
||||
|
|
@ -1,9 +1,27 @@
|
|||
# https://www.home-assistant.io/integrations/script
|
||||
alias: Skript Guten Morgen
|
||||
variables:
|
||||
scene_to_start: >
|
||||
{% if now().hour > 5 and now().hour < 12 -%}
|
||||
"scene.attic_breakfast_time"
|
||||
{%- else -%}
|
||||
"scene.taglicht"
|
||||
{%- endif %}
|
||||
|
||||
sequence:
|
||||
- service: notify.dev_telegram
|
||||
data:
|
||||
message: >-
|
||||
Aktuelle Szene für Guten-Morgen: "{{ scene_to_start }}"
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.attic_breakfast_time
|
||||
data_template:
|
||||
entity_id: >
|
||||
{% if now().hour > 5 and now().hour < 12 %}
|
||||
scene.attic_breakfast_time
|
||||
{% else %}
|
||||
scene.taglicht
|
||||
{% endif %}
|
||||
|
||||
- delay: "00:01:00"
|
||||
- service: script.turn_on
|
||||
entity_id: script.sonos_group_livingroom
|
||||
|
|
|
|||
Loading…
Reference in New Issue