Extracting entities from Group for actions

I had an automation which used to work well, but since it last mattered things have broken
The automation checks my window sensor group and warns us if we’ve left windows open - we’re currently in a heatwave and after leaving the house with a window open realised it was giving me the wrong result… but it definitely used to give the right result

The following is in my check windows sensor node as the payload

(
   $group:=$entity().attributes.entity_id;
   $names:=$entities().*[entity_id in $group and state="on"].attributes.friendly_name;
   $yes:="Warning! Windows open! The windows are: " & $join($names, ", ") & ". Warning!";
   $no:="No windows are currently open";
   $count($names)>0 ? $yes : $no 
)

The group in question shows the correct state:

And it passes a payload. Unfortunately it only ever passes the No payload…
So it appears the $names variable is no longer populating

Does anyone know why this might be, and more to the point, how to fix it?!

Edit: checking the complete message object it doesn’t look like it’s obtaining any state for the entities within that. Maybe that’s okay?

What set of home assistant nodes? In mange palette look at home assistant web socket nodes. I am on the latest version(0.77) and it looks like $entities() is no longer returning the entire cache.

I’m on 0.75.0 (offering me an update to 0.77)

I guess if $entities() is no longer returning the entire cache then that’s probably the problem
Do you think that’s intentional or a bug? And any thoughts on how to fix?

It may be a change on the HA side. What version of HA are you using?

  • Installation method: Home Assistant OS
  • Core: 2025.6.1
  • Supervisor: 2025.05.5
  • Operating System: 15.2
  • Frontend: 20250531.3

It was a bug and I reported it. It’s been fixed, ver 0.77.1 should show up in the palette manger shortly if it is not there already.

1 Like

Oh awesome, thanks for that! Will check it out later

Thanks again Mike - just double checked and everything is now working as expected :slight_smile:

1 Like