I just updated from 6.6 to 7.0 this morning and after I did, my HA activated safe mode with the following error:
2021-12-11 10:49:52 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] invalid key: "OrderedDict([('(range(3', None), ('10)|random)', None)])"
in "/config/automations.yaml", line 383, column 0
2021-12-11 10:49:52 ERROR (MainThread) [homeassistant.bootstrap] Failed to parse configuration.yaml: invalid key: "OrderedDict([('(range(3', None), ('10)|random)', None)])"
in "/config/automations.yaml", line 383, column 0. Activating safe mode
When I checked my configuration.yaml for that line, it’s failing on the delay portion of this (commented out so HA would start up again):
- id: automation.timer_devices_on
alias: Timer Devices - On
description: Turns on the timer lights and switches 3 minutes after sunset with pauses between devices.
trigger:
- platform: sun
event: sunset
offset: 00:03:00
action:
- service: light.turn_on
target:
entity_id: light.great_room_couch_lamp
# - delay:
# seconds: {{ (range(3, 10)|random) }}
Again, this exact code worked fine in 6.6.