mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
[validation] Allow `maybe_simple_value
` to not have default key in complex value (#7294)
This commit is contained in:
parent
9001d1c0d4
commit
c3668b9a4d
@ -1850,7 +1850,7 @@ def maybe_simple_value(*validators, **kwargs):
|
||||
if value == SCHEMA_EXTRACT:
|
||||
return (validator, key)
|
||||
|
||||
if isinstance(value, dict) and key in value:
|
||||
if isinstance(value, dict):
|
||||
return validator(value)
|
||||
return validator({key: value})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user