kiwi-cam / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
304 stars 95 forks source link

Add ability to specify which state a stateless switch is in #645

Open jasonlboggs opened 1 year ago

jasonlboggs commented 1 year ago

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!

stale[bot] commented 11 months ago

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.

jasonlboggs commented 11 months ago

Not stale.