Use assignment expressions 20 (#57969)
This commit is contained in:
parent
398061706c
commit
487fa0a905
18 changed files with 29 additions and 52 deletions
|
@ -481,8 +481,7 @@ class Light(BaseLight, ZhaEntity):
|
|||
attributes, from_cache=False
|
||||
)
|
||||
|
||||
color_mode = results.get("color_mode")
|
||||
if color_mode is not None:
|
||||
if (color_mode := results.get("color_mode")) is not None:
|
||||
if color_mode == LightColorMode.COLOR_TEMP:
|
||||
color_temp = results.get("color_temperature")
|
||||
if color_temp is not None and color_mode:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue