mirror of
https://github.com/esphome/esphome.git
synced 2025-09-21 20:52:20 +01:00
[api] `homeassistant.action
replaces
homeassistant.service
` (#7171)
This commit is contained in:
@@ -2181,3 +2181,13 @@ SOURCE_SCHEMA = Any(
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def rename_key(old_key, new_key):
|
||||
def validator(config: dict) -> dict:
|
||||
config = config.copy()
|
||||
if old_key in config:
|
||||
config[new_key] = config.pop(old_key)
|
||||
return config
|
||||
|
||||
return validator
|
||||
|
Reference in New Issue
Block a user