0.84.2 script doesn't execute completely because of turn_off group. Why?

using this has been working for over a year…

why would 0.84.1+ stop this all of a sudden? Cant find an irregularity, and yet is doesn’t get past the switches to turn off.

naar_bed:
  alias: Naar bed
  sequence:
    - service: script.scene_naar_bed   # ok
    - service: switch.turn_on
      entity_id: 
        - switch.sw_master_bedroom_cl
        - switch.master_bed_outlet   # ok
    - service: home_assistant.turn_off
      entity_id: group.media_player_media  #ok i think, the group is off
    - service: switch.turn_off
      entity_id:
        - switch.sw_espresso_keuken_cl
        - switch.sw_tv_library_cl
        - switch.sw_netwerk_library_cl
        - switch.sw_audio_gym_cl
        - switch.sw_tv_auditorium_cl
        - switch.sw_netwerk_dorm_cl
        - switch.subwoofer_outlet   # not ok, still on, and no further continuation 
    - delay:
        seconds: 5
    - service: switch.turn_off
      entity_id: switch.sw_audio_auditorium_cl
    - delay:
        seconds: 5
    - service: switch.turn_off
      entity_id: switch.sw_netwerk_auditorium_cl

I don’t get an error at all. Simply stops.
Hope 0.84.1 doesn’t stop when some of these switches are already in an Off state. Hasn’t bothered HA before, and would be a major issue. Ive just entered this in the dev-service manually for each entity, which of course all are valid entities…, and even when already being Off, turning off doesn’t create an error. So no issues in that department.

because of the fact the above script doesn’t reach its end, the script that calls it, and does some other things after it, doesn’t end either…

  - alias: 'Activity selection'
    id: 'Activity selection'
#    hide_entity: True
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: input_select.activity
    condition:
      condition: template
      value_template: >
        {{ states('input_select.activity') in 
            ['Opstaan','Aan de slag','Home theater',
             'Gym', 'Gaming', 'Selamat makan', 'Naar bed', 'Slapen'] }}
    action:
      - service_template: >
          script.{{ trigger.to_state.state | lower | replace(' ','_') }}
      - delay:
          seconds: 2
      - service: mqtt.publish
        data_template:
          topic: 'activity_selection'
          retain: true
          payload: >
            {{ states('input_select.activity') }}
      - service: python_script.summary

in other words, this is a complete mess now, why o why.
fear this has to do with it:

but nothing more on this?

please help?

I can’t help but just stopped in to say that after seeing all of the posts in the last day or so with all the issues you’ve had with this upgrade you’ve definitely put me off doing it for now.

But I’m sure I’ll have to tackle it eventually if I ever want to upgrade in the future. :fearful:

The world I came from was; “If there is an upgrade/update, it is published for a reason therefore apply it”. In that world and this one it is obvious that delaying upgrades by more than 3 major revisions is a sure path to disaster.
Houston… we have a pickle.

This happen to me too. I really don’t know where and how to fix it. o.O’ So now roll back.

Wasn’t there something in the release notes about errors in scripts and automations now stopping the continued execution? If so isn’t there a previously undetected error you need to fix?

Maybe… somewhere… sometime… buried in an “oh btw” sentence.
Should we rephrase “read the release notes” to “read the source code”?

Only if you are incapable of reading the note at the top (under 4th heading “Improved service calling”) It’s not like it is hidden!

I have change to match the breaking change for

  1. light.mqtt for schema: json, I have only 2 mqtt light from Bruh Multisensor.
  2. lovelace as a tester so open the mode yaml.
  3. some custom component update for 0.84 like broadlink ir, broadlink climate. Most of this warning in home-assistant.log that it is third parties components.
  4. google assistant component to #expose by defaults: false
  5. I have 2 people in my family we both use iphone so we enable home assistant ios app and also owntracks. The owntracks has breaking change and already works fine for me. But not detect my family. since 0.83 So I would remove it in 0.84
  6. Furthermore with automation. I always put initial_state: on / every automation as I want it to always listen to trigger. All my automations alsow dissapear from classic ui.

I did configuration check. It’s all vaild. All my rf switches (from broadlink), sensor, binary_sensor, automation all dissapear from frontend classic ui. But they all can be seen in developer tools.

@Mariusthvdb what do your logs say?

@Sunonline I think you need to open a new thread for your problem. It seems unrelated to this topic.

I use 0.76. Works flawless for me. No reason to update at all.

that’s just it, they don’t say anything, (related to script execution that is), and I have enable logger to use homeassistant.components.script: debug

yes this is what the release note say:

We have improved how we call services with better validation checks. This means that if you have an automation or a script that sends invalid data, we will now stop the execution and be better able to point out where your incorrect calls are coming from.

there’s no pointing to any incorrect call though as far as I can see. Should this be in the regular log? with a log level set to debug maybe, (is what I have seen it to).

Don’t think so, but that’s what I posted my scripts for, maybe anyone of you could spot it with new eyes.

Ive even thought this over:

If you want to continue managing a YAML file, [check here how to enable the YAML mode](https://www.home-assistant.io/lovelace/yaml-mode/). The file ui-lovelace.yaml will now follow the same options as configuration.yaml. This means that the Lovelace YAML config is now parsed with YAML 1.1 instead of YAML 1.2. Major change is that you need to make sure that you wrap on and off with quotes in your configs!

since I do use yaml mode. Thing is I don’t have any on/off in these scripts to use quotes on…

Ok, I found out after commenting out each individual row and restart…

seems the

  - service: home_assistant.turn_off
      entity_id: group.media_player_media

stops the script from continuing. Must investigate if these are all valid entities, but there’s nothing in the logs.

Some of these media_players cause issues in Lovelace not having a state, and the group itself has state Unknown.

Now where to start. Is this a bug? Or is this per (new) design. Thing is, these media_players only get initialized when active, and that’s exactly what’s bugging Lovelace. In regular HA they aren’t shown, or have state Unavailable…

27

33

anyways, how to have a command to turn_off this group (to prevent HA fro trying to read these media_players all night and day, which is a bug, or should I say design error, in its own…)

changed OP title accordingly.

or need I do this: