mirror of
https://github.com/nuttytree/ESPHome-Devices.git
synced 2024-08-30 18:12:19 +00:00
Fix off trigger for basement bathroom fan
Try to speed up on trigger for basement bathroom light
This commit is contained in:
parent
1390ae0c43
commit
bcc3a5a15a
@ -40,28 +40,6 @@ binary_sensor:
|
||||
pin:
|
||||
number: D0
|
||||
mode: INPUT_PULLDOWN_16
|
||||
|
||||
- platform: template
|
||||
id: motion_delay_30s
|
||||
lambda: return id(motion).state;
|
||||
filters:
|
||||
- delayed_off: 30s
|
||||
|
||||
- platform: template
|
||||
id: motion_delay_20m
|
||||
lambda: return id(motion).state;
|
||||
filters:
|
||||
- delayed_off: 20min
|
||||
|
||||
- platform: template
|
||||
id: trigger_motion
|
||||
lambda: |-
|
||||
if (id(door).state) {
|
||||
return id(motion_delay_30s).state;
|
||||
}
|
||||
else {
|
||||
return id(motion_delay_20m).state;
|
||||
}
|
||||
on_press:
|
||||
then:
|
||||
- if:
|
||||
@ -84,6 +62,28 @@ binary_sensor:
|
||||
service: homeassistant.turn_on
|
||||
data:
|
||||
entity_id: switch.basement_shower_light
|
||||
|
||||
- platform: template
|
||||
id: motion_delay_30s
|
||||
lambda: return id(motion).state;
|
||||
filters:
|
||||
- delayed_off: 30s
|
||||
|
||||
- platform: template
|
||||
id: motion_delay_20m
|
||||
lambda: return id(motion).state;
|
||||
filters:
|
||||
- delayed_off: 20min
|
||||
|
||||
- platform: template
|
||||
id: trigger_motion
|
||||
lambda: |-
|
||||
if (id(door).state) {
|
||||
return id(motion_delay_30s).state;
|
||||
}
|
||||
else {
|
||||
return id(motion_delay_20m).state;
|
||||
}
|
||||
on_release:
|
||||
then:
|
||||
- homeassistant.service:
|
||||
@ -127,7 +127,7 @@ binary_sensor:
|
||||
- homeassistant.service:
|
||||
service: homeassistant.turn_off
|
||||
data:
|
||||
entity_id: switch.basement_bathroom_fan
|
||||
entity_id: fan.basement_bathroom_fan
|
||||
|
||||
- platform: homeassistant
|
||||
id: day_night
|
||||
|
Loading…
Reference in New Issue
Block a user