Open
Description
Hello,
I have a group named group.electrovannes
, with the following attributes:
entity_id:
- switch.ev1_1_gag_haie_nord
- switch.ev1_2_gag_maison
- switch.ev2_1_gag_haie_est_sud
- switch.ev2_2_jets_butte
order: 1
friendly_name: Electrovannes pour l'arrosage du jardin
In this pyscript code, I'm reading the attributes of this group, and then reading the list of entities composing the group:
group_attributes = state.getattr(group.electrovannes)
log.info(f"attributes: {group_attributes}")
valve_list = state.get('group.electrovannes.entity_id')
log.info(f"valve list: {valve_list}")
With pyscript 1.5.0, it displays the expected result :
attributes: {'entity_id': ('switch.ev1_1_gag_haie_nord', 'switch.ev1_2_gag_maison', 'switch.ev2_1_gag_haie_est_sud', 'switch.ev2_2_jets_butte'), 'order': 1, 'friendly_name': "Electrovannes pour l'arrosage du jardin"}
valve list: ('switch.ev1_1_gag_haie_nord', 'switch.ev1_2_gag_maison', 'switch.ev2_1_gag_haie_est_sud', 'switch.ev2_2_jets_butte')
However, with pyscript 1.6.0 / 1.6.1, the entity_id
attribute seems to not exist anymore, and I can't read it. The exact same code gives this logs:
attributes: {'order': 1, 'friendly_name': "Electrovannes pour l'arrosage du jardin"}
valve list: group.electrovannes
- The
entity_id
attribute of the group entity is not in the list of attributes state.get('group.electrovannes.entity_id')
is giving the entity ID of the group entity itself, instead of theentity_id
attribute of the group entity.
I guess that it's caused by this change: #555 (@dmamelin)
Is there another way to read the contents of a group?
Thanks
Metadata
Metadata
Assignees
Labels
No labels