Possible Bug - Calling entity_id all in Script

Hi Guys,

I’ve just upgraded to the latest version of HA Core yesterday and found that my very simple script which turns off all my lights and switches using the entity_id all has stopped working!

I’m now getting the following error message:

> Error: Template rendered invalid entity IDs: all

However the entity_id all is still worked when called in an automation???

alias: Away Mode
sequence:
  - service: light.turn_off
    data: {}
    target:
      entity_id: all
  - service: switch.turn_off
    data: {}
    target:
      entity_id: all
  - service: homeassistant.turn_on
    target:
      entity_id: group.hue_motion_switches
    data: {}
  - service: alarm_control_panel.alarm_arm_away
    target:
      entity_id: alarm_control_panel.alarm
    data: {}
  - service: notify.notify
    data:
      message: The House is Secure
mode: single
3 Likes

According to Service Calls it’s

  - service: light.turn_off
    entity_id: all
4 Likes

Thanks @m0wlheld that’s strange, because I orginally created the script using the script editor, not manually in yamal and the above code was working up until the update yesterday.

I’ve manually edited it and it’s now working again as expected, so thanks.

Same for me. Thanks for your tip. That’s really a huge and annoying bug that it is not possible with the gui anymore.

1 Like

Thank you @m0wlheld ! its been bugging me the last few days… Same scenario - I only did it through the UI, not YAML - annoying that doing it through the UI does it wrong now

2 Likes

Thanks for that. Edited the yaml manually and it’s working again. UI still setting it wrongly as

target: 
  entity_id: all
1 Like

Thanks for the solution! By the way: did someone know if this bug is already reported? (I could not found anything)

Just upgraded to 2022.2.9 yesterday and also got bitten by this last night. The script was created with the UI as well.

Is this a bug, or a breaking change that didn’t get documented?

Is there a GitHub issue for this?

Thanks

Same issue still happening here, also couldn’t find a bug report somewhere. I can recall issues with this before so it looks like this is a recurring bug with some core releases…

I haven’t had a chance to upgrade to 2022.3.7 and test yet, but the release notes say there is a fix in 2202.3.7:

From the PR a number of bug reports had been raised across different devices domains (light, lock, etc.).