added support for a trigger sensor

This commit is contained in:
Kim Bauters 2018-07-26 15:25:52 +01:00
parent 14f7e8bb52
commit 8658995acc

View File

@ -327,5 +327,10 @@ class Publisher:
def create_onoff_sensor(self) -> Payload: def create_onoff_sensor(self) -> Payload:
""" Create the Payload object for a basic on/off sensor. """ Create the Payload object for a basic on/off sensor.
:return: a Payload object with a single "onoff" key. """ :return: a Payload object with a single "on" key. """
return Payload(self, "onoff", keys=["on"]) return Payload(self, "onoff", keys=["on"])
def create_trigger_sensor(self) -> Payload:
""" Create the Payload object for a basic trigger sensor.
:return: a Payload object with a single "triggered" key. """
return Payload(self, "trigger", keys=["triggered"])