mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix KeyError for Shelly virtual number component (#136932)
This commit is contained in:
parent
eca93f1f4e
commit
f501b55aed
@ -186,7 +186,7 @@ RPC_NUMBERS: Final = {
|
|||||||
mode_fn=lambda config: VIRTUAL_NUMBER_MODE_MAP.get(
|
mode_fn=lambda config: VIRTUAL_NUMBER_MODE_MAP.get(
|
||||||
config["meta"]["ui"]["view"], NumberMode.BOX
|
config["meta"]["ui"]["view"], NumberMode.BOX
|
||||||
),
|
),
|
||||||
step_fn=lambda config: config["meta"]["ui"]["step"],
|
step_fn=lambda config: config["meta"]["ui"].get("step"),
|
||||||
# If the unit is not set, the device sends an empty string
|
# If the unit is not set, the device sends an empty string
|
||||||
unit=lambda config: config["meta"]["ui"]["unit"]
|
unit=lambda config: config["meta"]["ui"]["unit"]
|
||||||
if config["meta"]["ui"]["unit"]
|
if config["meta"]["ui"]["unit"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user