Hi All,
I’ve introduced Number and Select entity types to support Tuya devices that don’t fit neatly with the current entity types.
I primarily introduced as I’ve got an Arlec Smart Security Light (MAL315HA) that doesn’t have a traditional on/off mode. It’s DPS config represents the following:
101 - Mode: mode_auto/mode_on/mode_off <Select>
102 - Light State: true/false <Binary Sensor Only>
103 - Motion Sensitivity: [0-4] <Number>
104 - Light Timeout when in Auto mode (secs) <Number>
105 - Light Cutout Threshold [0-3900] <Number>
106 - Reset to Auto after 1 hr in Manual On: True/False <Switch>
The Number entity type is pretty self explanatory. Has configuration for maximum/minimum values.
The Select entity type allows configuring of values to send through to a DP. In addition, I’ve added a User friendly mapping, so (as an example) that you can have “On” as the setting for the Select, which maps to “mode_on” as the value being sent to the device.
So in the Smart Security Light Example, I have setup a Select against DPS: 101 with the following:
- Name: Mode
- Valid Entries: mode_off;mode_on;mode_auto
- User Friendly Options: Off;On;Auto
If anyone is interested in giving it a try, the PR is #596. @Gabrie - This may assist with the light you were trying to setup