Open universam1 opened 7 years ago
I'm using a Sonoff as a smart Actuator and Sensor. Sensor is working nicely, but the actuating message is fixed in code https://github.com/Manuel83/cbpi-mqtt/blob/1f36edc0634610a850cf742d42fdd3181dab144f/__init__.py#L35 as {"state": "on"} which is not compatible in my case. My Sonoff is expecting a mere string on in this regard.
{"state": "on"}
on
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.
Yep that would work, very similar to the code used in HTTP Actor.
I'm using a Sonoff as a smart Actuator and Sensor. Sensor is working nicely, but the actuating message is fixed in code https://github.com/Manuel83/cbpi-mqtt/blob/1f36edc0634610a850cf742d42fdd3181dab144f/__init__.py#L35 as
{"state": "on"}
which is not compatible in my case. My Sonoff is expecting a mere stringon
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.