I have two indications of errors; but I can’t really tell if I actually have any errors for real. Hoping someone can enlighten me.
First: I have the below message in my log; but I cannot find any script that is failing to run, and no script in my list of scripts is showing up as ‘disabled’ (I have 8 scripts that I have created, all showing as being enabled). Nor can I figure out how to work back from the log entry to determine which script HA thinks is the culprit. How does one do that? Could it be related to the error messages I noticed in the code editor for one my automations - as shown in the screenshot below ??
Logger: homeassistant.components.script
Source: components/script/config.py:147
integration: Script ([documentation](https://www.home-assistant.io/integrations/script), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+script%22))
First occurred: 11:28:33 AM (6 occurrences)
Last logged: 11:30:34 AM
Script with object id 'mode' could not be validated and has been disabled: expected a dictionary. Got 'parallel'
Second: I created an automation using the UI and for the past two days it appears to be running just fine. But I just noticed that in the code editor, in the file automations.yaml, that automation is showing as having two errors. Here is a screenshot of how it shows in the code editor - with the full yaml provided below the screenshot image:
alias: Ambient Light | Set Quantize Values
description: >-
This automation 'quantizes' the raw lux values reported by the ambient sensor
devices into text values of Bright, Dim, Dark, or Night. These quantized
values are what I use to trigger ambient light related automations. <br>
**04/25/2025**: Created this automation to update both of the 'real' sensors.
triggers:
- trigger: time_pattern
minutes: /5
conditions: []
actions:
- repeat:
for_each:
- sensor: sensor.ambient_light_sensor_s2_bh1750_lux
quantized: input_text.ambient_s2_quantized
night_lux: input_number.ambient_s2_quant_night_lux
dark_lux: input_number.ambient_s2_quant_dark_lux
dim_lux: input_number.ambient_s2_quant_dim_lux
- sensor: sensor.adafruit_feather_sensors_bh1750_illuminance
quantized: input_text.ambient_s1_quantized
night_lux: input_number.ambient_s1_quant_night_lux
dark_lux: input_number.ambient_s1_quant_dark_lux
dim_lux: input_number.ambient_s1_quant_dim_lux
sequence:
- choose:
- conditions:
- condition: template
value_template: >
{% set lux = states(repeat.item.sensor) | float %} {% set n
= states(repeat.item.night_lux) | float %} {% set d =
states(repeat.item.dark_lux) | float %} {{ lux > n and lux
< d }}
sequence:
- target:
entity_id: "{{ repeat.item.quantized }}"
data:
value: Dark
action: input_text.set_value
- conditions:
- condition: template
value_template: >
{% set lux = states(repeat.item.sensor) | float %} {% set
d = states(repeat.item.dark_lux) | float %} {% set di =
states(repeat.item.dim_lux) | float %} {{ lux > d and lux
< di }}
sequence:
- target:
entity_id: "{{ repeat.item.quantized }}"
data:
value: Dim
action: input_text.set_value
- conditions:
- condition: template
value_template: >
{% set lux = states(repeat.item.sensor) | float %} {% set
di = states(repeat.item.dim_lux) | float %} {{ lux > di
}}
sequence:
- target:
entity_id: "{{ repeat.item.quantized }}"
data:
value: Bright
action: input_text.set_value
default:
- target:
entity_id: "{{ repeat.item.quantized }}"
data:
value: Night
action: input_text.set_value
mode: single