-
Instead of updating If so, when a script starts, it would create/recreate/update the groups relevant to its operations. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It is possible (I think, though I've not actually tried it with Once a group is created, you can change its entities using the With that being said, if your intended use case of these groups is all within Pyscript, you don't actually need a Home Assistant Group to do this. You could create a variable in pyscript that maintained the list of entities that should be in the group and refer to the variable whenever you needed to access them. |
Beta Was this translation helpful? Give feedback.
It is possible (I think, though I've not actually tried it with
group
, however, it works fine in other domains) to create a group from pyscript though it may be more complicated than it is worth.Once a group is created, you can change its entities using the
group.set
service call.With that being said, if your intended use case of these groups is all within Pyscript, you don't actually need a Home Assistant Group to do this. You could create a variable in pyscript that maintained the list of entities that should be in the group and refer to the variable whenever you needed to access them.