Hi, another user kinda new to HA so seeking a little guidance.
I have some Brilliant Downlights which are using API 3.3. I’m also controlling them via the cloud with voice assistants, not ready to flash them just yet but would still like to make use of localtuya in HA as well.
I’ve managed to get them working (I’m using this fork) by changing the index IDs to:
The last problem I’m having is they seem use a brightness scale of 10 - 1000 instead of 25 - 255 and colour temp is set from 0 to 1000.
When I use the sliders of the component, I can only set a maximum brightness of 255 and a colour temp up to 255.
I’ve changed everything I could find relating to it in the scripts, so I’m guessing I’m left with HA storing these values in a scale of 0-255 and I will have to add some extra conversion in the scripts to scale them up to the 1000 range?
Am I on the right track?
Thanks
(Edit: Found this one which is already modified for the 1000 range)
Sounds like you may have it as a switch: ?
If so try light: (if you are using a different component and it doesn’t work try either of the two I linked.)
Update for light.dimmer_01 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/localtuya/light.py", line 223, in update
brightness = int(self._device.brightness())
File "/config/custom_components/localtuya/light.py", line 140, in brightness
return self._device.brightness()
File "/config/custom_components/localtuya/pytuya/__init__.py", line 560, in brightness
return self.status()[self.DPS][self.DPS_INDEX_BRIGHTNESS]
KeyError: '3'
What does this Error mean and what am I doing wrong? Thanks.
Has anyone had anyone had luck getting RGB lights to work?
This repository link seems to attempt it but it is not working and it seems that the previous contributors are not maintaining it anymore.
I got the closest with the code from @Alfiegerner but have not be able to get it going. I’m not a coder so it might just be syntax or something.
I’m trying to avoid flashing my devices at this stage as I need to keep them in a working state until I get more devices.