Skip to content

Error in describing trigger: Cannot read properties of undefined (reading ‘includes’) #29585

Description

@Mastiffen

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

It was suggested that I opened this as an issue here, by an admin on the board. I have searched the board and it seems to have raised it's head in other users' automations at least a year or two back. Today all my motion sensing automations based on the motion activated light brightness stopped working. I see the same error in them all. I had to delete them all and recreated them to get them working again. This is the automation that runs on the blueprint:

alias: Bevegelsesaktivert lys på soverom i andre oppe
description: ""
use_blueprint:
  path: Aleks130699/motion_light_brightness.yaml
  input:
    motion_entity: binary_sensor.templatebevegelsessensor_pa_soverom_i_andre_oppe
    on_night_time: "23:00:00"
    off_night_time: "07:00:00"
    day_brightness: 100
    night_brightness: 20
    light_target:
      entity_id: light.dimmer_for_taklys_pa_soverom_i_andre

Here's the blueprint:

blueprint:
  name: Motion-activated Light-brightness
  description: Turn the light on to brightness when motion is detected, depending
    on the selected time period, different brightness and turn-on time.
  domain: automation
  input:
    motion_entity:
      name: Motion Sensor
      selector:
        entity:
          domain:
          - binary_sensor
          device_class:
          - motion
          multiple: false
    light_target:
      name: Light
      selector:
        target:
          entity:
          - domain:
            - light
    on_night_time:
      name: (Required) On Time Night
      description: The time when the night mode starts.
      selector:
        time: {}
    off_night_time:
      name: (Required) Off Time Night
      description: The time when the night mode ends.
      selector:
        time: {}
    day_brightness:
      name: Day brightness
      description: Brightness, in daytime mode
      default: 1
      selector:
        number:
          min: 1.0
          max: 100.0
          step: 1.0
          mode: slider
    night_brightness:
      name: Night brightness
      description: Brightness, in night mode mode
      default: 1
      selector:
        number:
          min: 1.0
          max: 100.0
          step: 1.0
          mode: slider
    no_motion_wait_day:
      name: Wait time day
      description: Time to leave the light on after detecting the last movement for
        daytime mode.
      default: 120
      selector:
        number:
          min: 0.0
          max: 3600.0
          unit_of_measurement: seconds
          mode: slider
          step: 1.0
    no_motion_wait_night:
      name: Wait time night
      description: Time to leave the light on after detecting the last movement in
        night mode
      default: 120
      selector:
        number:
          min: 0.0
          max: 3600.0
          unit_of_measurement: seconds
          mode: slider
          step: 1.0
  source_url: https://gist.github.com/Aleks130699/5021baf8f4f1d63800d0f42842ba62b5
mode: restart
max_exceeded: silent
trigger:
  platform: state
  entity_id: !input motion_entity
  from: 'off'
  to: 'on'
action:
- choose:
  - conditions:
    - condition: time
      after: !input on_night_time
      before: !input off_night_time
    sequence:
    - alias: Turn on the light
      service: light.turn_on
      data:
        brightness_pct: !input night_brightness
      target: !input light_target
    - alias: Wait until there is no motion from device
      wait_for_trigger:
        platform: state
        entity_id: !input motion_entity
        from: 'on'
        to: 'off'
    - alias: Wait the number of seconds that has been set
      delay: !input no_motion_wait_night
    - alias: Turn off the light
      service: light.turn_off
      target: !input light_target
  default:
  - alias: Turn on the light
    service: light.turn_on
    data:
      brightness_pct: !input day_brightness
    target: !input light_target
  - alias: Wait until there is no motion from device
    wait_for_trigger:
      platform: state
      entity_id: !input motion_entity
      from: 'on'
      to: 'off'
  - alias: Wait the number of seconds that has been set
    delay: !input no_motion_wait_day
  - alias: Turn off the light
    service: light.turn_off
    target: !input light_target

The trigger is a template sensor, that allows the automation to be deactivated wit a boolean in other automations (activating and deactivating the automations themselfes has to many possible errors):

{{ ('on' in states('input_boolean.bevegelsesstyrt_lys_pa_badet')) and ('on' in states('binary_sensor.alle_bevegelsessensorer_pa_badet')) }}

The binary_sensor.alle_bevegelsessensorer_pa_badet is a sensor group with two physical Z-Wave motion sensors and one virtual sensor, a boolean that can be swithed by other automations to keep the light on in the controlled room.

Here's a screenshot of the trace, unfortunately after I recreated the automation, so it worked again, but the error message is there:

Image

So deleting and recreating the automations seems to fix that they are not workin, but I don't know for how long.

I am using the exact same blueprint at another location, and there I get the message Unknown trigger in trace, but the automation works as they should. At that location I have version 2025.11.3, while the version in my house with the problem is 2026.2.1. So something seemed to have happened between those versions.

Describe the behavior you expected

It should just keep on working.

Steps to reproduce the issue

  1. The steps are in the description.

...

What version of Home Assistant Core has the issue?

2026.2.1

What was the last working version of Home Assistant Core?

2025.11.3

In which browser are you experiencing the issue?

No response

Which operating system are you using to run this browser?

WIndows 10 Pro

State of relevant entities

Problem-relevant frontend configuration

JavaScript errors shown in your browser console/inspector

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions