Cannot restart because the configuration is not valid

2025-02-19 14:14:51.420 ERROR (MainThread) [homeassistant.config] Unknown error calling script config validator - ‘NodeStrClass’ object has no attribute ‘items’
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 1156, in async_process_component_config
await config_validator.async_validate_config(hass, config),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/script/config.py”, line 300, in async_validate_config
for object_id, cfg in p_config.items():
^^^^^^^^^^^^^^
AttributeError: ‘NodeStrClass’ object has no attribute ‘items’

What was the last thing you changed before the error?

undo that change.

I don’t remember, it happened a while ago but it works normally. But there is no option for scripts.