Xenomes / Domoticz-TinyTUYA-Plugin

A bridge between Tinytuya and Domoticz
11 stars 6 forks source link

Support for brightness sensor #82

Closed GillesMart closed 7 months ago

GillesMart commented 8 months ago

Hello, Here is the json for a brightness sensor, that provides also temperature and humidity. It would be quite useful for automation when there's light in a room, to close shades or to shut off lights.

light_sensor.json

Best regards.

Xenomes commented 8 months ago

Hi GillesMart, Thanks for both JSON files. I will add this one to the sensor group. However, the 'Status of device:' is missing in the JSON. Can you provide it?

Xenomes commented 8 months ago

I made some manual edits to fill in the missing data, so please test it to ensure it is working correctly. I also added it to the Develop branch.

GillesMart commented 8 months ago

Hi Xenomes, Sorry for not having been able to answer sooner. Here is the JSON with the "status of device" information. light_sensor2.json I haven't tested the Develop branch yet.

GillesMart commented 8 months ago

Hi, I can see a Lux sensor and a switch. The Lux sensor does update, which is great. I don't know what the purpose of the switch is, because it's an always-on device. I don't see any effect. But anyway, it's in the JSON, so why not. Thank you very much.

Xenomes commented 8 months ago

Good to hear that it is working. Regarding the switch, there is nothing displayed in the app what looks like on/off function?

GillesMart commented 8 months ago

Found the manual: it's a switch for a buzzer, in order to hear alerts from the device itself: NAS‐CW01W6_manual.pdf

Xenomes commented 7 months ago

Okay, so the switch is also on the function side. Would you like to be in control of it?

GillesMart commented 7 months ago

Honestly I personally have no use for it, I just think it should be handled the same way as the other functions like humidity alarm and so on.

Xenomes commented 7 months ago

Perfect, then we leave it this way! Thanks!