1288 lines
34 KiB
YAML
1288 lines
34 KiB
YAML
- id: '0101'
|
|
alias: Action - Lock hallway front door
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: lock_hallway_front_door_lock
|
|
actions:
|
|
action: lock.lock
|
|
target:
|
|
entity_id: lock.hallway_front_door_lock
|
|
- id: '0102'
|
|
alias: Action - Unlock hallway front door
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: unlock_hallway_front_door_lock
|
|
conditions:
|
|
condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: disarmed
|
|
actions:
|
|
action: lock.unlock
|
|
target:
|
|
entity_id: lock.hallway_front_door_lock
|
|
- id: '0103'
|
|
alias: Action - Acknowledge basement water leakage
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: acknowledge_basement_water_leakage
|
|
actions:
|
|
action: alert.turn_off
|
|
target:
|
|
entity_id: alert.basement_water_leakage
|
|
- id: '0104'
|
|
alias: Action - Acknowledge kitchen water leakage
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: acknowledge_kitchen_water_leakage
|
|
actions:
|
|
action: alert.turn_off
|
|
target:
|
|
entity_id: alert.kitchen_water_leakage
|
|
- id: '0105'
|
|
alias: Action - FGH47K Restart charging
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: fgh47k_restart_charging
|
|
actions:
|
|
action: switch.turn_on
|
|
target:
|
|
entity_id: switch.fgh47k_charging
|
|
- id: '0106'
|
|
alias: Action - Turn on vacation mode
|
|
triggers:
|
|
trigger: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: turn_on_vacation_mode
|
|
actions:
|
|
action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.vacation_mode
|
|
- id: '0201'
|
|
alias: Appliance - Notify and turn off shut-off valve when dishwasher is done
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.kitchen_dishwasher_operation_state
|
|
from: BSH.Common.EnumType.OperationState.Run
|
|
to: BSH.Common.EnumType.OperationState.Finished
|
|
actions:
|
|
- action: notify.home_mobile_apps
|
|
data_template:
|
|
title: HalloNET Home
|
|
message: The dishwasher is done.
|
|
data:
|
|
channel: Appliance
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.kitchen_dishwasher_shutoff_valve
|
|
- id: '0202'
|
|
alias: Appliance - Notify on high freezer temperature
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.kitchen_freezer_temperature
|
|
above: -10
|
|
for:
|
|
minutes: 20
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data_template:
|
|
title: HalloNET Home
|
|
message: Freezer temperature is too high!
|
|
data:
|
|
channel: Appliance
|
|
- id: '0203'
|
|
alias: Appliance - Notify on high fridge temperature
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.kitchen_fridge_temperature
|
|
above: 15
|
|
for:
|
|
minutes: 10
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data_template:
|
|
title: HalloNET Home
|
|
message: Fridge temperature is too high!
|
|
data:
|
|
channel: Appliance
|
|
- id: '0204'
|
|
alias: Appliance - Start dishwasher
|
|
triggers:
|
|
trigger: state
|
|
entity_id: switch.kitchen_dishwasher_shutoff_valve
|
|
from: 'off'
|
|
to: 'on'
|
|
conditions:
|
|
condition: state
|
|
entity_id: sensor.kitchen_dishwasher_operation_state
|
|
state: BSH.Common.EnumType.OperationState.Ready
|
|
actions:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: select.kitchen_dishwasher_program
|
|
data:
|
|
option: Dishcare.Dishwasher.Program.Intensiv70
|
|
- action: button.press
|
|
target:
|
|
entity_id: button.kitchen_dishwasher_start
|
|
- id: '0301'
|
|
alias: Climate - Start heating when cold
|
|
triggers:
|
|
trigger: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
< (states.input_number.living_room_hvac_target.state | float - 0.5 | float)
|
|
}}'
|
|
for:
|
|
minutes: 30
|
|
conditions:
|
|
condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: 'off'
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
hvac_mode: heat
|
|
- delay:
|
|
seconds: 5
|
|
- action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
temperature: '{{ states.input_number.living_room_hvac_target.state | float -
|
|
states.input_number.living_room_hvac_offset.state | float }}'
|
|
- delay:
|
|
seconds: 5
|
|
- action: climate.set_fan_mode
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
fan_mode: low
|
|
- id: '0302'
|
|
alias: Climate - Start cooling when warm
|
|
triggers:
|
|
trigger: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
> (states.input_number.living_room_hvac_target.state | float + 0.5 | float)
|
|
}}'
|
|
for:
|
|
minutes: 30
|
|
conditions:
|
|
- condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'off'
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
hvac_mode: cool
|
|
- delay:
|
|
seconds: 5
|
|
- action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
temperature: '{{ states.input_number.living_room_hvac_target.state | float +
|
|
states.input_number.living_room_hvac_offset.state | float }}'
|
|
- delay:
|
|
seconds: 5
|
|
- action: climate.set_fan_mode
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
fan_mode: auto
|
|
- id: '0303'
|
|
alias: Climate - Change temperature heat
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_number.living_room_hvac_target
|
|
- trigger: state
|
|
entity_id: input_number.living_room_hvac_offset
|
|
conditions:
|
|
condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: heat
|
|
actions:
|
|
action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
temperature: '{{ states.input_number.living_room_hvac_target.state | float -
|
|
states.input_number.living_room_hvac_offset.state | float }}'
|
|
- id: '0304'
|
|
alias: Climate - Change temperature cool
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_number.living_room_hvac_target
|
|
- trigger: state
|
|
entity_id: input_number.living_room_hvac_offset
|
|
conditions:
|
|
condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: cool
|
|
actions:
|
|
action: climate.set_temperature
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
data:
|
|
temperature: '{{ states.input_number.living_room_hvac_target.state | float +
|
|
states.input_number.living_room_hvac_offset.state | float }}'
|
|
- id: '0305'
|
|
alias: Climate - Stop heating when warm
|
|
triggers:
|
|
trigger: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
> (states.input_number.living_room_hvac_target.state | float + 0.5 | float)
|
|
}}'
|
|
for:
|
|
minutes: 15
|
|
conditions:
|
|
condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: heat
|
|
actions:
|
|
action: climate.turn_off
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
- id: '0306'
|
|
alias: Climate - Stop cooling when cold
|
|
triggers:
|
|
trigger: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
< (states.input_number.living_room_hvac_target.state | float - 0.5 | float)
|
|
}}'
|
|
for:
|
|
minutes: 15
|
|
conditions:
|
|
condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: cool
|
|
actions:
|
|
action: climate.turn_off
|
|
target:
|
|
entity_id: climate.living_room_hvac
|
|
- id: '0307'
|
|
alias: Climate - Report bedroom external temp
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.bedroom_temperature
|
|
- trigger: time_pattern
|
|
minutes: /5
|
|
actions:
|
|
action: number.set_value
|
|
data:
|
|
entity_id: number.bedroom_radiator_external_temperature
|
|
value: '{{ states(''sensor.bedroom_temperature'') | float * 100 }}'
|
|
- id: 0308
|
|
alias: Climate - Report Lovelia's room external temp
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.lovelias_room_temperature
|
|
- trigger: time_pattern
|
|
minutes: /5
|
|
actions:
|
|
action: number.set_value
|
|
data:
|
|
entity_id: number.lovelias_room_radiator_external_temperature
|
|
value: '{{ states(''sensor.lovelias_room_temperature'') | float * 100 }}'
|
|
- id: '0401'
|
|
alias: Lighting - Turn on outdoor lights at sunset
|
|
triggers:
|
|
trigger: sun
|
|
event: sunset
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id: group.outdoor_comfort_lights
|
|
- id: '0402'
|
|
alias: Lighting - Turn on indoor lights when dark
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
below: 7
|
|
for:
|
|
seconds: 60
|
|
conditions:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '12:00'
|
|
- condition: sun
|
|
before: sunset
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'on'
|
|
actions:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id:
|
|
- scene.living_room_lights_normal
|
|
- scene.dining_room_lights_normal
|
|
- scene.kitchen_lights_normal
|
|
- scene.upstairs_lights_normal
|
|
- id: '0403'
|
|
alias: Lighting - Turn on Lovelias lights when dark
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
below: 7
|
|
for:
|
|
seconds: 60
|
|
conditions:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '12:00'
|
|
- condition: sun
|
|
before: sunset
|
|
- condition: time
|
|
before: '19:00:00'
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'on'
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id: scene.lovelias_room_lights_normal
|
|
- id: '0404'
|
|
alias: Lighting - Turn on bedroom lights when dark
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
below: 7
|
|
for:
|
|
seconds: 60
|
|
conditions:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '12:00'
|
|
- condition: sun
|
|
before: sunset
|
|
- condition: state
|
|
entity_id: input_boolean.bedroom_block_light_automation
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'on'
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id: scene.bedroom_lights_normal
|
|
- id: '0405'
|
|
alias: Lighting - Turn on window lights when dark
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
below: 7
|
|
for:
|
|
seconds: 60
|
|
conditions:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '12:00'
|
|
- condition: sun
|
|
before: sunset
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: armed_away
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id: group.indoor_window_lights
|
|
- id: '0406'
|
|
alias: Lighting - Turn on kitchen work lights when comfort lights turns on
|
|
triggers:
|
|
trigger: state
|
|
entity_id: group.downstairs_comfort_lights
|
|
to: 'on'
|
|
actions:
|
|
- delay: 00:00:02
|
|
- condition: template
|
|
value_template: "{% set lights = expand('group.downstairs_comfort_lights')\n \
|
|
\ | selectattr('domain', 'equalto', 'light')\n | rejectattr('state', 'in',\
|
|
\ ['unavailable', 'unknown'])\n | map(attribute='entity_id')\n | list %}\n\
|
|
{{ lights | select('is_state', 'on') | list | count == lights | count }}\n"
|
|
- if:
|
|
condition: state
|
|
entity_id: light.kitchen_counter_light
|
|
state: 'off'
|
|
then:
|
|
action: light.turn_on
|
|
target:
|
|
entity_id: light.kitchen_counter_light
|
|
data:
|
|
brightness_pct: 20
|
|
- if:
|
|
condition: state
|
|
entity_id: light.kitchen_island_light
|
|
state: 'off'
|
|
then:
|
|
action: light.turn_on
|
|
target:
|
|
entity_id: light.kitchen_island_light
|
|
data:
|
|
brightness_pct: 1
|
|
- id: 0408
|
|
alias: Lighting - Turn off outdoor lights at sunrise
|
|
triggers:
|
|
trigger: sun
|
|
event: sunrise
|
|
actions:
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id: group.outdoor_comfort_lights
|
|
- id: 0409
|
|
alias: Lighting - Turn off indoor lights when bright
|
|
triggers:
|
|
trigger: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
above: 9
|
|
for:
|
|
minutes: 5
|
|
conditions:
|
|
condition: sun
|
|
after: sunrise
|
|
before: sunset
|
|
actions:
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id:
|
|
- group.indoor_window_lights
|
|
- group.indoor_comfort_lights
|
|
- id: '0410'
|
|
alias: Lighting - Turn off kitchen work lights when comfort lights turns off
|
|
triggers:
|
|
trigger: state
|
|
entity_id: group.downstairs_comfort_lights
|
|
to: 'off'
|
|
conditions:
|
|
condition: state
|
|
entity_id: binary_sensor.kitchen_motion
|
|
state: 'off'
|
|
for:
|
|
minutes: 10
|
|
actions:
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id: group.kitchen_work_lights
|
|
- id: '0501'
|
|
alias: Media - Living Room Harmony Spotify
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.living_room_harmony_hub
|
|
to: Spotify
|
|
actions:
|
|
- wait_template: '{{ state_attr(''media_player.living_room_shield'', ''state'')
|
|
!= ''Off'' }}
|
|
|
|
'
|
|
timeout: 00:00:30
|
|
continue_on_timeout: false
|
|
- action: androidtv.adb_command
|
|
target:
|
|
entity_id: media_player.living_room_shield
|
|
data:
|
|
command: am force-stop com.spotify.tv.android
|
|
- delay:
|
|
seconds: 2
|
|
- variables:
|
|
end_time: '{{ now() + timedelta(seconds=30) }}'
|
|
- repeat:
|
|
sequence:
|
|
- action: androidtv.adb_command
|
|
target:
|
|
entity_id: media_player.living_room_shield
|
|
data:
|
|
command: am start -a android.intent.action.VIEW -d -n com.spotify.tv.android/.SpotifyTVActivity
|
|
- delay: 00:00:02
|
|
until:
|
|
- condition: template
|
|
value_template: '{{ state_attr(''media_player.living_room_shield'', ''source'')
|
|
== ''Spotify'' }}
|
|
|
|
'
|
|
- wait_template: '{{ ''Living Room Shield'' in state_attr(''media_player.spotify_lucas_hokerberg'',
|
|
''source_list'') }}
|
|
|
|
'
|
|
timeout: 00:00:30
|
|
continue_on_timeout: false
|
|
- variables:
|
|
end_time: '{{ now() + timedelta(seconds=30) }}'
|
|
- repeat:
|
|
sequence:
|
|
- action: media_player.select_source
|
|
target:
|
|
entity_id: media_player.spotify_lucas_hokerberg
|
|
data:
|
|
source: Living Room Shield
|
|
- delay: 00:00:05
|
|
until:
|
|
- condition: template
|
|
value_template: '{{ state_attr(''media_player.spotify_lucas_hokerberg'', ''source'')
|
|
== ''Living Room Shield'' or now() >= end_time }}
|
|
|
|
'
|
|
- action: remote.send_command
|
|
target:
|
|
entity_id: remote.living_room_harmony_hub
|
|
data:
|
|
command: Mute
|
|
device: Receiver
|
|
- variables:
|
|
end_time: '{{ now() + timedelta(seconds=30) }}'
|
|
- repeat:
|
|
sequence:
|
|
- action: androidtv.adb_command
|
|
target:
|
|
entity_id: media_player.living_room_shield
|
|
data:
|
|
command: ENTER
|
|
- delay: 00:00:05
|
|
until:
|
|
- condition: template
|
|
value_template: '{{ states(''media_player.spotify_lucas_hokerberg'') == ''playing''
|
|
or now() >= end_time }}
|
|
|
|
'
|
|
- action: media_player.play_media
|
|
target:
|
|
entity_id: media_player.spotify_lucas_hokerberg
|
|
data:
|
|
media_content_id: https://open.spotify.com/playlist/37i9dQZEVXcH5UOFYpBVWG?si=b012073025ac4849
|
|
media_content_type: playlist
|
|
- action: remote.send_command
|
|
target:
|
|
entity_id: remote.living_room_harmony_hub
|
|
data:
|
|
command: Mute
|
|
device: Receiver
|
|
- action: media_player.shuffle_set
|
|
target:
|
|
entity_id: media_player.spotify_lucas_hokerberg
|
|
data:
|
|
shuffle: true
|
|
- id: '0502'
|
|
alias: Media - Living Room Harmony Movie Mode
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.living_room_harmony_hub
|
|
to: Movie Mode
|
|
actions:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id:
|
|
- group.downstairs_lights
|
|
- light.upstairs_window_light
|
|
- action: scene.turn_on
|
|
target:
|
|
entity_id: scene.living_room_lights_plex
|
|
data:
|
|
transition: 2
|
|
- delay:
|
|
seconds: 12
|
|
- action: androidtv.adb_command
|
|
target:
|
|
entity_id: media_player.living_room_shield
|
|
data:
|
|
command: am start -a android.intent.action.MAIN -c android.intent.category.LEANBACK_LAUNCHER
|
|
-n com.plexapp.android/com.plexapp.plex.activities.SplashActivity
|
|
- id: '0503'
|
|
alias: Media - Turn off lights when Plex plays
|
|
initial_state: 'on'
|
|
triggers:
|
|
trigger: state
|
|
entity_id: media_player.living_room_shield
|
|
to: playing
|
|
conditions:
|
|
condition: state
|
|
entity_id: sensor.living_room_harmony_hub
|
|
state: Movie Mode
|
|
actions:
|
|
action: light.turn_off
|
|
target:
|
|
entity_id: group.downstairs_lights
|
|
data:
|
|
transition: 2
|
|
- id: '0504'
|
|
alias: Media - Turn on lights when Plex stops
|
|
initial_state: 'on'
|
|
triggers:
|
|
trigger: state
|
|
entity_id: media_player.living_room_shield
|
|
to: idle
|
|
conditions:
|
|
condition: state
|
|
entity_id: sensor.living_room_harmony_hub
|
|
state: Movie Mode
|
|
actions:
|
|
action: scene.turn_on
|
|
target:
|
|
entity_id: scene.living_room_lights_plex
|
|
data:
|
|
transition: 2
|
|
- id: '0505'
|
|
alias: Media - Turn on lights when Living Room Harmony exit Movie Mode
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.living_room_harmony_hub
|
|
from: Movie Mode
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id:
|
|
- scene.living_room_lights_normal
|
|
- scene.dining_room_lights_normal
|
|
- scene.kitchen_lights_normal
|
|
- scene.upstairs_lights_normal
|
|
- id: '0506'
|
|
alias: Media - Turn on lights when computer start
|
|
triggers:
|
|
trigger: state
|
|
entity_id: device_tracker.lucas_pc
|
|
to: home
|
|
actions:
|
|
action: scene.turn_on
|
|
target:
|
|
entity_id: scene.upstairs_desk_light_computer
|
|
- id: '0507'
|
|
alias: Media - Turn off lights when computer stop
|
|
triggers:
|
|
trigger: state
|
|
entity_id: device_tracker.lucas_pc
|
|
to: not_home
|
|
actions:
|
|
action: light.turn_off
|
|
target:
|
|
entity_id: light.upstairs_desk_light
|
|
- id: '0601'
|
|
alias: Motion - Turn on lights on living room motion
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.living_room_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.living_room_floor_light
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
actions:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.living_room_floor_light_1
|
|
- wait_for_trigger:
|
|
trigger: state
|
|
entity_id: binary_sensor.living_room_motion
|
|
to: 'off'
|
|
timeout:
|
|
minutes: 5
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.living_room_floor_light_1
|
|
- id: '0602'
|
|
alias: Motion - Turn on lights on upstairs motion
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.upstairs_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.upstairs_window_light
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: light.upstairs_desk_light
|
|
state: 'off'
|
|
- condition: numeric_state
|
|
entity_id: sensor.upstairs_light_level
|
|
below: 6
|
|
actions:
|
|
- action: scene.turn_on
|
|
target:
|
|
entity_id: scene.upstairs_desk_light_night_motion
|
|
- wait_for_trigger:
|
|
trigger: state
|
|
entity_id: binary_sensor.upstairs_motion
|
|
to: 'off'
|
|
timeout:
|
|
minutes: 5
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.upstairs_desk_light
|
|
- id: '0603'
|
|
alias: Motion - Turn on lights on driveway motion
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.outdoor_driveway_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.outdoor_comfort_lights
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: switch.outdoor_driveway_floodlight
|
|
state: 'off'
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.outdoor_driveway_floodlight
|
|
- wait_for_trigger:
|
|
trigger: state
|
|
entity_id: binary_sensor.outdoor_driveway_motion
|
|
to: 'off'
|
|
timeout:
|
|
minutes: 5
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.outdoor_driveway_floodlight
|
|
- id: '0605'
|
|
alias: Motion - Turn on lights on kitchen motion in night
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.kitchen_motion
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.kitchen_island_light
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.kitchen_island_light
|
|
data:
|
|
brightness_pct: 1
|
|
- wait_for_trigger:
|
|
trigger: state
|
|
entity_id: binary_sensor.kitchen_motion
|
|
to: 'off'
|
|
timeout:
|
|
minutes: 5
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.kitchen_island_light
|
|
- id: '0606'
|
|
alias: Motion - Turn off lights on no kitchen motion
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.kitchen_motion
|
|
to: 'off'
|
|
for:
|
|
minutes: 10
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.downstairs_lights
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: group.kitchen_work_lights
|
|
state: 'on'
|
|
actions:
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id: group.kitchen_work_lights
|
|
- id: '0701'
|
|
alias: Presence - Notify on zone enter or leave
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: person.lucas_hokerberg
|
|
from: not_home
|
|
to: Gelita
|
|
for: 00:00:30
|
|
- trigger: state
|
|
entity_id: person.lucas_hokerberg
|
|
from: Gelita
|
|
to: not_home
|
|
for: 00:00:30
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data_template:
|
|
title: HalloNET Home
|
|
message: '{{ trigger.to_state.attributes.friendly_name }} {% if trigger.to_state.state
|
|
== "not_home" %} left {{ trigger.from_state.state }} {% else %} arrived at
|
|
{{ trigger.to_state.state }}. {% endif %}'
|
|
data:
|
|
channel: Presence
|
|
- id: '0702'
|
|
alias: Presence - Turn on indoor lights when someone comes home 1
|
|
triggers:
|
|
trigger: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
from: armed_away
|
|
to: disarmed
|
|
conditions:
|
|
condition: state
|
|
entity_id: group.indoor_window_lights
|
|
state: 'on'
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
entity_id:
|
|
- scene.living_room_lights_normal
|
|
- scene.dining_room_lights_normal
|
|
- scene.kitchen_lights_normal
|
|
- scene.upstairs_lights_normal
|
|
- scene.lovelias_room_lights_normal
|
|
- scene.bedroom_lights_normal
|
|
- id: '0703'
|
|
alias: Presence - Turn on indoor lights when someone comes home 2
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.hallway_front_door_contact_sensor
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: group.indoor_window_lights
|
|
state: 'on'
|
|
actions:
|
|
action: automation.trigger
|
|
target:
|
|
entity_id: automation.presence_turn_on_indoor_lights_when_someone_comes_home_1
|
|
- id: '0704'
|
|
alias: Presence - Turn on heat when cold and someone comes home
|
|
triggers:
|
|
trigger: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
from: armed_away
|
|
to: disarmed
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
< (states.input_number.living_room_hvac_target.state | float - 0.5 | float)
|
|
}}'
|
|
- condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: 'off'
|
|
actions:
|
|
action: automation.trigger
|
|
target:
|
|
entity_id: automation.climate_start_heating_when_cold
|
|
- id: '0705'
|
|
alias: Presence - Turn on AC when warm and someone comes home
|
|
triggers:
|
|
trigger: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
from: armed_away
|
|
to: disarmed
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states.sensor.downstairs_average_temperature.state | float
|
|
> (states.input_number.living_room_hvac_target.state | float + 0.5 | float)
|
|
}}'
|
|
- condition: state
|
|
entity_id: climate.living_room_hvac
|
|
state: 'off'
|
|
actions:
|
|
action: automation.trigger
|
|
target:
|
|
entity_id: automation.climate_start_cooling_when_warm
|
|
- id: '0706'
|
|
alias: Presence - Turn off lights and TV when alarm is armed away
|
|
triggers:
|
|
trigger: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
to: armed_away
|
|
actions:
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id:
|
|
- group.indoor_comfort_lights
|
|
- group.indoor_work_lights
|
|
- remote.living_room_harmony_hub
|
|
- id: '0707'
|
|
alias: Presence - Turn on wardrobe light on door open
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.bedroom_wardrobe_contact_sensor
|
|
to: 'on'
|
|
actions:
|
|
action: light.turn_on
|
|
target:
|
|
entity_id: light.bedroom_wardrobe_ceiling_light
|
|
- id: 0708
|
|
alias: Presence - Turn off wardrobe light on door close
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.bedroom_wardrobe_contact_sensor
|
|
to: 'off'
|
|
actions:
|
|
action: light.turn_off
|
|
target:
|
|
entity_id: light.bedroom_wardrobe_ceiling_light
|
|
- id: 0709
|
|
alias: Presence - Turn off vacation mode when someone comes home
|
|
triggers:
|
|
trigger: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
from: armed_away
|
|
to: disarmed
|
|
conditions:
|
|
condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'on'
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.vacation_mode
|
|
- action: notify.home_mobile_apps
|
|
data:
|
|
title: HalloNET Home
|
|
message: Welcome home! Vacation mode has been turned off.
|
|
data:
|
|
channel: Presence
|
|
actions:
|
|
- action: turn_on_vacation_mode
|
|
title: Turn on vacation mode
|
|
- id: 0801
|
|
alias: Reminder - Garbage Can 1
|
|
triggers:
|
|
- trigger: time
|
|
at: 08:00:00
|
|
- trigger: time
|
|
at: '20:00:00'
|
|
conditions:
|
|
condition: template
|
|
value_template: '{{ states(''sensor.garbage_can_1'') == ''Tomorrow'' }}'
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data:
|
|
title: HalloNET Home
|
|
message: Garbage can 1 is emptied tomorrow.
|
|
data:
|
|
channel: Reminder
|
|
- id: 0802
|
|
alias: Reminder - Garbage Can 2
|
|
triggers:
|
|
- trigger: time
|
|
at: 08:00:00
|
|
- trigger: time
|
|
at: '20:00:00'
|
|
conditions:
|
|
condition: template
|
|
value_template: '{{ states(''sensor.garbage_can_2'') == ''Tomorrow'' }}'
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data:
|
|
title: HalloNET Home
|
|
message: Garbage can 2 is emptied tomorrow.
|
|
data:
|
|
channel: Reminder
|
|
- id: 0803
|
|
alias: Reminder - Garden Waste
|
|
triggers:
|
|
- trigger: time
|
|
at: 08:00:00
|
|
- trigger: time
|
|
at: '20:00:00'
|
|
conditions:
|
|
condition: template
|
|
value_template: '{{ states(''sensor.garden_waste'') == ''Tomorrow'' }}'
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data:
|
|
title: HalloNET Home
|
|
message: Garden waste is emptied tomorrow.
|
|
data:
|
|
channel: Reminder
|
|
- id: 0901
|
|
alias: Routine - Wake up Lucas
|
|
triggers:
|
|
trigger: template
|
|
value_template: '{{ as_timestamp(states("sensor.lucas_hokerberg_next_alarm"))
|
|
- 300 < as_timestamp(now()) }}'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: person.lucas_hokerberg
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'on'
|
|
actions:
|
|
action: script.wake_up
|
|
- id: 0904
|
|
alias: Routine - Wake up
|
|
triggers:
|
|
trigger: time
|
|
at: 08:00:00
|
|
actions:
|
|
- delay:
|
|
minutes: '{{ range(2,32) | random | int }}'
|
|
- action: script.wake_up
|
|
- id: 0902
|
|
alias: Routine - Wake up and dark
|
|
triggers:
|
|
trigger: state
|
|
entity_id: script.wake_up
|
|
to: 'on'
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.living_room_light_level
|
|
below: 7
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
actions:
|
|
action: homeassistant.turn_on
|
|
target:
|
|
entity_id:
|
|
- scene.living_room_lights_normal
|
|
- scene.dining_room_lights_normal
|
|
- scene.kitchen_lights_normal
|
|
- id: 0903
|
|
alias: Routine - Bedtime
|
|
triggers:
|
|
trigger: state
|
|
entity_id: group.downstairs_lights
|
|
to: 'off'
|
|
conditions:
|
|
- condition: time
|
|
after: '21:00'
|
|
before: 03:00
|
|
- condition: state
|
|
entity_id: remote.living_room_harmony_hub
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.night_mode
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
actions:
|
|
action: script.bedtime
|
|
- id: 0905
|
|
alias: Routine - Bedtime vacation
|
|
triggers:
|
|
trigger: time
|
|
at: '21:58:00'
|
|
conditions:
|
|
condition: state
|
|
entity_id: input_boolean.vacation_mode
|
|
state: 'on'
|
|
actions:
|
|
- delay:
|
|
minutes: '{{ range(16,59) | random | int }}'
|
|
- action: script.indoor_lights_off
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.night_mode
|
|
- id: '1001'
|
|
alias: Security - Notify when home is unsecured
|
|
triggers:
|
|
trigger: state
|
|
entity_id: group.home_members
|
|
from: home
|
|
for: 00:00:30
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: lock.hallway_front_door_lock
|
|
state: unlocked
|
|
- condition: state
|
|
entity_id: alarm_control_panel.verisure_alarm
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data_template:
|
|
title: HalloNET Home
|
|
message: Home is left unsecured! The front door is {{ states("lock.hallway_front_door_lock")
|
|
}} and the alarm is {{ states("alarm_control_panel.verisure_alarm") }}!
|
|
data:
|
|
channel: Security
|
|
actions:
|
|
- action: lock_hallway_front_door_lock
|
|
title: Lock Front Door
|
|
- id: '1002'
|
|
alias: Security - Notify on entrance doorbell
|
|
triggers:
|
|
trigger: state
|
|
entity_id: binary_sensor.outdoor_entrance_doorbell
|
|
to: 'on'
|
|
actions:
|
|
action: notify.home_mobile_apps
|
|
data:
|
|
title: HalloNET Home
|
|
message: Someone is at the front door!
|
|
data:
|
|
channel: Security
|
|
actions:
|
|
- action: unlock_hallway_front_door_lock
|
|
title: Unlock Front Door
|
|
- id: '1101'
|
|
alias: Car - FGH47K Stop charging at level
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.fgh47k_battery_level
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{% set old = trigger.from_state.state | int(0) %} {% set new
|
|
= trigger.to_state.state | int(0) %} {% set limit = states(''input_number.fgh47k_charge_level'')
|
|
| int(0) %} {{ old < limit and new >= limit }}'
|
|
- condition: state
|
|
entity_id: switch.fgh47k_charging
|
|
state: 'on'
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.fgh47k_charging
|
|
- action: notify.mobile_app_lucas_hokerberg
|
|
data:
|
|
title: HalloNET Home
|
|
message: FGH47K battery level reached {{ states.sensor.fgh47k_battery_level.state
|
|
}} %. Charging has been stopped!
|
|
data:
|
|
channel: Car
|
|
actions:
|
|
- action: fgh47k_restart_charging
|
|
title: Restart charging
|
|
- id: '1102'
|
|
alias: Car - FGH47K Reset charge on stop
|
|
triggers:
|
|
trigger: state
|
|
entity_id: switch.fgh47k_charging
|
|
from: 'on'
|
|
to: 'off'
|
|
conditions:
|
|
condition: state
|
|
entity_id: input_boolean.fgh47k_auto_charge
|
|
state: 'on'
|
|
actions:
|
|
action: switch.turn_on
|
|
target:
|
|
entity_id: switch.fgh47k_reduced_current
|
|
- id: '1103'
|
|
alias: Car - FGH47K Set charge level on start
|
|
triggers:
|
|
trigger: state
|
|
entity_id: switch.fgh47k_charging
|
|
from: 'off'
|
|
to: 'on'
|
|
conditions:
|
|
condition: state
|
|
entity_id: input_boolean.fgh47k_auto_charge
|
|
state: 'on'
|
|
actions:
|
|
- delay:
|
|
minutes: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.fgh47k_charge_level
|
|
data:
|
|
value: "{% if is_state('device_tracker.fgh47k', 'home') %}\n {% set temp =\
|
|
\ states('sensor.outdoor_temperature') | float %}\n{% else %}\n {% set temp\
|
|
\ = states('sensor.fgh47k_outside_temperature') | float %}\n{% endif %} {%\
|
|
\ if temp < 5 %}\n 100\n{% elif temp < 10 %}\n 90\n{% else %}\n 80\n{%\
|
|
\ endif %}\n"
|
|
- id: '1104'
|
|
alias: Car - Lock charger when cable disconnected
|
|
trigger:
|
|
trigger: state
|
|
entity_id: sensor.outdoor_ev_charger_mode
|
|
to: disconnected
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
action: switch.turn_on
|
|
target:
|
|
entity_id: switch.outdoor_ev_charger_cable_lock
|
|
- id: '1105'
|
|
alias: Car - Unlock charger when cable connected
|
|
trigger:
|
|
trigger: state
|
|
entity_id: sensor.outdoor_ev_charger_mode
|
|
to: connected_charging
|
|
actions:
|
|
action: switch.turn_off
|
|
target:
|
|
entity_id: switch.outdoor_ev_charger_cable_lock
|
|
- id: '1201'
|
|
alias: 3D Print - Notify when print finished
|
|
triggers:
|
|
trigger: state
|
|
entity_id: sensor.3d_printer_print_status
|
|
from: running
|
|
to: finish
|
|
actions:
|
|
- wait_for_trigger:
|
|
trigger: numeric_state
|
|
entity_id: sensor.3d_printer_bed_temperature
|
|
below: 35
|
|
timeout:
|
|
hours: 1
|
|
continue_on_timeout: true
|
|
- choose:
|
|
- conditions:
|
|
condition: numeric_state
|
|
entity_id: sensor.3d_printer_bed_temperature
|
|
below: 35
|
|
sequence:
|
|
action: notify.mobile_app_lucas_hokerberg
|
|
data:
|
|
title: HalloNET Home
|
|
message: 3D print is finished and the bed has cooled down.
|
|
data:
|
|
channel: 3D Print
|
|
image: /api/camera_proxy/camera.3d_printer_camera
|
|
default:
|
|
action: notify.mobile_app_lucas_hokerberg
|
|
data:
|
|
title: HalloNET Home
|
|
message: 3D print is finished, but the bed hase not cooled down yet.
|
|
data:
|
|
channel: 3D Print
|
|
image: /api/camera_proxy/camera.3d_printer_camera
|