fix: rename bathroom/kitchen/lobby/room motion sensors to match system entity_ids
This commit is contained in:
@@ -386,7 +386,7 @@ controls_light:
|
|||||||
trigger:
|
trigger:
|
||||||
# Условия для запуска таймера освещения
|
# Условия для запуска таймера освещения
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_room
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_komnata
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
@@ -625,7 +625,7 @@ controls_light:
|
|||||||
description: ""
|
description: ""
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_bathroom
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_vannaia
|
||||||
to: "on"
|
to: "on"
|
||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
@@ -1023,7 +1023,7 @@ controls_light:
|
|||||||
trigger:
|
trigger:
|
||||||
# Условия для запуска таймера освещения
|
# Условия для запуска таймера освещения
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_kitchen
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_kukhnia
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ sensor_chek_lighton_presencenone:
|
|||||||
# Сенсор автоотключения света ванна
|
# Сенсор автоотключения света ванна
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: "Сенсор вкл свет без движения ванная"
|
- name: "Сенсор вкл свет без движения ванная"
|
||||||
unique_id: lighton_presencenone_bathroom
|
unique_id: sensor_vkl_svet_bez_dvizheniia_vannaia
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state("binary_sensor.lighton_presencenone_bathroom", "on") %}
|
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_vannaia", "on") %}
|
||||||
mdi:timer
|
mdi:timer
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:timer-off
|
mdi:timer-off
|
||||||
@@ -17,14 +17,13 @@ sensor_chek_lighton_presencenone:
|
|||||||
{{ (is_state('light.yeelink_ceilc_cc51_light', 'on') or
|
{{ (is_state('light.yeelink_ceilc_cc51_light', 'on') or
|
||||||
is_state('light.yeelink_ceilc_cc51_ambient_light', 'on') or
|
is_state('light.yeelink_ceilc_cc51_ambient_light', 'on') or
|
||||||
is_state('switch.rele_zerkalo_i_ventiliatsiia_l1', 'on')) and
|
is_state('switch.rele_zerkalo_i_ventiliatsiia_l1', 'on')) and
|
||||||
is_state('binary_sensor.datchik_prisutstviia_vannaia_presence', 'off') }}
|
states('binary_sensor.datchik_prisutstviia_vannaia_presence') in ['off', 'unavailable', 'unknown'] }}
|
||||||
|
|
||||||
|
|
||||||
# Сенсор автоотключения света кухня
|
# Сенсор автоотключения света кухня
|
||||||
- name: "Сенсор вкл свет без движения кухня"
|
- name: "Сенсор вкл свет без движения кухня"
|
||||||
unique_id: lighton_presencenone_kitchen
|
unique_id: sensor_vkl_svet_bez_dvizheniia_kukhnia
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state("binary_sensor.lighton_presencenone_kitchen", "on") %}
|
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_kukhnia", "on") %}
|
||||||
mdi:timer
|
mdi:timer
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:timer-off
|
mdi:timer-off
|
||||||
@@ -32,31 +31,31 @@ sensor_chek_lighton_presencenone:
|
|||||||
state: >-
|
state: >-
|
||||||
{{ (is_state('light.yeelink_ceilc_ff3a_light', 'on') or
|
{{ (is_state('light.yeelink_ceilc_ff3a_light', 'on') or
|
||||||
is_state('light.yeelink_ceilc_ff3a_ambient_light', 'on')) and
|
is_state('light.yeelink_ceilc_ff3a_ambient_light', 'on')) and
|
||||||
is_state('binary_sensor.datchik_prisutstviia_kukhnia_presence', 'off') }}
|
states('binary_sensor.datchik_prisutstviia_kukhnia_presence') in ['off', 'unavailable', 'unknown'] }}
|
||||||
|
|
||||||
# Сенсор автоотключения света коридор
|
# Сенсор автоотключения света коридор
|
||||||
- name: "Сенсор вкл свет без движения коридор"
|
- name: "Сенсор вкл свет без движения коридор"
|
||||||
unique_id: lighton_presencenone_lobby
|
unique_id: sensor_vkl_svet_bez_dvizheniia_koridor
|
||||||
icon: "{{ 'mdi:timer' if this.state == 'on' else 'mdi:timer-off' }}"
|
icon: "{{ 'mdi:timer' if this.state == 'on' else 'mdi:timer-off' }}"
|
||||||
state: >-
|
state: >-
|
||||||
{{ (is_state('switch.glavnyi_vykliuchatel_prikhozhaia_left', 'on') or
|
{{ (is_state('switch.glavnyi_vykliuchatel_prikhozhaia_left', 'on') or
|
||||||
is_state('switch.glavnyi_vykliuchatel_prikhozhaia_right', 'on')) and
|
is_state('switch.glavnyi_vykliuchatel_prikhozhaia_right', 'on')) and
|
||||||
is_state('binary_sensor.datchik_dvizheniia_prikhozhaia_occupancy', 'off') }}
|
states('binary_sensor.datchik_dvizheniia_prikhozhaia_occupancy') in ['off', 'unavailable', 'unknown'] }}
|
||||||
|
|
||||||
# Сенсор автоотключения света комната
|
# Сенсор автоотключения света комната
|
||||||
- name: "Сенсор вкл свет без движения комната"
|
- name: "Сенсор вкл свет без движения комната"
|
||||||
unique_id: lighton_presencenone_room
|
unique_id: sensor_vkl_svet_bez_dvizheniia_komnata
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state("binary_sensor.lighton_presencenone_room", "on") %}
|
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_komnata", "on") %}
|
||||||
mdi:timer
|
mdi:timer
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:timer-off
|
mdi:timer-off
|
||||||
{% endif %}
|
{% endif %}
|
||||||
state: >-
|
state: >-
|
||||||
{{ is_state('light.yeelink_ceiling19_d85c_light', 'on') and
|
{{ is_state('light.yeelink_ceiling19_d85c_light', 'on') and
|
||||||
is_state('binary_sensor.54ef44e327ba_motion', 'off') and
|
states('binary_sensor.54ef44e327ba_motion') in ['off', 'unavailable', 'unknown'] and
|
||||||
is_state('binary_sensor.54ef44e45e59_motion', 'off') and
|
states('binary_sensor.54ef44e45e59_motion') in ['off', 'unavailable', 'unknown'] and
|
||||||
is_state('binary_sensor.54ef44e32e91_motion', 'off') }}
|
states('binary_sensor.54ef44e32e91_motion') in ['off', 'unavailable', 'unknown'] }}
|
||||||
###################################################################################
|
###################################################################################
|
||||||
timer:
|
timer:
|
||||||
timer_lighton_presencenone_bathroom:
|
timer_lighton_presencenone_bathroom:
|
||||||
@@ -74,7 +73,7 @@ sensor_chek_lighton_presencenone:
|
|||||||
###################################################################################
|
###################################################################################
|
||||||
automation:
|
automation:
|
||||||
|
|
||||||
# Таймер автоотключения \\ /homeassistant/includes/packages/controls_light.yaml
|
# Таймер автоотключения \ /homeassistant/includes/packages/controls_light.yaml
|
||||||
|
|
||||||
###################################################################################
|
###################################################################################
|
||||||
# Сброс таймера при выключении
|
# Сброс таймера при выключении
|
||||||
@@ -84,7 +83,7 @@ sensor_chek_lighton_presencenone:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_bathroom
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_vannaia
|
||||||
to: 'off'
|
to: 'off'
|
||||||
action:
|
action:
|
||||||
- service: timer.cancel
|
- service: timer.cancel
|
||||||
@@ -96,7 +95,7 @@ sensor_chek_lighton_presencenone:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_kitchen
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_kukhnia
|
||||||
to: 'off'
|
to: 'off'
|
||||||
action:
|
action:
|
||||||
- service: timer.cancel
|
- service: timer.cancel
|
||||||
@@ -120,7 +119,7 @@ sensor_chek_lighton_presencenone:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.lighton_presencenone_room
|
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_komnata
|
||||||
to: 'off'
|
to: 'off'
|
||||||
action:
|
action:
|
||||||
- service: timer.cancel
|
- service: timer.cancel
|
||||||
@@ -190,4 +189,4 @@ sensor_chek_lighton_presencenone:
|
|||||||
|
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
|
||||||
# Автоматизация отключения света по таймеру \\ /homeassistant/includes/packages/controls_light.yaml
|
# Автоматизация отключения света по таймеру \ /homeassistant/includes/packages/controls_light.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user