1031 lines
25 KiB
YAML
1031 lines
25 KiB
YAML
- id: '1723384184613'
|
|
alias: Handy Ladegerät ausschalten
|
|
description: ''
|
|
triggers:
|
|
- value_template: '{{ (as_timestamp(now()) - as_timestamp(states.sensor.florian_handy_battery_level.last_changed))
|
|
> 1800 }}'
|
|
trigger: template
|
|
- trigger: numeric_state
|
|
entity_id:
|
|
- sensor.florian_handy_battery_level
|
|
above: 75
|
|
conditions: []
|
|
actions:
|
|
- action: switch.turn_off
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.bedroom_charger
|
|
mode: single
|
|
- id: '1723384249775'
|
|
alias: Handy Ladegerät einschalten
|
|
description: ''
|
|
triggers:
|
|
- minutes: /15
|
|
trigger: time_pattern
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.sensor.florian_handy_battery_level.last_changed))
|
|
< 1800 }}'
|
|
- condition: numeric_state
|
|
entity_id: sensor.florian_handy_battery_level
|
|
below: 75
|
|
actions:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.bedroom_charger
|
|
mode: single
|
|
- id: '1738432234464'
|
|
alias: Kiosk ON
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'on'
|
|
conditions: []
|
|
actions:
|
|
- action: light.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.kiosk_screen
|
|
mode: single
|
|
- id: '1738432355076'
|
|
alias: Kiosk OFF
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'off'
|
|
for:
|
|
hours: 0
|
|
minutes: 15
|
|
seconds: 0
|
|
conditions: []
|
|
actions:
|
|
- action: light.turn_off
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: light.kiosk_screen
|
|
mode: single
|
|
- id: '1739339209874'
|
|
alias: Luftbefeuchter nach Zeit ausschalten
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.humidifier
|
|
to: 'on'
|
|
for:
|
|
hours: 6
|
|
minutes: 0
|
|
seconds: 0
|
|
conditions: []
|
|
actions:
|
|
- action: switch.turn_off
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.humidifier
|
|
mode: single
|
|
- id: '1739637990508'
|
|
alias: Staubsauger starten wenn niemand mehr zu Hause ist
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- input_boolean.state_home
|
|
to: 'off'
|
|
conditions: []
|
|
actions:
|
|
- action: vacuum.start
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: vacuum.staubi
|
|
mode: single
|
|
- alias: bathroom_light_off
|
|
id: bathroom_light_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_bathroom_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 20
|
|
actions:
|
|
action: light.turn_off
|
|
entity_id: light.group_bathroom
|
|
- alias: bathroom_light_led_on
|
|
id: bathroom_light_led_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_bathroom_occupancy
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_light
|
|
state: 'on'
|
|
actions:
|
|
action: light.turn_on
|
|
entity_id: light.bathroom_led
|
|
- alias: bathroom_light_led_off
|
|
id: bathroom_light_led_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_bathroom_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.bathroom_led
|
|
- alias: switch_bedroom_sleep
|
|
id: switch_bedroom_sleep
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_bedroom_action
|
|
to: single_right
|
|
actions:
|
|
- action: media_player.turn_off
|
|
entity_id: media_player.schlafzimmer_tv_android
|
|
- action: input_boolean.turn_on
|
|
continue_on_error: true
|
|
entity_id: input_boolean.state_sleep
|
|
- action: script.turn_on
|
|
entity_id: script.all_off
|
|
continue_on_error: true
|
|
- delay:
|
|
seconds: 1
|
|
- wait_template: '{{ not is_state(''script.all_off'', ''on'') }}'
|
|
- action: media_player.play_media
|
|
entity_id: media_player.schlafzimmer_assistant
|
|
data_template:
|
|
media_content_id: '{{ states(''sensor.sleep_podcast'') }}'
|
|
media_content_type: rss
|
|
- alias: switch_bedroom_wakeup
|
|
id: switch_bedroom_wakeup
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_bedroom_action
|
|
to: single_left
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_sleep
|
|
- action: switch.turn_on
|
|
entity_id: switch.espresso
|
|
- action: script.music_radio_srf4
|
|
- delay:
|
|
hours: 1
|
|
- action: script.music_turn_off
|
|
- alias: switch_bedroom_sleep_light
|
|
id: switch_bedroom_sleep_light
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_bedroom_action
|
|
to: single_both
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.state_sleep
|
|
- delay:
|
|
hours: 2
|
|
- action: media_player.turn_off
|
|
entity_id: media_player.schlafzimmer_tv_android
|
|
- alias: bedroom_light_off
|
|
id: bedroom_light_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: light.light_bedroom
|
|
to: 'on'
|
|
for:
|
|
minutes: 90
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.light_bedroom
|
|
- alias: shelly_bedroom_switch_off
|
|
id: shelly_bedroom_switch_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.shelly_bedroom_input
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.light_bedroom
|
|
state: 'on'
|
|
for:
|
|
seconds: 1
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.light_bedroom
|
|
- alias: shelly_bedroom_switch_on_before_sunset
|
|
id: shelly_bedroom_switch_on_before_sunset
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.shelly_bedroom_input
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.light_bedroom
|
|
state: 'off'
|
|
for:
|
|
seconds: 1
|
|
- condition: sun
|
|
before: sunset
|
|
- condition: sun
|
|
after: sunrise
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.light_bedroom
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 226
|
|
- 145
|
|
brightness: 255
|
|
- alias: shelly_bedroom_switch_on_after_sunset
|
|
id: shelly_bedroom_switch_on_after_sunset
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.shelly_bedroom_input
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.light_bedroom
|
|
state: 'off'
|
|
for:
|
|
seconds: 1
|
|
- condition: or
|
|
conditions:
|
|
- condition: sun
|
|
after: sunset
|
|
- condition: sun
|
|
before: sunrise
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.light_bedroom
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 100
|
|
- 1
|
|
brightness: 255
|
|
- alias: cellar_charger_button_toggle
|
|
id: cellar_charger_button_toggle
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.cellar_charger_button
|
|
to: 'on'
|
|
actions:
|
|
- action: script.toggle
|
|
entity_id: script.cellar_charge
|
|
- alias: cellar_charger_stop
|
|
id: cellar_charger_stop
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: script.cellar_charge
|
|
to: 'off'
|
|
actions:
|
|
- action: script.turn_on
|
|
entity_id: script.cellar_charge_stop
|
|
- alias: cellar_charger_turn_off_time
|
|
id: cellar_charger_turn_off_time
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.cellar_charger
|
|
to: 'on'
|
|
actions:
|
|
- delay:
|
|
hours: '{{ states(''input_number.cellar_charger_hours'') }}'
|
|
- action: switch.turn_off
|
|
entity_id: switch.cellar_charger
|
|
- alias: ebike_charge_turn_off_power
|
|
id: ebike_charge_turn_off_power
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.ebike
|
|
to: 'on'
|
|
for:
|
|
minutes: 1
|
|
- trigger: state
|
|
entity_id: binary_sensor.ebike_power_outside_range
|
|
to: 'on'
|
|
for:
|
|
minutes: 1
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.ebike
|
|
state: 'on'
|
|
for:
|
|
minutes: 1
|
|
- condition: state
|
|
entity_id: binary_sensor.ebike_power_outside_range
|
|
state: 'on'
|
|
for:
|
|
minutes: 1
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.ebike
|
|
- alias: E-Bike Laden Zeitpunkt
|
|
id: ebike_laden_zeitpunkt
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.ebike_charge
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.ebike
|
|
- alias: Door Open
|
|
id: door_open
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.sensor_door_contact
|
|
to: 'on'
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.state_home
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_sleep
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_light
|
|
state: 'on'
|
|
- action: light.turn_on
|
|
entity_id: light.light_door
|
|
- action: light.turn_on
|
|
entity_id: light.floor
|
|
- alias: floor_switch_home_on
|
|
id: floor_switch_home_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 1_single
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.state_home
|
|
- alias: floor_switch_home_off
|
|
id: floor_switch_home_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 1_hold
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_home
|
|
- alias: floor_switch_sleep_on
|
|
id: floor_switch_sleep_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 2_single
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.state_sleep
|
|
- alias: floor_switch_sleep_off
|
|
id: floor_switch_sleep_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 2_hold
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_sleep
|
|
- alias: floor_switch_door_light_on
|
|
id: floor_switch_door_light_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 3_single
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.light_door
|
|
- alias: floor_switch_door_light_off
|
|
id: floor_switch_door_light_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 3_hold
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.light_door
|
|
- alias: floor_switch_tesla_climate_on
|
|
id: floor_switch_tesla_climate_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 4_single
|
|
actions:
|
|
- action: script.tesla_climate
|
|
- alias: floor_switch_tesla_climate_off
|
|
id: floor_switch_tesla_climate_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.switch_door_action
|
|
to: 4_hold
|
|
actions:
|
|
- action: climate.turn_off
|
|
target:
|
|
entity_id: climate.teshla_klima
|
|
- alias: Floor Motion ON
|
|
id: floor_motion_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.group_floor_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_light
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.floor
|
|
- alias: Floor Motion OFF
|
|
id: floor_motion_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.group_floor_motion
|
|
to: 'off'
|
|
for:
|
|
minutes: 1
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.floor
|
|
- action: light.turn_off
|
|
entity_id: light.light_door
|
|
- alias: Floor Motion ON (Sleep) -> WC
|
|
id: floor_motion_on_sleep_wc
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.group_floor_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.state_sleep
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.wc_led
|
|
- alias: Espresso OFF
|
|
id: espresso_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.espresso
|
|
to: 'on'
|
|
for:
|
|
minutes: 30
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.espresso
|
|
- alias: Espresso Heatup
|
|
id: espresso_heatup
|
|
triggers:
|
|
- trigger: numeric_state
|
|
entity_id: sensor.temperature_espresso
|
|
above: 60
|
|
- trigger: state
|
|
entity_id: switch.espresso
|
|
to: 'on'
|
|
for:
|
|
minutes: 10
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.temperature_espresso
|
|
above: 60
|
|
- condition: state
|
|
entity_id: switch.espresso
|
|
state: 'on'
|
|
for:
|
|
minutes: 10
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.espresso
|
|
- action: script.notify_google
|
|
data:
|
|
language: it
|
|
message: espresso isch fertig
|
|
message_say: espresso isch fertig
|
|
- alias: motion_on_kitchen
|
|
id: motion_on_kitchen
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_kitchen
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_light
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.kitchen_ceiling
|
|
- alias: motion_off_kitchen
|
|
id: motion_off_kitchen
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_kitchen
|
|
to: 'off'
|
|
for:
|
|
minutes: 2
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.kitchen_ceiling
|
|
- alias: motion_off_long_kitchen
|
|
id: motion_off_long_kitchen
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_kitchen
|
|
to: 'off'
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.kitchen_ceiling
|
|
- action: light.turn_off
|
|
entity_id: light.shelly_kitchen
|
|
- alias: Livingroom Motion ON and no TV
|
|
id: livingroom_motion_on_and_no_tv
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'on'
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.wohnzimmer_tv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_select.state_livingroom_light
|
|
state: Aus
|
|
actions:
|
|
- action: script.livingroom_light
|
|
data_template:
|
|
mode: '{{ states(''input_select.mode_livingroom_light'') }}'
|
|
- alias: Livingroom Motion ON
|
|
id: livingroom_motion_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_awake
|
|
state: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.livingroom_tv_relay
|
|
- alias: Livingroom Motion OFF
|
|
id: livingroom_motion_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 15
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.motion_livingroom_tuya_occupancy
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: media_player.wohnzimmer_tv
|
|
state: 'off'
|
|
actions:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.state_livingroom_light
|
|
option: Aus
|
|
- alias: Livingroom Motion OFF Long
|
|
id: livingroom_motion_off_long
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_livingroom_tuya_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 60
|
|
actions:
|
|
- action: homeassistant.turn_on
|
|
entity_id: automation.livingroom_motion_off
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.state_livingroom_light
|
|
option: Aus
|
|
- alias: livingroom_light_scene
|
|
id: livingroom_light_scene
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_select.state_livingroom_light
|
|
actions:
|
|
- if:
|
|
not:
|
|
condition: state
|
|
entity_id: input_select.state_livingroom_light
|
|
state: Aus
|
|
then:
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: input_select.mode_livingroom_light
|
|
option: '{{ states(''input_select.state_livingroom_light'') }}'
|
|
- action: '{{ "script.livingroom_light_scene_" + states(''input_select.state_livingroom_light'')
|
|
| lower }}'
|
|
- alias: wohnzimmer_tv_on
|
|
id: wohnzimmer_tv_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: media_player.wohnzimmer_tv
|
|
to: 'on'
|
|
actions:
|
|
- action: script.livingroom_light
|
|
data:
|
|
mode: TV
|
|
- action: script.receiver_on
|
|
- alias: wohnzimmer_tv_off
|
|
id: wohnzimmer_tv_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: media_player.wohnzimmer_tv
|
|
from: 'on'
|
|
actions:
|
|
- action: script.livingroom_light
|
|
data:
|
|
mode: Normal
|
|
- action: script.turn_on
|
|
entity_id: script.receiver_off
|
|
- alias: Notify Wohnzimmer CO2
|
|
id: notify_wohnzimmer_co2
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: 55
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_awake
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.netatmo_home_indoor_co2
|
|
above: 1200
|
|
below: 1500
|
|
actions:
|
|
- action: script.notify_google
|
|
data:
|
|
language: de
|
|
message: schlächti luft
|
|
message_say: schlächti luft
|
|
- alias: Notify Wohnzimmer CO2 Max
|
|
id: notify_wohnzimmer_co2_max
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: 25
|
|
- trigger: time_pattern
|
|
minutes: 50
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_awake
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.netatmo_home_indoor_co2
|
|
above: 1500
|
|
actions:
|
|
- action: script.notify_google
|
|
data:
|
|
language: de
|
|
message: du muäsch dringend lüfte
|
|
message_say: du muäsch dringend lüfte
|
|
- alias: Notify Wohnzimmer Feuchtigkeit
|
|
id: notify_wohnzimmer_feuchtigkeit
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: 56
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_awake
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.netatmo_home_indoor_humidity
|
|
below: 32
|
|
actions:
|
|
- action: script.notify_google
|
|
data:
|
|
language: de
|
|
message: trochni luft
|
|
message_say: trochni luft
|
|
- alias: workroom_motion_on
|
|
id: workroom_motion_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_office_tuya_occupancy
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.office_condition_light
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.light_office
|
|
- alias: workroom_desk_motion_on
|
|
id: workroom_desk_motion_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_office_occupancy
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_awake
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3_ambilight
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e64183a_ambilight
|
|
- condition: state
|
|
entity_id: binary_sensor.office_condition_light
|
|
state: 'on'
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e64183a
|
|
- alias: workroom_motion_off
|
|
id: workroom_motion_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_office_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 3
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_office_tuya_occupancy
|
|
to: 'off'
|
|
for:
|
|
minutes: 3
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.motion_office_occupancy
|
|
state: 'off'
|
|
for:
|
|
minutes: 3
|
|
- condition: state
|
|
entity_id: binary_sensor.motion_office_tuya_occupancy
|
|
state: 'off'
|
|
for:
|
|
minutes: 3
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.light_office
|
|
- action: light.turn_off
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3
|
|
- action: light.turn_off
|
|
entity_id: light.yeelight_lamp15_0x1e64183a
|
|
- action: light.turn_off
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3_ambilight
|
|
- action: light.turn_off
|
|
entity_id: light.yeelight_lamp15_0x1e64183a_ambilight
|
|
- alias: workroom_illuminance_high
|
|
id: workroom_illuminance_high
|
|
triggers:
|
|
- trigger: numeric_state
|
|
entity_id: sensor.motion_office_illuminance
|
|
above: 300
|
|
- trigger: numeric_state
|
|
entity_id: sensor.motion_office_tuya_illuminance
|
|
above: 2000
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.light_office
|
|
- action: light.turn_off
|
|
entity_id: light.office_tuya
|
|
- action: light.turn_off
|
|
entity_id: light.midesklamppro_80b8_mijia_desk_lamp_sw
|
|
- alias: workroom_light_bar_ambilight
|
|
id: workroom_light_bar_ambilight
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /1
|
|
- trigger: state
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3_ambilight
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3_ambilight
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{% from ''color.jinja'' import hsv_to_rgb %} {% set sensor_h
|
|
= states(''sensor.workroom_light_bar_ambilight'') | int %} {% set sensor_rgb
|
|
= hsv_to_rgb(sensor_h) | from_json %} {% set light_rgb = state_attr(''light.yeelight_lamp15_0x1e6af9d3_ambilight'',
|
|
''rgb_color'') | list %} {{ sensor_rgb != light_rgb }}
|
|
|
|
'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e6af9d3_ambilight
|
|
data_template:
|
|
brightness: 255
|
|
transition: 2
|
|
rgb_color: '{% from ''color.jinja'' import hsv_to_rgb %} {% set h = states(''sensor.workroom_light_bar_ambilight'')
|
|
| int %} {{ hsv_to_rgb(h) }}
|
|
|
|
'
|
|
- action: light.turn_on
|
|
entity_id: light.yeelight_lamp15_0x1e64183a_ambilight
|
|
data_template:
|
|
brightness: 255
|
|
transition: 2
|
|
rgb_color: '{% from ''color.jinja'' import hsv_to_rgb %} {% set h = states(''sensor.workroom_light_bar_ambilight'')
|
|
| int %} {{ hsv_to_rgb(h) }}
|
|
|
|
'
|
|
- alias: workroom_light_temp
|
|
id: workroom_light_temp
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /1
|
|
- trigger: state
|
|
entity_id: light.group_office_ceiling
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.group_office_ceiling
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ state_attr(''light.group_office_ceiling'', ''color_temp'')
|
|
| int != states(''sensor.workroom_light_temp'') | int}}'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.group_office_ceiling
|
|
data_template:
|
|
color_temp: '{{ states(''sensor.workroom_light_temp'') }}'
|
|
- alias: workroom_switch_toggle
|
|
id: workroom_switch_toggle
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.shelly_office_input
|
|
actions:
|
|
- action: light.toggle
|
|
entity_id: light.group_office_ceiling
|
|
- alias: state_home_off
|
|
id: state_home_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.state_home
|
|
to: 'off'
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_sleep
|
|
- action: script.turn_on
|
|
entity_id: script.all_off
|
|
- action: media_player.turn_off
|
|
entity_id: media_player.wohnzimmer_tv
|
|
- action: media_player.turn_off
|
|
entity_id: media_player.schlafzimmer_tv_android
|
|
- alias: state_home_on
|
|
id: state_home_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.state_home
|
|
to: 'on'
|
|
actions:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.mode_livingroom_light
|
|
option: Normal
|
|
- alias: people_home
|
|
id: people_home
|
|
triggers:
|
|
- trigger: numeric_state
|
|
entity_id: zone.home
|
|
above: 0
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.state_home
|
|
- alias: people_not_home
|
|
id: people_not_home
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: zone.home
|
|
to: '0'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.state_sleep
|
|
state: 'off'
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.state_home
|
|
- alias: Sleep ON
|
|
id: sleep_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.state_sleep
|
|
to: 'on'
|
|
actions:
|
|
- action: media_player.volume_set
|
|
entity_id: media_player.schlafzimmer_assistant
|
|
data_template:
|
|
volume_level: 0.1
|
|
- action: media_player.volume_set
|
|
entity_id: media_player.wohnzimmer_assistant
|
|
data_template:
|
|
volume_level: 0
|
|
- action: script.all_devices_off
|
|
- alias: Sleep OFF
|
|
id: sleep_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.state_sleep
|
|
to: 'off'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.state_home
|
|
state: 'on'
|
|
actions:
|
|
- action: media_player.volume_set
|
|
entity_id: media_player.schlafzimmer_assistant
|
|
data_template:
|
|
volume_level: 0.2
|
|
- action: media_player.volume_set
|
|
entity_id: media_player.wohnzimmer_assistant
|
|
data_template:
|
|
volume_level: 0.2
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.mode_livingroom_light
|
|
option: Normal
|
|
- alias: Staubi Stop
|
|
id: staubi_stop
|
|
mode: single
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.staubi_error
|
|
to: water_tank
|
|
conditions: []
|
|
actions:
|
|
- action: vacuum.stop
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: vacuum.staubi
|
|
- alias: Schlafzimmer Sunrise
|
|
id: bedroom_sunrise
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.sunrise_time
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{% set device = states.person.florian %} {% set isHome = not(
|
|
device.state == ''not_home'' and (now() - device.last_changed).total_seconds()
|
|
> 10*60*60 ) %} {{ isHome }}
|
|
|
|
'
|
|
actions:
|
|
action: script.wakeup
|
|
- alias: Sunrise Update Time
|
|
id: sunrise_update_time
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.florian_handy_next_alarm
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.florian_handy_next_alarm'') != ''unavailable''
|
|
}}'
|
|
actions:
|
|
- action: input_datetime.set_datetime
|
|
entity_id: input_datetime.sunrise_time
|
|
data_template:
|
|
datetime: '{{ (states(''sensor.florian_handy_next_alarm'') | as_datetime | as_local)
|
|
- timedelta(minutes=30) }}
|
|
|
|
'
|
|
- alias: WC Motion ON
|
|
id: wc_motion_on
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_wc
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.condition_illumninance
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.wc_led
|
|
- alias: WC Motion OFF
|
|
id: wc_motion_off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_wc
|
|
to: 'off'
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.wc_led
|
|
- alias: WC Motion OFF Long
|
|
id: wc_motion_off_long
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.motion_wc
|
|
to: 'off'
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: light.turn_off
|
|
entity_id: light.shelly_wc
|