mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix matter exception NoneType in set_brightness for optional min/max level values (#95949)
Fix exception NoneType in set_brightness for optional min/max level values
This commit is contained in:
parent
be01eb5aad
commit
63cb50977b
@ -128,7 +128,7 @@ class MatterLight(MatterEntity, LightEntity):
|
|||||||
renormalize(
|
renormalize(
|
||||||
brightness,
|
brightness,
|
||||||
(0, 255),
|
(0, 255),
|
||||||
(level_control.minLevel, level_control.maxLevel),
|
(level_control.minLevel or 1, level_control.maxLevel or 254),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ class MatterLight(MatterEntity, LightEntity):
|
|||||||
return round(
|
return round(
|
||||||
renormalize(
|
renormalize(
|
||||||
level_control.currentLevel,
|
level_control.currentLevel,
|
||||||
(level_control.minLevel or 0, level_control.maxLevel or 254),
|
(level_control.minLevel or 1, level_control.maxLevel or 254),
|
||||||
(0, 255),
|
(0, 255),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user