Automation to/from home not working after update

Hi, after last update to Core 2024.6.3 Supervisor 2024.06.0 Operating System 12.3 the automation for trigger for group.family to: home / from: home does not work anywere and on the dashboard the family group state is indicated with on/off insteade of home/not home. Do someone have any idea?
The automation.yaml is this:

- id: '1682530973040'
  alias: Siamo in casa
  description: Se uno di famiglia è in casa disattiva le telecamere
  trigger:
  - platform: state
    entity_id: group.famiglia
    to: home
  condition:
  - condition: time
    after: '00:00:00'
    before: '23:59:59'
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  action:
  - service: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005e0f93
  - service: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005dc803
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      device_id: 88f6f99d51ac06d6055ee7c9affa8bf6
  - service: notify.notify
    data:
      message: Le telecamere sono state spente
      title: Rientro in casa
  initial_state: 'true'
  mode: single
- id: '1682531097600'
  alias: Siamo fuori casa
  description: Se siamo tutti fuori casa attiva le telecamere e spegne le prese
  trigger:
  - platform: state
    entity_id: group.famiglia
    from: home
  condition:
  - condition: time
    before: '20:00:00'
    after: '08:00:00'
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005de35f
    enabled: false
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005e0f93
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005dc803
  - service: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.sonoff_10005cbb23
  - service: notify.notify
    data:
      message: Le telecamere sono state accese
      title: Uscita di casa
  initial_state: 'true'
  mode: single

First, would you please format your code properly for readability? It will be very difficult to assess the problem and help you otherwise.

f6be36681e0da431418ec7781fb6c62712941803

Sorry, I had formated the code.
Thank

1 Like

looks like a known issue:

for now what i’d do is to key off the group state being either home or on.

  - platform: state
    entity_id: group.famiglia
    to: home

Have you tried changing this to on/off to see if that fixes your problem? There is a known issue for this so you could either change this until it’s fixed or put in an additional condition for the “new” states.

  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      device_id: 88f6f99d51ac06d6055ee7c9affa8bf6

This is generally bad practice, you should be keying in on the entity state, not the device ID’s state change. There are some things that require it but this doesn’t and could cause you headaches in the future.

Thank, I will take a look.

Thank for the reply, I try to modify device_id to entity_id; I tried to use on/off but nothing changed also changing

to: home

with

state: on

i don’t think this is allowed:

state: on

i this format should enable you to trigger off multiple possible synonymous states

- platform: state
  entity_id: group.famiglia
  to: 
    - "home"
    - "on"

Looks like a bug in a recent HA update?

I used to have

    - condition: state
      entity_id: group.parents
      state : 'not_home'

but now looks like I’ll need to use

    - condition: state
      entity_id: group.parents
      state : 'off'

Thank you all for the replies and suggestions; solved with:

  - platform: state
    entity_id:
      - group.famiglia
    to: "off"
  - platform: state
    entity_id:
      - group.famiglia
    to: "on"

using quotation marks for the to: value