1595 lines
45 KiB
YAML
1595 lines
45 KiB
YAML
- alias: Allrum belysning fönster
|
|
id: allrum_belysning_fonster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_belysning_filament_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.allrum_belysning_filament_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.allrum_klotlampa
|
|
- alias: Allrum huslampa
|
|
id: allrum_huslampa
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_huslampa_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.allrum_huslampa_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.allrum_huslampa
|
|
- alias: Filmläge hantering
|
|
id: filmlage_hantering
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: media_player.allrum
|
|
to: playing
|
|
for:
|
|
seconds: 10
|
|
id: film_startar
|
|
- trigger: state
|
|
entity_id: media_player.allrum
|
|
from: playing
|
|
for:
|
|
seconds: 5
|
|
id: film_stoppar
|
|
- trigger: state
|
|
entity_id: input_boolean.film
|
|
to: 'off'
|
|
id: filmlage_av
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: film_startar
|
|
- condition: state
|
|
entity_id: input_boolean.film
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.film_spelar
|
|
- conditions:
|
|
- condition: trigger
|
|
id:
|
|
- film_stoppar
|
|
- filmlage_av
|
|
sequence:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.film_spelar
|
|
- alias: Allrum knapp vid tv
|
|
id: allrum_knapp_vid_tv
|
|
triggers:
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: 399f935166a8dc9987ba52ae975e5b2c
|
|
type: action
|
|
subtype: single
|
|
id: single_press
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: 399f935166a8dc9987ba52ae975e5b2c
|
|
type: action
|
|
subtype: double
|
|
id: double_press
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: 399f935166a8dc9987ba52ae975e5b2c
|
|
type: action
|
|
subtype: hold
|
|
id: hold_press
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: double_press
|
|
- condition: state
|
|
entity_id: input_boolean.film
|
|
state: 'off'
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.film
|
|
- conditions:
|
|
- condition: trigger
|
|
id: single_press
|
|
sequence:
|
|
- action: media_player.media_{{ 'pause' if is_state('media_player.allrum', 'playing')
|
|
else 'play' }}
|
|
target:
|
|
entity_id: media_player.allrum
|
|
- conditions:
|
|
- condition: trigger
|
|
id: hold_press
|
|
sequence:
|
|
- action: input_boolean.toggle
|
|
target:
|
|
entity_id: input_boolean.film_spelar
|
|
- alias: Allrum belysning tak
|
|
id: Allrum belysning tak
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.allrum_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.allrum_tak_1
|
|
- light.allrum_tak_2
|
|
- alias: Allrum belysning hall
|
|
id: Allrum belysning hall
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_belysning_hall_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.allrum_belysning_hall_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.allrum_tak_3
|
|
- alias: Allrum belysning läslampa
|
|
id: Allrum belysning läslampa
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_belysning_laslampa_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.allrum_belysning_laslampa_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.allrum_laslampa
|
|
- alias: Badrum belysning
|
|
id: badrum_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.badrum_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.badrum_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.badrum
|
|
- alias: Barnrum belysning
|
|
id: barnrum_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.barnrum_belysning_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.barnrum_belysning_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.barnrum_skank
|
|
- alias: Barnrum belysning fönster
|
|
id: barnrum_belysning_fonster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.barnrum_belysning_fonster_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.barnrum_belysning_fonster_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.barnrum_fonster_1
|
|
- light.barnrum_fonster_2
|
|
- alias: Barnrum värme
|
|
id: barnrum_varme
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.barnrum_varmegolv
|
|
data:
|
|
hvac_mode: '{{ iif(states(''binary_sensor.varmegolv_block'') == ''on'', ''off'',
|
|
''heat'') }}'
|
|
- alias: Barnrum brandvarnare
|
|
id: barnrum_brandvarnare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.barnrum_brandvarnare_smoke
|
|
to: 'on'
|
|
for:
|
|
seconds: 5
|
|
- trigger: state
|
|
entity_id: binary_sensor.barnrum_brandvarnare_smoke
|
|
to: 'off'
|
|
actions:
|
|
- action: siren.turn_{{ trigger.to_state.state }}
|
|
target:
|
|
entity_id:
|
|
- siren.allrum_brandvarnare_alarm
|
|
- siren.allrum_hall_brandvarnare_alarm
|
|
- siren.snickarboa_brandvarnare_alarm
|
|
- siren.tvattstuga_brandvarnare_alarm
|
|
- alias: Allrum brandvarnare
|
|
id: allrum_brandvarnare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_brandvarnare_smoke
|
|
to: 'on'
|
|
for:
|
|
seconds: 5
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_brandvarnare_smoke
|
|
to: 'off'
|
|
actions:
|
|
- action: siren.turn_{{ trigger.to_state.state }}
|
|
target:
|
|
entity_id:
|
|
- siren.allrum_hall_brandvarnare_alarm
|
|
- siren.snickarboa_brandvarnare_alarm
|
|
- siren.tvattstuga_brandvarnare_alarm
|
|
- alias: Allrum hall brandvarnare
|
|
id: allrum_hall_brandvarnare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_hall_brandvarnare_smoke
|
|
to: 'on'
|
|
for:
|
|
seconds: 5
|
|
- trigger: state
|
|
entity_id: binary_sensor.allrum_hall_brandvarnare_smoke
|
|
to: 'off'
|
|
actions:
|
|
- action: siren.turn_{{ trigger.to_state.state }}
|
|
target:
|
|
entity_id:
|
|
- siren.allrum_brandvarnare_alarm
|
|
- siren.snickarboa_brandvarnare_alarm
|
|
- siren.tvattstuga_brandvarnare_alarm
|
|
- alias: Snickarboa brandvarnare
|
|
id: snickarboa_brandvarnare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.snickarboa_brandvarnare_smoke
|
|
to: 'on'
|
|
for:
|
|
seconds: 5
|
|
- trigger: state
|
|
entity_id: binary_sensor.snickarboa_brandvarnare_smoke
|
|
to: 'off'
|
|
actions:
|
|
- action: siren.turn_{{ trigger.to_state.state }}
|
|
target:
|
|
entity_id:
|
|
- siren.allrum_brandvarnare_alarm
|
|
- siren.allrum_hall_brandvarnare_alarm
|
|
- siren.tvattstuga_brandvarnare_alarm
|
|
- alias: Tvättstuga brandvarnare
|
|
id: tvattstuga_brandvarnare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattstuga_brandvarnare_smoke
|
|
to: 'on'
|
|
for:
|
|
seconds: 5
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattstuga_brandvarnare_smoke
|
|
to: 'off'
|
|
actions:
|
|
- action: siren.turn_{{ trigger.to_state.state }}
|
|
target:
|
|
entity_id:
|
|
- siren.allrum_brandvarnare_alarm
|
|
- siren.allrum_hall_brandvarnare_alarm
|
|
- siren.snickarboa_brandvarnare_alarm
|
|
- alias: Candle
|
|
id: candle
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.candle
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.candle
|
|
state: 'on'
|
|
sequence:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_kok
|
|
- switch.adaptive_lighting_kok_fonster
|
|
- switch.adaptive_lighting_hall
|
|
- switch.adaptive_lighting_badrum
|
|
- switch.adaptive_lighting_vardagsrum_belysning_filament
|
|
- delay:
|
|
seconds: 5
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.kok_fonsterbelysning
|
|
- light.vardagsrum_fonster_hangande
|
|
- light.vardagsrum_fonster_fotogen
|
|
- light.vardagsrum_fonster_piano
|
|
- light.vardagsrum_fonster_trappa
|
|
data:
|
|
brightness_pct: 2
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.kok_koksbord
|
|
- light.kok_tak
|
|
- light.kok_kokso
|
|
- light.hall
|
|
- light.badrum
|
|
- light.vardagsrum_tak
|
|
- light.vardagsrum_bord
|
|
- light.hall_byra
|
|
data:
|
|
profile: candle
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.kok_bankbelysning
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.candle
|
|
state: 'off'
|
|
sequence:
|
|
- action: automation.trigger
|
|
target:
|
|
entity_id:
|
|
- automation.vardagsrum_belysning
|
|
- automation.kok_belysning_litet_fonster
|
|
- automation.kok_belysning_stora_fonster
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_kok
|
|
- switch.adaptive_lighting_kok_fonster
|
|
- switch.adaptive_lighting_hall
|
|
- switch.adaptive_lighting_badrum
|
|
- switch.adaptive_lighting_vardagsrum_belysning_filament
|
|
- alias: Badrum Candle
|
|
id: badrum_candle
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.badrum_candle
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.badrum_candle
|
|
state: 'on'
|
|
sequence:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.adaptive_lighting_badrum
|
|
- delay:
|
|
seconds: 5
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.badrum
|
|
data:
|
|
profile: candle
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.badrum_candle
|
|
state: 'off'
|
|
sequence:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.adaptive_lighting_badrum
|
|
- alias: Ljusstakar
|
|
id: Ljusstakar
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.ljusstakar_belysning_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.ljusstakar_belysning_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.ljusstakar_belysning_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.ac_0000002_4
|
|
- light.ac0000001_4
|
|
- light.ac_0000002_3
|
|
- light.ac_0ccc4aa_6
|
|
- light.ac_000000a_1
|
|
- light.ac_0000001_3
|
|
- alias: Gästrum Ljusstakar
|
|
id: Gästrum Ljusstakar
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.gastrum_ljusstakar_belysning_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.gastrum_ljusstakar_belysning_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.gastrum_ljusstakar_belysning_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.gastrum_ljusstake
|
|
- alias: Diskmaskin klar
|
|
id: diskmaskin_klar
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.diskmaskin
|
|
from: 'on'
|
|
to: 'off'
|
|
actions:
|
|
- action: notify.persistent_notification
|
|
data:
|
|
message: Diskmaskin
|
|
title: Diskmaskinen är klar
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Diskmaskin klar
|
|
title: Diskmaskinen är klar
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Diskmaskin klar
|
|
title: Diskmaskinen är klar
|
|
- alias: Heatpump blockera
|
|
id: Heatpump blockera
|
|
trigger:
|
|
- trigger: time_pattern
|
|
minutes: 2
|
|
- trigger: time_pattern
|
|
minutes: 32
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.heatpump_block'', ''on'') %} switch.turn_on
|
|
{% elif is_state(''binary_sensor.heatpump_block'', ''off'') %} switch.turn_off
|
|
{% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- switch.heatpump
|
|
- alias: Heatpump energikalla
|
|
id: Heatpump energikalla
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.power_from_grid
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
state: 'on'
|
|
entity_id: binary_sensor.power_from_grid
|
|
sequence:
|
|
- service: select.select_option
|
|
target:
|
|
entity_id:
|
|
- select.heatpump_timme_from
|
|
- select.heatpump_dag_from
|
|
- select.heatpump_manad_from
|
|
- select.heatpump_ar_from
|
|
- select.heatpump_hotwater_timme_from
|
|
- select.heatpump_hotwater_dag_from
|
|
- select.heatpump_hotwater_manad_from
|
|
- select.heatpump_hotwater_ar_from
|
|
- select.heatpump_heat_timme_from
|
|
- select.heatpump_heat_dag_from
|
|
- select.heatpump_heat_manad_from
|
|
- select.heatpump_heat_ar_from
|
|
data:
|
|
option: grid
|
|
- conditions:
|
|
- condition: state
|
|
state: 'off'
|
|
entity_id: binary_sensor.power_from_grid
|
|
sequence:
|
|
- service: select.select_option
|
|
target:
|
|
entity_id:
|
|
- select.heatpump_timme_from
|
|
- select.heatpump_dag_from
|
|
- select.heatpump_manad_from
|
|
- select.heatpump_ar_from
|
|
- select.heatpump_hotwater_timme_from
|
|
- select.heatpump_hotwater_dag_from
|
|
- select.heatpump_hotwater_manad_from
|
|
- select.heatpump_hotwater_ar_from
|
|
- select.heatpump_heat_timme_from
|
|
- select.heatpump_heat_dag_from
|
|
- select.heatpump_heat_manad_from
|
|
- select.heatpump_heat_ar_from
|
|
data:
|
|
option: solar
|
|
- alias: EMHASS publicera data
|
|
id: EMHASS publicera data
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
- minutes: /1
|
|
platform: time_pattern
|
|
action:
|
|
- service: shell_command.publish_data_def2
|
|
- alias: EMHASS_forecast_mpc
|
|
id: EMHASS_forecast_mpc
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /1
|
|
action:
|
|
- delay:
|
|
seconds: 30
|
|
- service: shell_command.trigger_nordpool_solcast_mpc
|
|
- alias: EMHASS_forecast_mpc_bil
|
|
id: EMHASS_forecast_mpc_bil
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /1
|
|
action:
|
|
- delay:
|
|
seconds: 30
|
|
- service: shell_command.trigger_nordpool_solcast_mpc_bil
|
|
- alias: EMHASS_machine_learn
|
|
id: EMHASS_machine_learn
|
|
triggers:
|
|
- trigger: time
|
|
at: '12:00:10'
|
|
actions:
|
|
- action: shell_command.emhass_machine_learn
|
|
- delay:
|
|
seconds: 1
|
|
- action: shell_command.emhass_machine_tune
|
|
- alias: solcast_update
|
|
id: solcast_update
|
|
trigger:
|
|
- platform: time_pattern
|
|
hours: /3
|
|
minutes: 14
|
|
action:
|
|
- service: solcast_solar.update_forecasts
|
|
- alias: Gästrum belysning
|
|
id: Gästrum belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.gastrum_belysning_automation_control
|
|
- trigger: state
|
|
entity_id: input_boolean.sovdags_gastrum
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.gastrum_belysning_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.gastrum_fonster_2
|
|
- light.gastrum_byra
|
|
- delay:
|
|
seconds: 5
|
|
- action: switch.turn_{{ iif(is_state('input_boolean.sovdags_gastrum', 'on'), 'off',
|
|
'on') }}
|
|
target:
|
|
entity_id: switch.adaptive_lighting_gastrum
|
|
- condition: state
|
|
entity_id: input_boolean.sovdags_gastrum
|
|
state: 'off'
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.linas_skrivbord
|
|
- alias: Gästrum belysning filament
|
|
id: gastrum_belysning_filament
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.gastrum_belysning_filament_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.gastrum_belysning_filament_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.gastrum_hylla
|
|
- alias: Gästrum knapp vid säng
|
|
id: Gästrum knapp vid säng
|
|
trigger:
|
|
- trigger: event
|
|
event_type: deconz_event
|
|
event_data:
|
|
id: sovrum_knapp
|
|
event: 1002
|
|
actions:
|
|
- action: input_boolean.toggle
|
|
target:
|
|
entity_id: input_boolean.sovdags_gastrum
|
|
- alias: Gästrum värme
|
|
id: gastrum_varme
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.varmegolv_block
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.gastrum_varmegolv
|
|
data:
|
|
hvac_mode: '{{ iif(states(''binary_sensor.varmegolv_block'') == ''on'', ''off'',
|
|
''heat'') }}'
|
|
- alias: Hall takbelysning
|
|
id: Hall takbelysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.hall_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.hall_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.hall
|
|
- alias: Carport snapshot
|
|
id: carport_snapshot
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_vehicle
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_person
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.carport_main
|
|
data:
|
|
filename: /media/disk_f/snapshots/{{ trigger.to_state.name }}/{{ now().strftime("%Y-%m-%d")
|
|
}}/{{ now().strftime("%Y-%m-%d_%H:%M") }}.jpg
|
|
- alias: Entré snapshot
|
|
id: entre_snapshot
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.entre_reolink_person
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.entre_reolink_clear
|
|
data:
|
|
filename: /media/disk_f/snapshots/{{ trigger.to_state.name }}/{{ now().strftime("%Y-%m-%d")
|
|
}}/{{ now().strftime("%Y-%m-%d_%H:%M") }}.jpg
|
|
- alias: Carport inspelning
|
|
id: carport_inspelning
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_vehicle
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_person
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.record
|
|
data:
|
|
filename: /media/disk_f/recordings/{{ trigger.to_state.name }}/{{ now().strftime("%Y-%m-%d")
|
|
}}/{{ now().strftime("%Y-%m-%d_%H:%M") }}.mp4
|
|
duration: 180
|
|
target:
|
|
entity_id: camera.carport_main
|
|
- delay: 180
|
|
- alias: Kattkamera inspelning
|
|
id: kattkamera_inspelning
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattstuga_djur
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.record
|
|
data:
|
|
filename: /media/disk_f/recordings/{{ trigger.to_state.name }}/{{ now().strftime("%Y-%m-%d")
|
|
}}/{{ now().strftime("%Y-%m-%d_%H:%M") }}.mp4
|
|
duration: 60
|
|
target:
|
|
entity_id: camera.tvattstuga_hog_klarhet
|
|
- delay: 60
|
|
- alias: Carport rörelse
|
|
id: carport_rorelse
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_motion
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.carport_main
|
|
data:
|
|
filename: /media/disk_f/snapshots/Carport_rörelse_{{ now().strftime("%Y-%m-%d_%H:%M")
|
|
}}.jpg
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Något rör sig
|
|
title: Rörelse
|
|
data:
|
|
image: /api/camera_proxy/camera.carport_main
|
|
- alias: Carport rörelse person notifiering
|
|
id: carport_rorelse_person_notifiering
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_presence
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.carport_main
|
|
data:
|
|
filename: /media/notify.jpg
|
|
- delay: 1
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Någon rör sig
|
|
title: Rörelse person
|
|
data:
|
|
image: /media/local/notify.jpg
|
|
url: /lovelace/cam
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Någon rör sig
|
|
title: Rörelse person
|
|
data:
|
|
image: /media/local/notify.jpg
|
|
- alias: Entré rörelse person notifiering
|
|
id: entre_rorelse_person_notifiering
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.entre_presence_person
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.entre_reolink_clear
|
|
data:
|
|
filename: /media/entre_notify.jpg
|
|
- delay: 1
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Någon rör sig vid entrén
|
|
title: Rörelse person
|
|
data:
|
|
image: /media/local/entre_notify.jpg
|
|
url: /lovelace/cam
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Någon rör sig vid entrén
|
|
title: Rörelse person
|
|
data:
|
|
image: /media/local/entre_notify.jpg
|
|
- alias: Entré rörelse djur notifiering
|
|
id: entre_rorelse_djur_notifiering
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.entre_presence_animal
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.entre_reolink_clear
|
|
data:
|
|
filename: /media/entre_notify_animal.jpg
|
|
- delay: 1
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Djur rör sig vid entrén
|
|
title: Rörelse djur
|
|
data:
|
|
image: /media/local/entre_notify_animal.jpg
|
|
url: /lovelace/cam
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Djur rör sig vid entrén
|
|
title: Rörelse djur
|
|
data:
|
|
image: /media/local/entre_notify_animal.jpg
|
|
url: /lovelace/cam
|
|
- alias: Carport rörelse bil notifiering
|
|
id: carport_rorelse_bil_notifiering
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.carport_vehicle
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.carport_main
|
|
data:
|
|
filename: /media/notify_car.jpg
|
|
- delay: 1
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Bil upptäckt
|
|
title: Rörelse bil
|
|
data:
|
|
image: /media/local/notify_car.jpg
|
|
url: /lovelace/cam
|
|
- delay: 5
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Bil upptäckt
|
|
title: Rörelse bil
|
|
data:
|
|
image: /media/local/notify_car.jpg
|
|
- delay:
|
|
minutes: 5
|
|
- alias: Kattkamera rörelse notifiering
|
|
id: kattkamera_rorelse_notifiering
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattstuga_djur
|
|
to: 'on'
|
|
actions:
|
|
- action: camera.snapshot
|
|
target:
|
|
entity_id: camera.tvattstuga_hog_klarhet
|
|
data:
|
|
filename: /media/kattkamera_notify.jpg
|
|
- delay: 1
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Rörelse i tvättstugan
|
|
title: Katt?
|
|
data:
|
|
image: /media/local/kattkamera_notify.jpg
|
|
url: /lovelace/foder
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Rörelse i tvättstugan
|
|
title: Katt?
|
|
data:
|
|
image: /media/local/kattkamera_notify.jpg
|
|
url: /lovelace/foder
|
|
- alias: Kök bänkbelysning
|
|
id: kok_bankbelysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_bank_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.kok_bank_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.kok_bankbelysning
|
|
- alias: Kök belysning stora fönster
|
|
id: kok_belysning_stora_fonster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_belysning_filament_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.kok_belysning_filament_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.kok_fonster_1
|
|
- light.kok_fonster_2
|
|
- alias: Kök belysning litet fönster
|
|
id: kok_belysning_litet_fonster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_belysning_litet_fonster_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.kok_belysning_litet_fonster_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.kok_fonster_3
|
|
- alias: Kaffebryggare/Espresso/Vattenkokare auto-avstängning
|
|
id: kok_kaffe_vattenkokare_auto_avstangning
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.kok_kaffe_vattenkokare
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_kaffe_vattenkokare_aktiv_anvandning
|
|
to: 'on'
|
|
actions:
|
|
- action: number.set_value
|
|
target:
|
|
entity_id: number.kok_kaffe_vattenkokare_countdown
|
|
data:
|
|
value: 3600
|
|
- alias: Kök skafferibelysning
|
|
id: kok_skafferibelysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_skafferi_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.kok_skafferi_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.kok_skafferi
|
|
- alias: Kök takbelysning
|
|
id: kok_takbelysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.kok_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.kok_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.kok_tak
|
|
- light.kok_koksbord_1
|
|
- light.kok_koksbord_2
|
|
- light.kok_kokso
|
|
- light.hall_byra
|
|
- light.kok_vedspis
|
|
- alias: Kök värme
|
|
id: kok_varme
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.kok_varmegolv
|
|
data:
|
|
hvac_mode: '{{ iif(states(''binary_sensor.varmegolv_block'') == ''on'', ''off'',
|
|
''heat'') }}'
|
|
- alias: Mikaels rum belysning fönster
|
|
id: mikaels_rum_belysning_fonster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.mikaels_rum_belysning_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.mikaels_rum_belysning_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.mikaels_rum_fonster
|
|
- alias: Mikaels rum belysning av
|
|
id: mikaels_rum_belysning_av
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.mikaels_rum_belysning_av
|
|
to: 'off'
|
|
actions:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.mikaels_rum_hue_play_1
|
|
- light.mikaels_rum_hue_play_2
|
|
- light.mikaels_rum_hue_play_3
|
|
- light.mikaels_rum_skrivbord
|
|
- light.mikaels_rum_ljusslinga
|
|
- light.mikaels_rum_tak
|
|
- alias: Semester sovdags
|
|
id: semester_sovdags
|
|
triggers:
|
|
- trigger: time
|
|
at: '21:00:00'
|
|
id: sovdags_tid
|
|
- trigger: time
|
|
at: 07:30:00
|
|
id: vakna_tid
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.semester
|
|
state: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sovdags_tid
|
|
sequence:
|
|
- delay: '{{ (range(0, 1)|random|int) }}:{{ (range(1, 59)|random|int) }}:00'
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.sovdags
|
|
- conditions:
|
|
- condition: trigger
|
|
id: vakna_tid
|
|
sequence:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.sovdags
|
|
- alias: Snickarboa avfuktare
|
|
id: snickarboa_avfuktare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.heatpump_emhass
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: humidifier.turn_{{ iif(states('binary_sensor.heatpump_emhass') == 'on',
|
|
'on', 'off') }}
|
|
target:
|
|
entity_id: humidifier.snickarboa_avfuktare
|
|
- alias: Snickarboa belysning
|
|
id: snickarboa_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.snickarboa_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.snickarboa_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.snickarboa_arbetsbank
|
|
- light.snickarboa_spotlights
|
|
- alias: Snickarboa värmare
|
|
id: snickarboa_varmare
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.snickarboa_heater
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.snickarboa
|
|
data:
|
|
hvac_mode: '{{ iif(states(''binary_sensor.snickarboa_heater'') == ''on'', ''heat'',
|
|
''off'') }}'
|
|
- alias: solar_battery_mode
|
|
id: solar_battery_mode
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.solar_battery_mode
|
|
- platform: state
|
|
entity_id: sensor.p_batt_forecast
|
|
action:
|
|
- delay:
|
|
seconds: 30
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: charge
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 3
|
|
MinRsvPct: 1000
|
|
OutWRte: '{{ 65536 - (0 - states(''sensor.p_batt_forecast'') | int(0) /
|
|
10240 * 10000) | int(0) }}'
|
|
InWRte: '{{ (0 - states(''sensor.p_batt_forecast'') | int(0) / 10240 * 10000)
|
|
| int(0) }}'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: charge_max
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 3
|
|
MinRsvPct: 1000
|
|
OutWRte: '{{ 65536 - (0 - -5000 | int(0) / 10240 * 10000) | int(0) }}'
|
|
InWRte: '{{ (0 - -5000 | int(0) / 10240 * 10000) | int(0) }}'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: charge_from_solar
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 2
|
|
MinRsvPct: 1000
|
|
OutWRte: 0
|
|
InWRte: 10000
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: discharge
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 1
|
|
MinRsvPct: 1000
|
|
OutWRte: 10000
|
|
InWRte: 0
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: discharge_fixed
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 3
|
|
MinRsvPct: 1000
|
|
OutWRte: '{{ (states(''sensor.p_batt_forecast'') | int(0) / 10240 * 10000)
|
|
| int(0) }}'
|
|
InWRte: '{{ 65536 - (states(''sensor.p_batt_forecast'') | int(0) / 10240
|
|
* 10000) | int(0) }}'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: discharge_min_limit
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 1
|
|
MinRsvPct: 1000
|
|
OutWRte: 10000
|
|
InWRte: '{{ 65536 - (states(''sensor.p_batt_forecast'') | int(0) / 10240
|
|
* 10000) | int(0) }}'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: blocked
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 3
|
|
MinRsvPct: 1000
|
|
OutWRte: 0
|
|
InWRte: 0
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: sensor.solar_battery_mode
|
|
state: idle
|
|
sequence:
|
|
- service: script.solar_battery_mode
|
|
data:
|
|
StorCTLMod: 3
|
|
MinRsvPct: 1000
|
|
OutWRte: 0
|
|
InWRte: 0
|
|
- alias: ssam_sophatmning_fni1
|
|
id: ssam_sophatmning_fni1
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.ssam_sophatmning_fni1
|
|
attribute: days_from_today
|
|
to: 1
|
|
action:
|
|
- service: persistent_notification.create
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 1
|
|
- service: notify.mobile_app_mikael_iphone
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 1
|
|
- service: notify.mobile_app_lina_iphone
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 1
|
|
- alias: ssam_sophatmning_fni2
|
|
id: ssam_sophatmning_fni2
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.ssam_sophatmning_fni2
|
|
attribute: days_from_today
|
|
to: 1
|
|
action:
|
|
- service: persistent_notification.create
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 2
|
|
- service: notify.mobile_app_mikael_iphone
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 2
|
|
- service: notify.mobile_app_lina_iphone
|
|
data_template:
|
|
message: Sophämtning
|
|
title: Imorgon tömts kärl 2
|
|
- alias: Sovdags
|
|
id: sovdags
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: input_boolean.sovdags
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sovdags
|
|
state: 'on'
|
|
sequence:
|
|
- delay:
|
|
seconds: 10
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.mikaels_rum_tak
|
|
- light.mikaels_rum_hue_play
|
|
- light.mikaels_rum_ljusslinga
|
|
- light.mikaels_rum_skrivbord
|
|
- light.linas_skrivbord
|
|
- light.barnrum_tak_1
|
|
- delay:
|
|
seconds: 5
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_sleep_mode_allrum
|
|
- switch.adaptive_lighting_sleep_mode_allrum_belysning_filament
|
|
- switch.adaptive_lighting_sleep_mode_badrum
|
|
- switch.adaptive_lighting_sleep_mode_kok
|
|
- switch.adaptive_lighting_sleep_mode_kok_fonster
|
|
- switch.adaptive_lighting_sleep_mode_sovrum
|
|
- switch.adaptive_lighting_sleep_mode_tvattstuga
|
|
- switch.adaptive_lighting_sleep_mode_vardagsrum_belysning_filament
|
|
- switch.adaptive_lighting_sleep_mode_vardagsrum_tak
|
|
- switch.adaptive_lighting_sleep_mode_hall
|
|
- switch.adaptive_lighting_sleep_mode_barnrum
|
|
- delay:
|
|
seconds: 5
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_mikaels_rum
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.barnrum_fonster_1
|
|
- action: automation.turn_off
|
|
target:
|
|
entity_id:
|
|
- automation.barnrum_belysning
|
|
- automation.barnrum_belysning_fonster
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sovdags
|
|
state: 'off'
|
|
sequence:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_sleep_mode_allrum
|
|
- switch.adaptive_lighting_sleep_mode_allrum_belysning_filament
|
|
- switch.adaptive_lighting_sleep_mode_badrum
|
|
- switch.adaptive_lighting_sleep_mode_kok
|
|
- switch.adaptive_lighting_sleep_mode_kok_fonster
|
|
- switch.adaptive_lighting_sleep_mode_sovrum
|
|
- switch.adaptive_lighting_sleep_mode_tvattstuga
|
|
- switch.adaptive_lighting_sleep_mode_vardagsrum_belysning_filament
|
|
- switch.adaptive_lighting_sleep_mode_hall
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id:
|
|
- switch.adaptive_lighting_sovrum
|
|
- switch.adaptive_lighting_mikaels_rum
|
|
- alias: Sovrum belysning
|
|
id: sovrum_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.sovrum_belysning_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.sovrum_belysning_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.sovrum_byra
|
|
- light.sovrum_sang_lina
|
|
- light.sovrum_sang_mikael
|
|
- alias: Sovrum Säng Mikael Knapp
|
|
id: sovrum_sang_mikael_knapp
|
|
triggers:
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: d804ff674d445d8a0704fc6dc3634837
|
|
type: action
|
|
subtype: single
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: d804ff674d445d8a0704fc6dc3634837
|
|
type: action
|
|
subtype: double
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: d804ff674d445d8a0704fc6dc3634837
|
|
type: action
|
|
subtype: hold
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.payload == "single" }}'
|
|
sequence:
|
|
- action: input_boolean.toggle
|
|
target:
|
|
entity_id: input_boolean.sovdags
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.payload == "double" }}'
|
|
sequence:
|
|
- action: light.toggle
|
|
target:
|
|
entity_id: light.sovrum_sang_mikael
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.payload == "hold" }}'
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.sovrum
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.adaptive_lighting_sovrum
|
|
- alias: Teknikrum knapp
|
|
id: teknikrum_knapp
|
|
triggers:
|
|
- platform: device
|
|
domain: mqtt
|
|
device_id: 8f98424ec0a69a4e044ea99d3117134b
|
|
type: action
|
|
subtype: single
|
|
actions:
|
|
- action: light.toggle
|
|
target:
|
|
entity_id: light.teknikrum_tak
|
|
- alias: tibber_reload
|
|
id: tibber_reload
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /10
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ has_value(''sensor.electricity_price_sannesholma_2181'') ==
|
|
False }}
|
|
|
|
'
|
|
action:
|
|
- service: homeassistant.reload_config_entry
|
|
data: {}
|
|
target:
|
|
device_id: 03fdcc07bb636a9631c65c2dd1673eb5
|
|
mode: single
|
|
- alias: Torktumlare klar
|
|
id: torktumlare_klar
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.torktumlare
|
|
from: 'on'
|
|
to: 'off'
|
|
actions:
|
|
- action: notify.persistent_notification
|
|
data:
|
|
message: Torktumlare
|
|
title: Torktumlaren är klar
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Torktumlare klar
|
|
title: Torktumlaren är klar
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Torktumlare
|
|
title: Torktumlaren är klar
|
|
- alias: Tvättmaskin klar
|
|
id: tvattmaskin_klar
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattmaskin
|
|
from: 'on'
|
|
to: 'off'
|
|
actions:
|
|
- action: notify.persistent_notification
|
|
data:
|
|
message: Tvättmaskin
|
|
title: Tvätten är klar
|
|
- action: notify.mobile_app_mikael_iphone
|
|
data:
|
|
message: Tvättmaskin klar
|
|
title: Tvätten är klar
|
|
- action: notify.mobile_app_lina_iphone
|
|
data:
|
|
message: Tvättmaskin klar
|
|
title: Tvätten är klar
|
|
- alias: Tvättstuga belysning
|
|
id: tvattstuga_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.tvattstuga_belysning_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.tvattstuga_belysning_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.tvattstuga_fonster
|
|
- alias: Utomhusbelysning
|
|
id: Utomhusbelysning
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.utomhusbelysning_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.utomhusbelysning_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.utomhusbelysning_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.groventre_dorr
|
|
- light.carport_entre
|
|
- light.stolpe_gang
|
|
- light.stolpe_grind
|
|
- alias: Entré belysning
|
|
id: Entré belysning
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.utomhusbelysning_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.utomhusbelysning_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.utomhusbelysning_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.entre_dorr
|
|
- alias: Entré närvarobelysning
|
|
id: Entré närvarobelysning
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.entre_presence_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
state: 'on'
|
|
entity_id: binary_sensor.entre_presence_automation_control
|
|
sequence:
|
|
- service: switch.turn_off
|
|
entity_id: switch.adaptive_lighting_adapt_brightness_utomhusbelysning_hue
|
|
- service: light.turn_on
|
|
entity_id:
|
|
- light.entre_dorr
|
|
data:
|
|
brightness_pct: 100
|
|
- conditions:
|
|
- condition: state
|
|
state: 'off'
|
|
entity_id: binary_sensor.entre_presence_automation_control
|
|
sequence:
|
|
- service: switch.turn_on
|
|
entity_id: switch.adaptive_lighting_adapt_brightness_utomhusbelysning_hue
|
|
- alias: Utomhusbelysning film
|
|
id: Utomhusbelysning film
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.utomhusbelysning_film_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.utomhusbelysning_film_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.utomhusbelysning_film_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.koksentre_dorr
|
|
- light.snickarboa_entre
|
|
- light.stall_entre
|
|
- light.kackorna_entre
|
|
- alias: Ljusslingor
|
|
id: Ljusslingor
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.utomhusbelysning_ljusslingor_automation_control
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: '{% if is_state(''binary_sensor.utomhusbelysning_ljusslingor_automation_control'',
|
|
''on'') %} light.turn_on {% elif is_state(''binary_sensor.utomhusbelysning_ljusslingor_automation_control'',
|
|
''off'') %} light.turn_off {% endif %}
|
|
|
|
'
|
|
entity_id:
|
|
- light.entre_ljusslinga
|
|
- light.koksentre_ljusslinga
|
|
- light.vaxthus_ljusslinga
|
|
- light.lekstuga_ljusslinga
|
|
- alias: Vardagsrum belysning filament
|
|
id: Vardagsrum belysning filament
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.vardagsrum_belysning_filament_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.vardagsrum_belysning_filament_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.vardagsrum_fonster_fotogen
|
|
- light.vardagsrum_fonster_hangande
|
|
- alias: Vardagsrum belysning fönster
|
|
id: Vardagsrum belysning fönster
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.vardagsrum_belysning_fonster_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.vardagsrum_belysning_fonster_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.vardagsrum_fonster_piano
|
|
- light.vardagsrum_fonster_trappa
|
|
- light.vardagsrum_fonster_ytterdorr
|
|
- light.vardagsrum_fonster_vitrinskap
|
|
- light.trappa
|
|
- alias: Vardagsrum belysning tak
|
|
id: Vardagsrum belysning tak
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.vardagsrum_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.vardagsrum_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.vardagsrum_tak
|
|
- light.vardagsrum_bord
|
|
- alias: Vardagsrum värme
|
|
id: Vardagsrum värme
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: 2
|
|
- trigger: time_pattern
|
|
minutes: 32
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
target:
|
|
entity_id: climate.vardagsrum_varmegolv
|
|
data:
|
|
hvac_mode: '{{ iif(states(''binary_sensor.varmegolv_block'') == ''on'', ''off'',
|
|
''heat'') }}'
|
|
- alias: Walk in closet belysning
|
|
id: walk_in_closet_belysning
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.walk_in_closet_presence_light_automation_control
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: light.turn_{{ iif(states('binary_sensor.walk_in_closet_presence_light_automation_control')
|
|
== 'on', 'on', 'off') }}
|
|
target:
|
|
entity_id:
|
|
- light.walk_in_closet
|