zuidwijk/esphome-doorbell

update failed. restore_state has been removed in 2023.7.0

Opened this issue · 4 comments

I am trying to update and receive this error

INFO ESPHome 2023.7.0
INFO Reading configuration /config/esphome/doorbell.yaml...
INFO Detected timezone 'Europe/Amsterdam'
Failed config

switch.template: [source /config/esphome/doorbell.yaml:79]
platform: template
name: Doorbell Chime Active
id: chime_active

The restore_state option has been removed in 2023.7.0. Use the restore_mode option instead.
restore_state: False
turn_on_action:
- globals.set:
id: chime
value: true
turn_off_action:
- globals.set:
id: chime
value: false
lambda: return id(chime);

Would it just be as simple as to change state to mode?

removing the state restore_state: False completly seems to resolve the issue for now.

aodtcr commented

The restore_state option was removed as it was replaced by restore_mode. As such, restore_mode should be replacing restore_state in the doorbell.yaml file with the default value disabled.

@zuidwijk: please fix the code

To start the doorbell after a restart change restore_state: false to
restore_mode: ALWAYS_ON