Fix KeyError for Shelly virtual number component (#136932)

pull/137390/head
Maciej Bieniek 2025-01-30 17:43:48 +01:00 committed by Bram Kragten
parent ad6c3f9e10
commit 74f0af1ba1
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ RPC_NUMBERS: Final = {
mode_fn=lambda config: VIRTUAL_NUMBER_MODE_MAP.get(
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
unit=lambda config: config["meta"]["ui"]["unit"]
if config["meta"]["ui"]["unit"]