core: Emulated hue - brightness difference in set/get causes device malfunction error
The problem
My ZWave Fibaro dimmer reports a brightness value that is close to, but not exactly the same as the brightness sent by Alexa to emulated_hue when setting brightness. E.g if emulated_hue sets a brightness of 72, the actual value reported by the dimmer is 70. I guess it’s because of conversion between the 0-255 brightness range and 0-100% supported by the dimmer.
After setting the value, Alexa does a further get of the entity to check if the brightness value has been updated. Any value returned that is not identical to the previously set value causes a device malfunctioning error. There are a few values that reliably return an identical brightness value, which works as expected (no malfunction error).
I’ve worked around it by caching the values from the set request, to re-use in the get request. It’s not ideal since it doesn’t reflect values set outside of the component.
Environment
- Home Assistant Core release with the issue: 0.108.3
- Last working Home Assistant Core release (if known):
- Operating environment (Home Assistant/Supervised/Docker/venv): Docker
- Integration causing this issue: emulated_hue
- Link to integration documentation on our website:
Problem-relevant configuration.yaml
default_config:
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homekit:
emulated_hue:
listen_port: 80
tplink:
Traceback/Error logs
Additional information
Line added to hue_api.py / line 391:
config.cached_states[entity_id] = parsed
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 33 (23 by maintainers)
zhashould be easy to fix as it just needs the same fixhuegot a while backhttps://github.com/home-assistant/core/pull/34190
Not yet - will get back to you tonight (GMT)
On Thu, 16 Apr 2020 at 03:33, J. Nick Koston notifications@github.com wrote: