Danielhiversen/pySwitchbot

Adding support for new SwitchBot Blind Tilt

Closed this issue · 5 comments

Hi,

I just received my SwitchBot Blind Tilt , and I would like to see if I can be of any assistance to help adding support to pySwitchbot. For example, is there any bluetooth capture I could provide to help more capable people implement the protocol for these new devices ?

Regards

I can assist with this. I'll try to spend some time tonight to write a quick example program so I can extend the library to support Blind Tilt and the Hub mini (gets detected as plug mini for some odd reason )

Thank you @jesserockz you beat me to the punch and did a much cleaner job than my hack job i was doing. Tested the code in HA after tweaking the switchbot component and it appears to work great:

image

2023-01-07 13:23:45.486 DEBUG (MainThread) [homeassistant.components.switchbot.coordinator] F5:E2:25:5E:23:52: Switchbot data: {'rawAdvData': b'x\x00Q', 'data': {'calibration': False, 'battery': 81, 'inMotion': True, 'tilt': 61, 'lightLevel': 2, 'firmware': 1.2, 'light': False, 'fault': False, 'solarPanel': True, 'calibrated': True, 'motionDirection': {'up': True, 'down': False}, 'position': 100, 'timers': 0}, 'model': 'x', 'isEncrypted': False, 'modelFriendlyName': 'Blind Tilt', 'modelName': <SwitchbotModel.BLIND_TILT: 'WoBlindTilt'>}

@jesserocks could you update the SwitchBotAPI-BLE repo with your finding with a PR? I will then merge for others to reference.

@jesserockz
@BTMorton

Because HA core repo's policy on integration feature requests is to have them posted on the forum, would it be possible to post your proposed HA core implementation behavior (mentioned at #181 (comment)) on the feature request to get community feedback? (Here's the thread I found requesting support for the blind tilt: https://community.home-assistant.io/t/support-for-switchbot-blind-tilt/518207)

I'd do it myself but am unable to find Jesse's HA branch to fully understand the proposed behavior.

@jeremywgleeson My code does not require changes to HA cores structure. It just exposes a cover entity with only tilt control, no open/close control which is already supported with supported_features.

I am opening a draft PR on HA core (home-assistant/core#86591) to show what I mean