mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
blue_room to boys_room
This commit is contained in:
@@ -12,13 +12,13 @@ blueprint:
|
||||
daytime_ends:
|
||||
name: Time of night
|
||||
description: Change level depending of time of day, Nighttime level
|
||||
default: '20:00:00'
|
||||
default: "20:00:00"
|
||||
selector:
|
||||
time: {}
|
||||
volume_day:
|
||||
name: Set volume day
|
||||
description: The volume you want your media player to be reset to
|
||||
default: '0.5'
|
||||
default: "0.5"
|
||||
selector:
|
||||
number:
|
||||
min: 0.0
|
||||
@@ -28,7 +28,7 @@ blueprint:
|
||||
volume_night:
|
||||
name: Set volume night
|
||||
description: The volume you want your media player to be reset to
|
||||
default: '0.1'
|
||||
default: "0.1"
|
||||
selector:
|
||||
number:
|
||||
min: 0.0
|
||||
@@ -37,7 +37,8 @@ blueprint:
|
||||
mode: slider
|
||||
filter:
|
||||
name: Filter players
|
||||
description: Players not to be reset or not. Only entities are supported, devices
|
||||
description:
|
||||
Players not to be reset or not. Only entities are supported, devices
|
||||
must be expanded!
|
||||
default:
|
||||
entity_id: []
|
||||
@@ -53,8 +54,9 @@ blueprint:
|
||||
boolean: {}
|
||||
source_url: https://gist.github.com/Ante987/80c376901fa5f2bd9d2197734ec49e80
|
||||
variables:
|
||||
filter: !input 'filter'
|
||||
player: "{% set result = namespace(player=[]) %} {% for state in states.media_player\
|
||||
filter: !input "filter"
|
||||
player:
|
||||
"{% set result = namespace(player=[]) %} {% for state in states.media_player\
|
||||
\ %}\n {% if include_exclude == 'true' %}\n {% if not state.state == 'playing'\
|
||||
\ and not state.entity_id in filter.entity_id %}\n {% set result.player =\
|
||||
\ result.player + [state.entity_id] %}\n {% endif %}\n {% else %}\n {%\
|
||||
@@ -62,24 +64,24 @@ variables:
|
||||
\ {% set result.player = result.player + [state.entity_id] %}\n {% endif\
|
||||
\ %}\n {% endif %}\n{% endfor %} {{result.player|join(',')}}\n"
|
||||
trigger:
|
||||
- platform: time
|
||||
at: !input 'daytime_starts'
|
||||
- platform: time
|
||||
at: !input 'daytime_ends'
|
||||
- platform: time
|
||||
at: !input "daytime_starts"
|
||||
- platform: time
|
||||
at: !input "daytime_ends"
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- after: !input 'daytime_starts'
|
||||
before: !input 'daytime_ends'
|
||||
condition: time
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id: '{{ player }}'
|
||||
volume_level: !input 'volume_day'
|
||||
default:
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id: '{{ player }}'
|
||||
volume_level: !input 'volume_night'
|
||||
- choose:
|
||||
- conditions:
|
||||
- after: !input "daytime_starts"
|
||||
before: !input "daytime_ends"
|
||||
condition: time
|
||||
sequence:
|
||||
- action: media_player.volume_set
|
||||
data_template:
|
||||
entity_id: "{{ player }}"
|
||||
volume_level: !input "volume_day"
|
||||
default:
|
||||
- action: media_player.volume_set
|
||||
data_template:
|
||||
entity_id: "{{ player }}"
|
||||
volume_level: !input "volume_night"
|
||||
mode: single
|
||||
|
||||
+438
-358
File diff suppressed because it is too large
Load Diff
@@ -75,39 +75,39 @@ blueprint:
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
variables:
|
||||
device_id: !input 'ge_jasco'
|
||||
device_id: !input "ge_jasco"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
condition: '{{ trigger.event.data.device_id == device_id }}'
|
||||
- platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
condition: "{{ trigger.event.data.device_id == device_id }}"
|
||||
action:
|
||||
- variables:
|
||||
property_key_name: '{{ trigger.event.data.property_key_name }}'
|
||||
label: '{{ trigger.event.data.label }}'
|
||||
command_class_name: '{{ trigger.event.data.command_class_name }}'
|
||||
value: '{{ trigger.event.data.value }}'
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: 'Z-Wave JS'
|
||||
message: 'received event: {{ command_class_name }} - {{ value }} - {{ label }}'
|
||||
- choose:
|
||||
- conditions: '{{ property_key_name == ''001'' and value == ''KeyPressed'' }}'
|
||||
sequence: !input 'tap_1x_up'
|
||||
- conditions: '{{ property_key_name == ''002'' and value == ''KeyPressed'' }}'
|
||||
sequence: !input 'tap_1x_dn'
|
||||
- conditions: '{{ property_key_name == ''001'' and value == ''KeyPressed2x'' }}'
|
||||
sequence: !input 'tap_2x_up'
|
||||
- conditions: '{{ property_key_name == ''002'' and value == ''KeyPressed2x'' }}'
|
||||
sequence: !input 'tap_2x_dn'
|
||||
- conditions: '{{ property_key_name == ''001'' and value == ''KeyPressed3x'' }}'
|
||||
sequence: !input 'tap_3x_up'
|
||||
- conditions: '{{ property_key_name == ''002'' and value == ''KeyPressed3x'' }}'
|
||||
sequence: !input 'tap_3x_dn'
|
||||
- conditions: '{{ property_key_name == ''001'' and value == ''KeyHeldDown'' }}'
|
||||
sequence: !input 'up_btn_hld'
|
||||
- conditions: '{{ property_key_name == ''001'' and value == ''KeyReleased'' }}'
|
||||
sequence: !input 'up_btn_rel'
|
||||
- conditions: '{{ property_key_name == ''002'' and value == ''KeyHeldDown'' }}'
|
||||
sequence: !input 'dn_btn_hld'
|
||||
- conditions: '{{ property_key_name == ''002'' and value == ''KeyReleased'' }}'
|
||||
sequence: !input 'dn_btn_rel'
|
||||
- variables:
|
||||
property_key_name: "{{ trigger.event.data.property_key_name }}"
|
||||
label: "{{ trigger.event.data.label }}"
|
||||
command_class_name: "{{ trigger.event.data.command_class_name }}"
|
||||
value: "{{ trigger.event.data.value }}"
|
||||
- action: logbook.log
|
||||
data:
|
||||
name: "Z-Wave JS"
|
||||
message: "received event: {{ command_class_name }} - {{ value }} - {{ label }}"
|
||||
- choose:
|
||||
- conditions: "{{ property_key_name == '001' and value == 'KeyPressed' }}"
|
||||
sequence: !input "tap_1x_up"
|
||||
- conditions: "{{ property_key_name == '002' and value == 'KeyPressed' }}"
|
||||
sequence: !input "tap_1x_dn"
|
||||
- conditions: "{{ property_key_name == '001' and value == 'KeyPressed2x' }}"
|
||||
sequence: !input "tap_2x_up"
|
||||
- conditions: "{{ property_key_name == '002' and value == 'KeyPressed2x' }}"
|
||||
sequence: !input "tap_2x_dn"
|
||||
- conditions: "{{ property_key_name == '001' and value == 'KeyPressed3x' }}"
|
||||
sequence: !input "tap_3x_up"
|
||||
- conditions: "{{ property_key_name == '002' and value == 'KeyPressed3x' }}"
|
||||
sequence: !input "tap_3x_dn"
|
||||
- conditions: "{{ property_key_name == '001' and value == 'KeyHeldDown' }}"
|
||||
sequence: !input "up_btn_hld"
|
||||
- conditions: "{{ property_key_name == '001' and value == 'KeyReleased' }}"
|
||||
sequence: !input "up_btn_rel"
|
||||
- conditions: "{{ property_key_name == '002' and value == 'KeyHeldDown' }}"
|
||||
sequence: !input "dn_btn_hld"
|
||||
- conditions: "{{ property_key_name == '002' and value == 'KeyReleased' }}"
|
||||
sequence: !input "dn_btn_rel"
|
||||
|
||||
@@ -32,7 +32,7 @@ blueprint:
|
||||
off_option:
|
||||
name: Off Option
|
||||
description: The Input_Select option that implies the room is forcefully Off.
|
||||
default: 'Off'
|
||||
default: "Off"
|
||||
selector:
|
||||
text:
|
||||
|
||||
@@ -91,7 +91,7 @@ trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id: !input room_occupied
|
||||
to: 'off'
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id: !input light_level_sensor
|
||||
@@ -107,45 +107,45 @@ condition:
|
||||
state: !input off_option
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- "{{ states(light_level_sensor) | float(default=0) >= states(light_level_trigger) | float(default=0) }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input lighting_automations
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: 'off'
|
||||
- condition: not
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input room_mode
|
||||
state: !input manual_option
|
||||
- "{{ states(light_level_sensor) | float(default=0) >= states(light_level_trigger) | float(default=0) }}"
|
||||
sequence:
|
||||
- alias: Turn off lights
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: !input target_light
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ manual_switch is defined }}"
|
||||
- "{{ guest_mode is defined }}"
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: !input guest_mode
|
||||
state: 'on'
|
||||
sequence:
|
||||
- alias: "Turn off the switch since all lights are off"
|
||||
service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: !input manual_switch
|
||||
entity_id: !input lighting_automations
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: "off"
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input room_mode
|
||||
state: !input manual_option
|
||||
- "{{ states(light_level_sensor) | float(default=0) >= states(light_level_trigger) | float(default=0) }}"
|
||||
sequence:
|
||||
- alias: Turn off lights
|
||||
action: light.turn_off
|
||||
target:
|
||||
entity_id: !input target_light
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ manual_switch is defined }}"
|
||||
- "{{ guest_mode is defined }}"
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: !input guest_mode
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off the switch since all lights are off"
|
||||
action: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: !input manual_switch
|
||||
|
||||
@@ -31,7 +31,7 @@ blueprint:
|
||||
off_option:
|
||||
name: Off Option
|
||||
description: The Input_Select option that implies the room is forcefully Off.
|
||||
default: 'Off'
|
||||
default: "Off"
|
||||
selector:
|
||||
text:
|
||||
|
||||
@@ -175,7 +175,6 @@ condition:
|
||||
- alias: "Check if light should turn on"
|
||||
condition: or
|
||||
conditions:
|
||||
|
||||
- alias: "Guest mode is on"
|
||||
condition: state
|
||||
entity_id: !input guest_mode
|
||||
@@ -184,7 +183,6 @@ condition:
|
||||
- alias: "Motion or occupancy were detected in a dim room"
|
||||
condition: and
|
||||
conditions:
|
||||
|
||||
- alias: "Light level below trigger amount"
|
||||
condition: numeric_state
|
||||
entity_id: !input light_level_sensor
|
||||
@@ -212,54 +210,54 @@ condition:
|
||||
|
||||
action:
|
||||
- alias: "Make sure the switch is turned on"
|
||||
service: homeassistant.turn_on
|
||||
action: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: !input manual_switch
|
||||
- choose:
|
||||
- alias: "If the room is set to manual, just turn the lights on"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,manual_option)}}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: "{{light_entity}}"
|
||||
- alias: "If the room is set to manual, just turn the lights on"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,manual_option)}}"
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: "{{light_entity}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,auto_option)}}"
|
||||
- "{{is_state(light_entity,'on')}}"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states(light_scene_transition) }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,auto_option)}}"
|
||||
- "{{is_state(light_entity,'on')}}"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states(light_scene_transition) }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,auto_option)}}"
|
||||
- "{{is_state(light_entity,'off')}}"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
|
||||
conditions:
|
||||
- "{{is_state(room_mode,auto_option)}}"
|
||||
- "{{is_state(light_entity,'off')}}"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the room mode scene with a transition"
|
||||
conditions:
|
||||
- "{{is_state(light_entity,'on')}}"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states(light_scene_transition) }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the room mode scene with a transition"
|
||||
conditions:
|
||||
- "{{is_state(light_entity,'on')}}"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states(light_scene_transition) }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the room scene without a transition"
|
||||
conditions:
|
||||
- "{{is_state(light_entity,'off')}}"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the room scene without a transition"
|
||||
conditions:
|
||||
- "{{is_state(light_entity,'off')}}"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- delay: 1
|
||||
- delay: 1
|
||||
|
||||
@@ -59,26 +59,26 @@ mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !input home_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
id: room_occupied
|
||||
entity_id: !input binary_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: 'not_occupied'
|
||||
id: "not_occupied"
|
||||
entity_id:
|
||||
- !input home_occupied
|
||||
- !input binary_sensor
|
||||
to: 'off'
|
||||
to: "off"
|
||||
for:
|
||||
seconds: !input delay_seconds
|
||||
|
||||
- platform: time_pattern
|
||||
id: 'time_pattern'
|
||||
id: "time_pattern"
|
||||
minutes: "/5"
|
||||
|
||||
condition:
|
||||
@@ -87,7 +87,7 @@ condition:
|
||||
- alias: "Home not occupied"
|
||||
condition: state
|
||||
entity_id: !input home_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- alias: "Room just occupied"
|
||||
condition: trigger
|
||||
@@ -98,56 +98,56 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- condition: state
|
||||
entity_id: !input binary_sensor
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- alias: "Home not occupied"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
|
||||
- alias: "Room not occupied"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: not_occupied
|
||||
- condition: not
|
||||
- alias: "Home not occupied"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input house_mode
|
||||
state: !input manual_option
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
- condition: state
|
||||
entity_id: !input home_occupied
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
|
||||
- alias: "Room occupied"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: room_occupied
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: !input room_occupied
|
||||
- alias: "Room not occupied"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: not_occupied
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input house_mode
|
||||
state: !input manual_option
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
|
||||
- alias: "Time pattern"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: time_pattern
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: !input binary_sensor
|
||||
state: 'off'
|
||||
for:
|
||||
seconds: !input delay_seconds
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
- alias: "Room occupied"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: room_occupied
|
||||
sequence:
|
||||
- action: homeassistant.turn_on
|
||||
entity_id: !input room_occupied
|
||||
|
||||
- alias: "Time pattern"
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: time_pattern
|
||||
- condition: state
|
||||
entity_id: !input room_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: !input binary_sensor
|
||||
state: "off"
|
||||
for:
|
||||
seconds: !input delay_seconds
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: !input room_occupied
|
||||
|
||||
@@ -111,54 +111,54 @@ blueprint:
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
variables:
|
||||
device_id: !input 'inovelli_fan_switch'
|
||||
device_id: !input "inovelli_fan_switch"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
condition: '{{ trigger.event.data.device_id == device_id }}'
|
||||
- platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
condition: "{{ trigger.event.data.device_id == device_id }}"
|
||||
action:
|
||||
- variables:
|
||||
button_id: '{{ trigger.event.data.property_key_name }}'
|
||||
press_count: '{{ trigger.event.data.value }}'
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: Button Id
|
||||
message: '{{ button_id }}'
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: Press Count
|
||||
message: '{{ press_count }}'
|
||||
- variables:
|
||||
button_id: "{{ trigger.event.data.property_key_name }}"
|
||||
press_count: "{{ trigger.event.data.value }}"
|
||||
- action: logbook.log
|
||||
data:
|
||||
name: Button Id
|
||||
message: "{{ button_id }}"
|
||||
- action: logbook.log
|
||||
data:
|
||||
name: Press Count
|
||||
message: "{{ press_count }}"
|
||||
|
||||
- choose:
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_a'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_b'
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyHeldDown" }}'
|
||||
sequence: !input 'button_a_held'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyHeldDown" }}'
|
||||
sequence: !input 'button_b_held'
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed2x" }}'
|
||||
sequence: !input 'button_a2'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed2x" }}'
|
||||
sequence: !input 'button_b2'
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed3x" }}'
|
||||
sequence: !input 'button_a3'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed3x" }}'
|
||||
sequence: !input 'button_b3'
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed4x" }}'
|
||||
sequence: !input 'button_a4'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed4x" }}'
|
||||
sequence: !input 'button_b4'
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed5x" }}'
|
||||
sequence: !input 'button_a5'
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed5x" }}'
|
||||
sequence: !input 'button_b5'
|
||||
- conditions: '{{ button_id == "003" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_c1'
|
||||
- conditions: '{{ button_id == "004" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_c2'
|
||||
- conditions: '{{ button_id == "005" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_d1'
|
||||
- conditions: '{{ button_id == "006" and press_count == "KeyPressed" }}'
|
||||
sequence: !input 'button_d2'
|
||||
- choose:
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_a"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_b"
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyHeldDown" }}'
|
||||
sequence: !input "button_a_held"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyHeldDown" }}'
|
||||
sequence: !input "button_b_held"
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed2x" }}'
|
||||
sequence: !input "button_a2"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed2x" }}'
|
||||
sequence: !input "button_b2"
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed3x" }}'
|
||||
sequence: !input "button_a3"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed3x" }}'
|
||||
sequence: !input "button_b3"
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed4x" }}'
|
||||
sequence: !input "button_a4"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed4x" }}'
|
||||
sequence: !input "button_b4"
|
||||
- conditions: '{{ button_id == "002" and press_count == "KeyPressed5x" }}'
|
||||
sequence: !input "button_a5"
|
||||
- conditions: '{{ button_id == "001" and press_count == "KeyPressed5x" }}'
|
||||
sequence: !input "button_b5"
|
||||
- conditions: '{{ button_id == "003" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_c1"
|
||||
- conditions: '{{ button_id == "004" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_c2"
|
||||
- conditions: '{{ button_id == "005" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_d1"
|
||||
- conditions: '{{ button_id == "006" and press_count == "KeyPressed" }}'
|
||||
sequence: !input "button_d2"
|
||||
|
||||
@@ -46,13 +46,13 @@ max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: 'motion_or_presence_on'
|
||||
id: "motion_or_presence_on"
|
||||
entity_id: !input motion_entity
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
id: 'presence_off'
|
||||
id: "presence_off"
|
||||
entity_id: !input presence_boolean
|
||||
from: "on"
|
||||
to: "off"
|
||||
@@ -61,9 +61,9 @@ action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
trigger: 'motion_or_presence_on'
|
||||
trigger: "motion_or_presence_on"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
- wait_for_trigger:
|
||||
platform: state
|
||||
@@ -71,13 +71,12 @@ action:
|
||||
from: "on"
|
||||
to: "off"
|
||||
- delay: !input no_motion_wait
|
||||
- service: light.turn_off
|
||||
- action: light.turn_off
|
||||
target: !input light_target
|
||||
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
trigger: 'presence_off'
|
||||
trigger: "presence_off"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
- action: light.turn_off
|
||||
target: !input light_target
|
||||
|
||||
|
||||
Reference in New Issue
Block a user