updating configuration
This commit is contained in:
@@ -7,14 +7,17 @@ Arguments:
|
||||
- events: List of events to monitor
|
||||
"""
|
||||
class Test(hass.Hass):
|
||||
notify = None
|
||||
# notify = None
|
||||
|
||||
def initialize(self) -> None:
|
||||
self.listen_state(self.sensor_trigger, 'sensor.0x00158d0003a361d8_action')
|
||||
self.listen_state(self.sensor_trigger, 'binary_sensor.0x00158d0003f26d61_occupancy')
|
||||
# self.listen_state(self.sensor_trigger, 'sensor.remote20_action')
|
||||
self.log("hello")
|
||||
# notifier = self.args.get("notify", "telegram")
|
||||
# self.notify("hello world", name = "telegram")
|
||||
# self.listen_state(self.sensor_trigger, "sensor.0x00158d0003a361d8_action")
|
||||
# self.listen_state(self.sensor_trigger, "binary_sensor.0x00158d0003f26d61_occupancy")
|
||||
# self.listen_state(self.sensor_trigger, "sensor.remote20_action")
|
||||
|
||||
def sensor_trigger(self, entity, attribute, old, new, kwargs):
|
||||
if new != "" and new != "unknown":
|
||||
self.log("doorbell call")
|
||||
self.toggle("switch.0x00158d00020f3a29_switch")
|
||||
# def sensor_trigger(self, entity, attribute, old, new, kwargs):
|
||||
# if new != "" and new != "unknown":
|
||||
# self.log("doorbell call")
|
||||
# self.toggle("switch.0x00158d00020f3a29_switch")
|
||||
|
||||
Reference in New Issue
Block a user