mirror of
https://github.com/home-assistant/core.git
synced 2025-05-01 20:57:51 +00:00
Simple_alarm will only show known_alarm if that light is already on
This commit is contained in:
parent
dd55d6c7f9
commit
4e1b094449
@ -83,10 +83,10 @@ def setup(hass, config):
|
|||||||
light.ENTITY_ID_ALL_LIGHTS,
|
light.ENTITY_ID_ALL_LIGHTS,
|
||||||
unknown_alarm_if_lights_on, STATE_OFF, STATE_ON)
|
unknown_alarm_if_lights_on, STATE_OFF, STATE_ON)
|
||||||
|
|
||||||
# Not defined as a lambda so the __repr__ has a nice name.
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def ring_known_alarm(entity_id, old_state, new_state):
|
def ring_known_alarm(entity_id, old_state, new_state):
|
||||||
""" Called when a known person comes home. """
|
""" Called when a known person comes home. """
|
||||||
|
if light.is_on(hass, known_light_id):
|
||||||
known_alarm()
|
known_alarm()
|
||||||
|
|
||||||
# Track home coming of each device
|
# Track home coming of each device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user