home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.82k stars 30.51k forks source link

Light advertised as Dimmable by Emulated Hue #13296

Closed iditude closed 5 years ago

iditude commented 6 years ago

Home Assistant release (hass --version): 0.65.5

Python release (python3 --version): 3.5.3

Component/platform: Emulated Hue KNX

Description of problem: Lights are advertised to Alexa as dimmable when in fact they are not. This causes Alexa / Echo to try to set brightness when he can't. Often commands are as such not understood by Alexa.

Here is an example of http://192.168.253.5/api/pi/lights from emulated Hue

"4": {"modelid": "HASS123", "name": "Applique Salon", "state": {"bri": 255, "on": true, "reachable": true}, "swversion": "123", "type": "Dimmable light", "uniqueid": "light.applique_salon"}

Expected: Non dimmable lights should be advertised as switchable only. Also the Alexa App should be able to control lights (it fails today).

Problem-relevant configuration.yaml entries and steps to reproduce:

  listen_port: 80
  host_ip: 192.168.253.5
  expose_by_default: true
  exposed_domains:
    - light

EDIT: remove KNX piece as this is about Emulated Hue only and will do so for any type of light.

iditude commented 6 years ago

Changing to Emulated Hue impact only as after looking at the code, lights being advertised as "Dimmable" is actually hardcoded...

Line 353 'type': 'Dimmable light', from home-assistant/homeassistant/components/emulated_hue/hue_api.py

This shouldn't be the case as Alexa tries to control brightness on something that can't do that. I don't know if the API supports other values.

Thanks

iditude commented 6 years ago

Philips hue engineers confirm this is possible. Type for non dimmable lights (or switches) for instance should be 'On/off light' or 'On/Off plug-in unit'

Example of JSON are actually provided by Hue support: https://developers.meethue.com/content/whats-json-value-light-type-onoff-light

I have no knowledge of coding so can't really help, but this would be awesome.

Thanks

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

iditude commented 6 years ago

Commenting to keep this open.

The issue is still present (0.70.1). We should definitely make the integration better.

Thanks

MichaelBitard commented 6 years ago

By looking at the code it seems it's been implemented, however I cannot find a way to set my lights to non-dimmable. (I'm using rfxtrx lights)

That's why they appear dimmable in hue

balloobbot commented 5 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

balloobbot commented 5 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

MarcelS04 commented 5 years ago

I have this issue currently. I use to trigger a shelly over REST and of MQTT

For both types it states: { "modelid": "HASS123", "name": "Schlafzimmerlampe", "state": { "bri": 0, "hue": 0, "on": false, "reachable": true, "sat": 0 }, "swversion": "123", "type": "Dimmable light", "uniqueid": "switch.schlafzimmerlampe" }

I don't know why it is advertised as dimmable light, because there is nothing dimmable at all.