added support for a trigger sensor
This commit is contained in:
parent
14f7e8bb52
commit
8658995acc
@ -327,5 +327,10 @@ class Publisher:
|
||||
|
||||
def create_onoff_sensor(self) -> Payload:
|
||||
""" 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"])
|
||||
|
||||
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"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user