Home Assistant release (hass --version):
0.55
Python release (python3 --version):3.5
3.5
Component/platform:
Tradfri
Description of problem:
Groups imported from the Tradfri platform are not updated when lights inside group are updated.
Group can be on while lights inside are all off.
Expected:
Group following
Problem-relevant configuration.yaml entries and steps to reproduce:
discover:
Additional info:
Mix of IKEA none RGB lights.
I investigated this a bit a while ago using pytradfri and it seemed that the response from the gateway regarding group state was not correct after changing state of a light via pytradfri. Changing state of light in ikea app didn't show this issue.
@MartinHjelmare I tested with the app also. Lights turned off/on in the IKEA Tradfri application do not update the group either.
Ok, yeah it was a while ago, so I don't remember all results exactly. At least the app group state is correct after changing the light state in app, so somehow this should be fixable in pytradfri. But I didn't come to final conclusion.
When I turn on/off lights in the group (tradfri gw imported group which for HA is light.
I think the bug is there and should be fixed.
Also would be nice to add the gw maintenance controls set in pytradfri 2.2.3.
I can confirm; when I use scenes to turn on only some of the lights in a group, the group does not turn on.
I can confirm this. When I use the remote to switch the lights off/on, the status of the bulbs are updated but not of the group. This worked with earlier versions of Homeassistant. I noticed this in 0.57. But it may existed already before...
I have this issue as well running Hass.io 0.58.1
I can confirm this bug on my hassio setup.
This issue seems to have been under the radar. Now that major issues with Tradfri are solved, maybe its time to poke the smart people...
@NovapaX @ggravlingen @lwis
Would you gents please check if this is something that can be fixed ?
I can look into it, but it鈥檚 probably something that should be fixed (maybe partially) in pytradfri. If it is I see if I can raise an issue there.
But I鈥檒l probably won鈥檛 have time until next week.
Greatly appreciated @NovapaX ! :-)
I reckon this is something that has to be resolved in the HASS implementation of Tradfri.
I think this is down to the Gateway, first step would be to subscribe to a group and make some changes to lights and see what happens.
@lwis you mean that if you pass the arguments for changing eg xy to a group, the gateway passes the request on to associated entities?
This issue describes a group not updating when the bulbs are changed without using the group, I'm curious to see if the group is reporting updates when it's individual bulbs are changed.
@lwis on Hass.io 0.58.1 I have a Ikea gateway group of 3 bulbs (same type) called "Fixture 1" when I issue light.turn_on to "Fixture 1" all three bulbs light up but the Ikea gateway group in Hass.io shows the status "off" even though the individual bulbs shows "on".
@lwis Ah, now I see what you mean. :+1:
As I suspected;
Waiting for observation to end (2 mins)
Try altering any group in the app, and watch the events!
decrypt_verify(): found 144 bytes cleartext
Received message for: <Group Bedroom - off>
No events from changing an individual light in a group, or the group from the app. Either we're doing something wrong when we subscribe, or the Gateway just doesn't report group status events correctly.
Unless anyone has anything to add, this should be closed due to API limitations.
Must have something to do with the update that broke everything. Groups was working before and updating fine when doing light.turn_on 'some tradfri group' both the group and individual lights showed status 'on', now only the individual lights shows 'on' while the group shows 'off'.
Which update broke it?
I only ask as this has never been reliable for me, even when we were polling. Which is why I have groups disabled in my configuration.
There may be a misunderstanding here, I guess, what I meant ans assume the OP meant are imported tradfri app groups, not groups created in HA.
To illustrate it I have one light in tradfri group.:
HA light toggled > IKEA APP group and light changes > HA ikea group does not change.
IKEA APP group toggled > HA light changes > HA ikea group does not change.
HA ikea group toggled > HA light changes > IKEA APP group and light changes.
*you can replace the "HA light" "HA group of lights" and the behavior is exactly the same. [edit]
NB: I have not seen any difference in behavior over any update since the initial tradfri release. I'm using the GU10 as ceiling lights in most rooms so they are in groups, and I use this daily, I would have seen a difference. I guess something else is impacting your config @skeptizzle
For me it was working before Ikea introduced DTLS, I wanna say it was working before transitions was introduced and maybe even after. I haven't experienced any issues that I know of before the DTLS stuff...
@ferdydek this is how it looks for me.
tradfri:
host: 192.168.0.x
allow_tradfri_groups: true
When i look at states in Hass.io it look like this:
(light.gangen is the group created with the IKEA APP and the panels 1 and 2 are members of the ikea app group.)
When i issue:
action:
- service: light.turn_on
entity_id: light.gangen
The state of light.gangen remains 'off' but sometimes the panel 1 and 2 remain off. That is why my action is looking like this now:
action:
- service: light.turn_on
entity_id:
- light.gang_panel_1
- light.gang_panel_2
This last action works 100% of the time and i'm trying to live with the delay on turning them on.
@ferdydek maybe I should do a factory reset of the gateway? I'm using my lights daily as well and none of the groups from the gateway changes state to 'on' when I turn them on in HA.
I just nuked a previous 0.55 version of HA to upgrade to the latest from scratch. The only thing in my HA install is Tradfri right now, and I'm having the same problem with groups not updating. This is a problem with lights triggered via the Tradfri motion sensor (PIR) - the PIR triggers the light on, HA shows the light is on, but the group as off.
I have the same issue with motion sensor and also with grouped lights.

In this example, Salon is the group of the two bulbs that are on, but Salon is off.
Running: Home Assistant 0.60.1
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:
The problem is still there with the last hass.io version.
The group doesn't refresh their status :-(
Hassio and VirtEnv alike still have this issue.
I didn't see any major rework PRs recently so I guess we are in a place that this "bug" could be addressed.
The only way for us to proceed with this is to switch groups to polling (pull) rather than using observation (push) as the gateway does not send events correctly when observing groups.
If, in the future, the gateway is fixed we can remove the polling.
I'll raise a PR soon if it doesn't get changed before I get to it.
Hello, I had the same issue with IKEA groups.
But I think this happening due to a wrong design of HA groups. I though to the logic behind, and I realized we missed one important point point: a group is a group (several elements), and it has not to be considered to behave as an entity.
It should support only the BRODCAST capability (to send the command to all its elements) and it should not have a defined state (e.g. on/off).
I have "Group A" with Lamp1,Lam2,Lamp3 and then I send the "HA_GroupA.turn_on"
Now all 3 lamps are ON, and stating to the actual group design, also Group A is ON (yellow lamp icon)
...but if I send HA_Lamp2.turn_off then only the Lamp2 is turned off.
Now the question is:
So, I would like to introduce in HA the new concept that a group, _is only a "Toggle group",_ and any command/event is sent the all the elements of the group. There is no state of the group, the state is the actual state of each single element, and the group icon should be something like concentric boxes that never change shape/colour.
This has perfect sense and would resolve the issue.
PS: Even if you decide to scan the status of all the elements to decide if a group is on or off, then you should introduce the concept of ON/OFF/PARTIAL, and I think it would be a new complexity without great value.
@antimix Tradfri group != HA group.
Tradfri keeps track of groups in its own way, and that's not something we can change. The platform is not grouping lights as part of the code, it's just reading the raw data from the gateway. That is not something we should interfere with.