Error in describing trigger: can't access property "includes", t is undefined

Hi, I’m getting the error in the title that I can’t resolve. This is the trigger

trigger:
  - platform: numeric_state
    entity_id: sensor.valvola_letto_current_temp
    below: 19.5

and this is its definition.

- sensor:
  - default_entity_id: sensor.valvola_letto_current_temp
    name: Valvola Letto Current Temp
    unit_of_measurement: '°C'
    state: "{{ state_attr('climate.valvola_letto', 'current_temperature') }}"

Could you help me?
Thanks in advance.

This is a template trigger? IOs this an automation and a sensor? Not sure what you have going on.

However the trigger format appears to be the deprecated (if a template) or legacy, either way look at the HA Docs and see how it needs to look now.
If this is a template, this thread might help. Deprecation of legacy template entities in 2025.12

Hello @Sir_Goodenough ,
thank you for reply.
The trigger is obviously that of an automation

id: "4997"
alias: Termosifoni - Controllo automatico new
description: Procede con l'accensione automatica del termosifone quando la temperatura va sotto i 19.5 gradi
    
trigger:
  - platform: numeric_state
    entity_id: sensor.valvola_letto_current_temp
    below: 19.5

condition:
...

while the sensor should be in the new format:

template:
  - sensor:
    - default_entity_id: sensor.valvola_letto_current_temp
      name: Valvola Letto Current Temp
      unit_of_measurement: '°C'
      state: "{{ state_attr('climate.valvola_letto', 'current_temperature') }}"

  - sensor:
...

I’ve been trying to figure this out since this morning, but I can’t seem to fix this error. Could it be related to the new sensor format? Yet the sensor seems to be fine.

sensor.valvola_letto_current_temp
state: 19.5
unit_of_measurement: °C
friendly_name: Valvola Letto Current Temp
 

Make certain the unit of measurement is correct. There are 3 or 4 little circles

'°C'

and only one of them is right.
Copy that from a system generated temperature reading that is working.

First of all, you would not need the template sensor just for the sake of the trigger. The trigger can test for an attribute too.

Having said that, what you show would also work, but you are not showing the full automation, nor where you get the error. It is quite likely the error is not for the snippets you show.

If the error is in the log, likely the log shows more info.

The error also clearly mentions the word includes, which is not in what you show. Includes is not a keyword HA uses afaik, so where does it say includes in either your configuration files or your automation?

You’re right, sorry. The error appears when I view the automation trace to verify its functionality. Here’s a screenshot of the error:

It looks like it is failing on a condition, but you are (still) not showing the condition.

That’s a javascript exception, includes is a javascript keyword. Could be a frontend bug.

Having a similar warning, but mine’s saying “error in describing condition” and that “e is undefined”.

Error in traces:

if/condition/1
Iteration 3
[Error in describing condition: can’t access property “includes”, e is undefined]
Executed: December 14, 2025 at 9:10:11 PM
Result:

after:
__type: <class ‘datetime.time’>
isoformat: ‘00:00:00’
now_time:
__type: <class ‘datetime.time’>
isoformat: ‘21:10:11.571541’
before:
__type: <class ‘datetime.time’>
isoformat: ‘21:00:00’
result: false

I see the error on the final “repeat” block.
This is the full automation:

