kiwi-cam/homebridge-broadlink-rm

Add ability to specify which state a stateless switch is in

Opened this issue · 2 comments

Thank you for continuing to maintain this plugin!

Describe the solution you'd like
I see you added "stateless": true back in 2021. This feature is excellent, but it would be nice if I could specify the resting state of the stateless switch. I looked at the PR (#287) and it looks like stateless switches are coded to return to a false state every time. It would be great if I could specify something like "statelessState": true to have the switch always return to a true state. I'm currently using enableAutoOn as true and offDuration set to 0.01 and that works OK, but sometimes my device glitches out a little if I'm repeatedly hitting the button (it's being used as a volume button).

Describe alternatives you've considered
N/A

Additional context
Something like this would be great:

              {
                  "name": "Volume Up",
                  "type": "switch",
                  "stateless": true,
                  "statelessState": true,
                  "data": [
                      {
                          "data": "HEX"
                      }
                  ]
              }

Thank you!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Not stale.