Some legacy substitutions were removed in favor of ESPHome package overrides with !extend and !remove.
If your build fails with a deprecation error, move the old substitution value to an override block.
!extend and !remove are clearer than behavioral substitutions and make upstream package updates easier.
They also use ESPHome's native option names and values directly, instead of requiring a second layer of device-specific substitution names.
Generic old style:
substitutions:
sub_some_option: some_valueGeneric new style:
component:
- id: !extend some_id
some_option: some_valueIf you are overriding multiple fields on the same entity, combine them into a single !extend block, e.g.:
light:
- id: !extend kauf_light
restore_mode: RESTORE_DEFAULT_ON
default_transition_length: 500ms
warm_white_color_temperature: 3000 Kelvin
cold_white_color_temperature: 6500 KelvinOld style:
substitutions:
disable_webserver: "true"New style:
web_server: !removeOld style:
substitutions:
default_button_config: "Toggle on Release"New style:
select:
- id: !extend select_button
initial_option: Toggle on ReleaseOld style:
substitutions:
sub_reboot_timeout: 30sNew style:
api:
reboot_timeout: 30sOld style:
substitutions:
light_restore_mode: RESTORE_DEFAULT_OFFNew style:
light:
- id: !extend kauf_light
restore_mode: RESTORE_DEFAULT_OFFOld style:
substitutions:
sub_api_reboot_timeout: 30sNew style:
api:
reboot_timeout: 30sOld style:
substitutions:
sub_ota_num_attempts: "20"New style:
safe_mode:
num_attempts: 20Old style:
substitutions:
sub_default_transition_length: 500msNew style:
light:
- id: !extend kauf_light
default_transition_length: 500msOld style:
substitutions:
sub_warm_white_temp: 3000 KelvinNew style:
light:
- id: !extend kauf_light
warm_white_color_temperature: 3000 KelvinOld style:
substitutions:
sub_cold_white_temp: 6500 KelvinNew style:
light:
- id: !extend kauf_light
cold_white_color_temperature: 6500 KelvinOld style:
substitutions:
sub_cw_freq: 125 hz
sub_ww_freq: 125 hzNew style:
substitutions:
sub_cwww_freq: 125 hzDevice-specific deprecation entries will be added here as substitutions are retired.
- Keep your override in your local device YAML (the one that imports the package).
- Only override what you need.
- Use
!removewhen you want to remove an entire component from a package.
Example:
web_server: !remove