mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 07:58:09 +01:00
fix
This commit is contained in:
parent
380bd79c0d
commit
a1e126f19b
1 changed files with 2 additions and 2 deletions
|
@ -1636,7 +1636,7 @@ class GenerateID(Optional):
|
||||||
|
|
||||||
def _get_priority_default(*args):
|
def _get_priority_default(*args):
|
||||||
for arg in args:
|
for arg in args:
|
||||||
if arg is not None:
|
if arg is not vol.UNDEFINED:
|
||||||
return arg
|
return arg
|
||||||
return vol.UNDEFINED
|
return vol.UNDEFINED
|
||||||
|
|
||||||
|
@ -1664,7 +1664,7 @@ class SplitDefault(Optional):
|
||||||
|
|
||||||
for platform_key, priority in priority_mapping.items():
|
for platform_key, priority in priority_mapping.items():
|
||||||
prioritized_default = _get_priority_default(
|
prioritized_default = _get_priority_default(
|
||||||
*[kwargs.get(p) for p in [platform_key] + priority]
|
*[kwargs.get(p, vol.UNDEFINED) for p in [platform_key] + priority]
|
||||||
)
|
)
|
||||||
self._defaults[platform_key] = vol.default_factory(prioritized_default)
|
self._defaults[platform_key] = vol.default_factory(prioritized_default)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue