Add support for Linptech Touch Screen Switch S5DB - #1735
Open
qjrxsoft02 wants to merge 3 commits into
Open
Conversation
This PR adds full MIoT specification support for the Linptech S5DB series BLE Mesh smart screen touch switches. This series of switches features built-in millimeter-wave human presence sensors and a touch interaction screen. 3 independent relay controls (channel_1, channel_2, channel_3), each supporting wired/wireless mode switching (select entities) Physical button events: single-click, double-click, and long-press events for 3 physical buttons (action sensors) Screen control: brightness adjustment (1–100%, number entity), night mode toggle Proximity sensing: occupancy (occupied/unoccupied) reported via events (binary sensor) 4 virtual switches (virtual_switch_a~d) for scene linkage Scene buttons (Home/Away/Leisure): reported via wireless switch events (service 12), mapped as scene_action sensor entities
Removed the non-readable and non-writable screen_brightness property because the access field is empty in the specification, and the device does not support brightness adjustment via MIoT.
Fix the code formatting. Add virtual switch click event: supports up to 32 virtual buttons (Service 12), mapped to scene_1 ~ scene_32, with the first three preset as scene_home, scene_away, and scene_leisure. Add virtual switch state change event: 32 virtual switches' on/off events (Service 13, Events 1 and 2), mapped to scene_away_on /scene_away_off ~ scene_32_on / scene_32_off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds full MIoT specification support for the Linptech S5DB series BLE Mesh smart screen touch switches. This series of switches features built-in distance sensors and a touch interaction screen. It includes 3 independent relay controls (channel_1, channel_2, channel_3), each supporting wired/wireless mode switching (select entities). There are 4 virtual switch entities (virtual_switch_a~d) for scene/automation linkage. Physical button events: single-click, double-click, and long-press events for 3 physical buttons (reported via action sensors). Virtual switch click events: up to 32 virtual buttons (service 12), mapped as scene_home~scene_32, with the first 3 preset as scene_home, scene_away, and scene_leisure. Virtual switch state change events: on/off events for 32 virtual switches (service 13, events 1 and 2), mapped as scene_home_on / scene_home_off ~ scene_32_on / scene_32_off, and night mode on (night_mode).Proximity sensing: occupancy state (occupied/unoccupied) is reported via the occupy event (9.e.1.p.1) as an occupancy binary sensor. All events are reported through a unified action sensor, ensuring full compatibility with the Gateway 3 automation trigger mechanism. Some advanced features (such as screen custom text, theme ID, screensaver type, screensaver startup time, time format, proximity sensing master switch, screen control: brightness adjustment, etc.) are not included as they are difficult to implement in Gateway 3, but the vast majority of available attributes have been covered.