alias: Sunset Kitchen
description: “”
triggers:

  • entity_id:
    • sensor.sun_solar_elevation
      below: 0
      trigger: numeric_state
      conditions:
  • condition: numeric_state
    entity_id: sensor.time_since_sunset_lights_ran
    above: 20
    actions:
  • if:
    • condition: not
      conditions:
      • condition: zone
        entity_id: device_tracker.google_maps_[name]
        zone: zone.home
        then:
    • wait_for_trigger:
      • trigger: zone
        entity_id: device_tracker.google_maps_[name]
        zone: zone.home
        event: enter
        timeout:
        hours: 2
        minutes: 0
        seconds: 0
        milliseconds: 0
    • delay:
      hours: 0
      minutes: 20
      seconds: 0
      milliseconds: 0
  • if:
    • condition: numeric_state
      entity_id: light.kitchen_lights
      above: 139
      attribute: brightness
      then:
    • alias: Set to 55%
      action: light.turn_on
      metadata: {}
      data:
      brightness_pct: 55
      transition: 10
      target:
      entity_id: light.kitchen_lights
    • delay:
      hours: 0
      minutes: 0
      seconds: 11
      milliseconds: 0
  • repeat:
    sequence:
    - if:
    - condition: numeric_state
    entity_id: light.kitchen_lights
    attribute: brightness
    below: 65.1
    - condition: time
    before: “21:00:00”
    then:
    - wait_for_trigger:
    - trigger: time
    at: “21:00:00”
    - alias: If brightness above 15% at 9PM
    if:
    - condition: numeric_state
    entity_id: light.kitchen_lights
    above: 65
    attribute: brightness
    then:
    - alias: Set to 15%
    action: light.turn_on
    metadata: {}
    data:
    brightness_pct: 15
    transition: 10
    target:
    entity_id: light.kitchen_lights
    - delay:
    hours: 0
    minutes: 0
    seconds: 11
    milliseconds: 0
    - alias: Brightness step down
    action: light.turn_on
    metadata: {}
    data:
    brightness_step_pct: -5
    transition: 25
    target:
    entity_id:
    - light.kitchen_lights
    - delay:
    hours: 0
    minutes: 5
    seconds: 0
    milliseconds: 0
    until:
    - condition: state
    entity_id: light.kitchen_lights
    state: “off”
    for:
    hours: 0
    minutes: 0
    seconds: 20
    mode: single

Same Here:

The trigger portion shown does not appear to be incorrect to me and the automation is still being executed.

The error is just something in the GUI, it normally describes the trigger there, but it can’t as you are using the legacy trigger syntax using platform instead of trigger.

If you change your trigger to:

  - trigger: numeric_state
    entity_id: sensor.valvola_letto_current_temp
    below: 19.5

it will show a description of the trigger, and no longer this error message.
Your automation will run fine though.

I apologize for the delay in responding.
This is my full automation

id: "4567"
alias: Termosifoni - Controllo automatico 
description: Procede con l'accensione automatica del termosifone quando la temperatura va sotto i 19.5 gradi
    
trigger:
  - platform: numeric_state
    entity_id: sensor.valvola_letto_current_temp
    below: 19.5
        
condition:
  not:
    - condition: state

      entity_id: climate.termostato
      attribute: hvac_action
      state: 'heating'
   
action:
  - service: climate.set_temperature
    entity_id: climate.valvola_letto
    data:
      temperature: 19.5

and I confirm the following error

@TheFes The format you suggested seems to be incorrect.

It surely is :slight_smile:

id: "4567"
alias: Termosifoni - Controllo automatico 
description: Procede con l'accensione automatica del termosifone quando la temperatura va sotto i 19.5 gradi
    
triggers: # trigger > triggers
  - trigger: numeric_state # platform > trigger
    entity_id: sensor.valvola_letto_current_temp
    below: 19.5
        
conditions: # condition > conditions
  - not: # a list is expected here
      - condition: state
        entity_id: climate.termostato
        attribute: hvac_action
        state: 'heating'

actions: # action > actions
  - service: climate.set_temperature
    entity_id: climate.valvola_letto
    data:
      temperature: 19.5

This would be your automation following the latest automation syntax

Okay, it works now. Thanks.
But does this mean we have to change all the triggers for our automations?

The automations work. There’s only an error in displaying the description for the trigger. If that bothers you, you’ll need to change platform to trigger

You can also open a frontend issue if you want, I wouldn’t expect that old syntax to stop working and it should probably be fixed.

In the traces I see this code snippet, but in which file do I have to change platform to trigger?
platform: numeric_state
entity_id: sensor.shelly1pm_trockner_power
for:
minutes: 3
above: 250

Probably in automations.yaml

No, it is not in there

I had “platform” in the “automations.yaml” file, but the GUI showed the correct YAML code.

Made a dummy change in one automation using the GUI and saved it.
The automations.yaml file got changed, but only that specific edited automation.
The others are still in the old format.

So you can edit each automation and it will change those in the file.
(using HAOS: 2025.12.5)