diff --git a/packages/master_bedroom.yaml b/packages/master_bedroom.yaml index 3bc2a8b..ba17a6d 100644 --- a/packages/master_bedroom.yaml +++ b/packages/master_bedroom.yaml @@ -102,7 +102,7 @@ script: {% set ct = ct() | int %} {% set cooling = state_attr('input_datetime.master_bedroom_cooling','timestamp') | int %} {% set wakeup = state_attr('input_datetime.master_bedroom_wakeup','timestamp') | int %} - {{ 21600 < ct < cooling }} + {{ (21600 < ct < cooling) and is_state('binary_sensor.people_sleeping','off') }} then: - service: button.press target: