core: Ikea Tradfri bulbs missing attributes

Home Assistant release with the issue:

101.3

Last working Home Assistant release (if known): null

Operating environment (Hass.io/Docker/Windows/etc.):

arch x86_64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.4
timezone Europe/Bucharest
version 0.101.3
virtualenv false

Integration:

integration: deconz

Description of problem: Bulbs used: Tradfri bulb E27 WS Opal 1000lm fw: 2.0.022

  1. Turn on the bulb and you can see bulb has two attributes, brightness and color temp. see image before.png
  2. change color temperature like in image after.png you will observe color temperature attribute disappears.

This cause a lot of problems with any kind of switch or scene because if that scene or switch set a certain brightness and certain color temp and attributes is not present, the the bulb lights very dim and correct attributes are not set.

Bulb is integrated in home assistant though deconz integration and in deconz app itself works ok if I change color temperature of the bulb

This happens only with Tradfri bulbs (i have 3 all of them do the same), Osram and Philips Hue work ok

links images: before: https://i.postimg.cc/TYkjBf35/before.png after: https://i.postimg.cc/PrFZ2ySm/after.png

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant): This works OK

- id: aqara_smart_switch_one_press
  alias: switch - aquara smart one press
  trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      event: 1002
      id: xiaomi_smart_switch_1
  action:
  - service: light.toggle
    data:
      entity_id: light.osram_bulb_entrance
      brightness: 220
      color_temp: 250

This fails even if atributes are supported by the bulb

- id: aqara_smart_switch_one_press
  alias: switch - aquara smart one press
  trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      event: 1002
      id: xiaomi_smart_switch_1
  action:
  - service: light.toggle
    data:
      entity_id:  light.tradfri_bulb_hallway
      brightness: 220
      color_temp: 250

Traceback (if applicable):


Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

So I’ve had a look at this and believe I’ve found the problem.

To work around some bug in the IKEA firmware, deconz converts color temps to XY and sends those to the light instead (see deconz-rest-plugin #629). As a result, the light will always be in xy mode. RGB lights then also have their xy attribute set, but color temperature lights do not - they only return ct.

The deconz integration, however, refuses to return this value for color_temp unless colormode is also set to ct:

    @property
    def color_temp(self):
        """Return the CT color value."""
        if self._device.colormode != "ct":
            return None

        return self._device.ct

source

This appears to be redundant anyway, and removing it should fix the disappearing attribute.