#Licht
#Wenn Tuersensor unter 480 lux ist, es zwischen 16 und 23:30 Uhr ist und ich zuhause bin, Licht anschalten
– alias: <480 lux Licht an (16-23:30 Uhr)
initial_state: ‚on‘
trigger:
platform: numeric_state
entity_id: sensor.fibaro_zwave_motion_sensor_2_luminance
below: 480
condition:
condition: and
conditions:
– condition: state
entity_id: input_boolean.xxxxx
state: ‚on‘
– condition: time
after: ’16:00:00′
before: ’23:30:00′
action:
service: homeassistant.turn_on
entity_id: light.deckenlampe
data:
brightness: 255
rgb_color: [255, 255, 255]
#Wenn Licht an ist, es 23:30 uhr ist, pc aus ist und ich zuhause bin, Licht dimmen
– alias: 23:30 Uhr Licht dimmen
initial_state: ‚on‘
trigger:
platform: time
at: ’23:30:00′
condition:
condition: and
conditions:
– condition: state
entity_id: input_boolean.xxxxx
state: ‚on‘
– condition: state
entity_id: light.deckenlampe
state: ‚on‘
– condition: state
entity_id: switch.computer
state: ‚off‘
action:
service: homeassistant.turn_on
entity_id: light.deckenlampe
data:
brightness: 15
rgb_color: [255, 255, 255]
#Wenn PC aus, es nach 23:30 uhr vor 6uhr ist, ich zuhause bin und Licht an ist, Licht dimmen
– alias: PC aus Licht dimmen (23:30 – 6:00 Uhr)
initial_state: ‚on‘
trigger:
platform: state
entity_id: switch.computer
to: ‚off‘
condition:
condition: and
conditions:
– condition: time
after: ’23:30:00′
before: ’06:00:00′
– condition: state
entity_id: input_boolean.xxxxx
state: ‚on‘
– condition: state
entity_id: light.deckenlampe
state: ‚on‘
action:
service: homeassistant.turn_on
entity_id: light.deckenlampe
data:
brightness: 15
rgb_color: [255, 255, 255]
#Wenn ich nach Hause komme, überprüfe ob Helligkeit unter 480 lux ist
– alias: <480 lux Licht an (16-23:30 Uhr) V.2
initial_state: ‚on‘
trigger:
platform: state
entity_id: input_boolean.xxxxx
to: ‚on‘
condition:
condition: and
conditions:
– condition: numeric_state
entity_id: sensor.fibaro_zwave_motion_sensor_2_luminance
below: 480
– condition: time
after: ’16:00:00′
before: ’23:30:00′
action:
service: homeassistant.turn_on
entity_id: light.deckenlampe
data:
brightness: 255
rgb_color: [255, 255, 255]
#Wenn ich nach 23:30 Hause komme überprüfen ob es unter 480 lux ist und Licht dimmen
– alias: <480 lux Licht an gedimmt (23:30 – 06:00 Uhr) V.2
initial_state: ‚on‘
trigger:
platform: state
entity_id: input_boolean.xxxxx
to: ‚on‘
condition:
condition: and
conditions:
– condition: numeric_state
entity_id: sensor.fibaro_zwave_motion_sensor_2_luminance
below: 480
– condition: time
after: ’23:30:00′
before: ’06:00:00′
action:
service: homeassistant.turn_on
entity_id: light.deckenlampe
data:
brightness: 15
rgb_color: [255, 255, 255]
#Licht aus, wenn Fernseher und pc aus, zwischen 23 und 6 Uhr
– alias: Licht aus, wenn Fernseher aus (23-6Uhr)
initial_state: ‚on‘
trigger:
– platform: state
entity_id: media_player.panasonic_viera_tv
to: ‚off‘
condition:
condition: and
conditions:
– condition: time
after: ’23:00:00′
before: ’06:00:00′
– condition: state
entity_id: switch.computer
state: ‚off‘
action:
service: light.turn_off
entity_id: light.deckenlampe
#Deckenlampe aus, wenn ich weg bin
– alias: Licht aus, wenn ich weg bin
initial_state: ‚on‘
trigger:
platform: state
entity_id: input_boolean.xxxxx
to: ‚off‘
action:
service: light.turn_off
entity_id: light.deckenlampe