<!--
!!!!! READ THIS FIRST: https://forum.phoscon.de/t/read-me-device-request…-read-me/23/2 !!!!!!
- Before requesting a device, please make sure to search the open and closed issues for any requests in the past.
- Make sure not to remove any headers and fill the template completely. If you remove the headers, the issue will be auto-closed.
- Sometimes devices have been requested before but are not implemented yet due to various reasons.
- If there are no hits for your device, please proceed.
- If you're unsure whether device support was already requested, please ask for advise in our Discord chat: https://discord.gg/QFhTxqN
-->
## Device
- Product name: Scene Switch (Powered by Tuya)
- Manufacturer: _TZ3000_w8jwkczz
- Model identifier: TS0043
- Device type :
- Switch
Front:

Back:

<!--
Please refer to https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support
on how the Basic Cluster attributes are obtained.
-->
## Screenshots
<!--
Screenshots help to identify the device and its capabilities. Please refer to:
https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support
for examples of the required screenshots.
Required screenshots:
- Endpoints and clusters of the node
- Node Info panel
In the Cluster Info panel press "read" button to retreive the values. Please note that at least "Manufacturer Name" and "Model Identifier" must be populated with data (therefore, must not be empty), otherwise that information will not be usable. For battery powered devices, after pressing read it is required to wake-up the device by pressing a button or any other means of interaction.
-->
<!--
If available add screenshots of other clusters. Please Remove sections that are not available on your device.
Relevant clusters are: Simple Metering, Electrical Measurement, Power Configuration, Thermostat, etc. You can typically spare Identify, Alarms, Device Temperature, On/Off. Please ensure data has been read prior to taking any screenshots.
-->


## Switch 01
### Basic

### Power Configuration

### On/Off

### OTAU (Grey)

### Time (Grey)
Shows nothing.
### On/Off (Grey)

## Switch 02
### Power Configuration

### On/Off

### On/Off (Grey)

## Switch 03
### Power Configuration

### On/Off

### On/Off (Grey)

## Attempt
I have attempted to imitate other code changes, such as this PR [here](https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4756/files) and compiled, tested and prepared a commit [here](https://github.com/kvnnap/deconz-rest-plugin/commit/9e4d97cbf4cab1f5e0ca8b9244179f7254d3f657). The device buttons work. I see the correct codes when a call to the REST API is made. However, I still see 3 On/Off entries under Lights in Phoscon. The resulting json and screenshots are below:
Correct switch addition:

```json
"3": {
"config": {
"battery": null,
"on": true,
"reachable": true
},
"ep": 1,
"etag": "7b783e20cf59c61f25ff3e2841af53a2",
"lastannounced": "2021-12-04T10:01:50Z",
"lastseen": "2021-12-04T10:01Z",
"manufacturername": "_TZ3000_w8jwkczz",
"mode": 1,
"modelid": "TS0043",
"name": "Switch",
"state": {
"buttonevent": 3002,
"lastupdated": "2021-12-04T09:56:12.904"
},
"type": "ZHASwitch",
"uniqueid": "80:4b:50:ff:fe:06:9a:e6-01-0006"
}
```
Incorrect light additions:

```json
"8": {
"etag": "0f4db69999cf0585054066ba8287affb",
"hascolor": false,
"lastannounced": "2021-12-04T10:01:50Z",
"lastseen": "2021-12-04T10:01Z",
"manufacturername": "_TZ3000_w8jwkczz",
"modelid": "TS0043",
"name": "On/Off light 8",
"state": {
"alert": "none",
"on": false,
"reachable": true
},
"swversion": null,
"type": "On/Off light",
"uniqueid": "80:4b:50:ff:fe:06:9a:e6-01"
},
"9": {
"etag": "e3443691a63e2147e780d80e469dc850",
"hascolor": false,
"lastannounced": "2021-12-04T10:01:50Z",
"lastseen": "2021-12-04T10:01Z",
"manufacturername": "_TZ3000_w8jwkczz",
"modelid": "TS0043",
"name": "On/Off light 9",
"state": {
"alert": "none",
"on": false,
"reachable": true
},
"swversion": null,
"type": "On/Off light",
"uniqueid": "80:4b:50:ff:fe:06:9a:e6-02"
},
"10": {
"etag": "0555947fec87e0ea2599a6ad5d17e405",
"hascolor": false,
"lastannounced": "2021-12-04T10:01:50Z",
"lastseen": "2021-12-04T10:01Z",
"manufacturername": "_TZ3000_w8jwkczz",
"modelid": "TS0043",
"name": "On/Off light 10",
"state": {
"alert": "none",
"on": false,
"reachable": true
},
"swversion": null,
"type": "On/Off light",
"uniqueid": "80:4b:50:ff:fe:06:9a:e6-03"
}
```
## Environment and Other
The software runs on a Rasperry Pi 4b inside a docker container. To compile the change, the following Dockerfile was produced:
```dockerfile
FROM debian:10.11-slim
ARG MYUSER=deconz
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y dist-upgrade \
&& apt-get -y install wget gnupg2 g++ make qtdeclarative5-dev \
&& wget -O - http://phoscon.de/apt/deconz.pub.key | apt-key add - \
&& echo "deb http://phoscon.de/apt/deconz $(cat /etc/os-release | grep -oP \
'(?<=VERSION_CODENAME\=).*')-beta main" > /etc/apt/sources.list.d/deconz.list \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install deconz-dev \
&& useradd -ms /bin/bash $MYUSER \
&& apt-get -y install --no-install-recommends sudo \
&& echo $MYUSER ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$MYUSER \
&& chmod 0440 /etc/sudoers.d/$MYUSER
USER $MYUSER
WORKDIR /home/$MYUSER
```
and this Dockerfile was used to test the change after libde_rest_plugin.so was compiled:
```dockerfile
FROM deconzcommunity/deconz:latest
COPY libde_rest_plugin.so /usr/share/deCONZ/plugins
COPY button_maps.json /usr/share/deCONZ/devices
```