Skip to content

payload message needs to be customizable #3

@universam1

Description

@universam1

I'm using a Sonoff as a smart Actuator and Sensor. Sensor is working nicely, but the actuating message is fixed in code

self.api.cache["mqtt"].client.publish(self.topic, payload=json.dumps({"state": "on"}), qos=0, retain=False)
as {"state": "on"} which is not compatible in my case. My Sonoff is expecting a mere string on in this regard.

Therefore, I would like to ask to make the on and off messages customizable, a user could just predefine two string parameter as off and on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions