Use assignment expressions 20 (#57969)

This commit is contained in:
Marc Mueller
2021-10-20 20:31:00 +02:00
committed by GitHub
parent 398061706c
commit 487fa0a905
18 changed files with 29 additions and 52 deletions

View File

@@ -786,8 +786,7 @@ class BrSensor(SensorEntity):
if sensor_type == SYMBOL or sensor_type.startswith(CONDITION):
# update weather symbol & status text
condition = data.get(CONDITION)
if condition:
if condition := data.get(CONDITION):
if sensor_type == SYMBOL:
new_state = condition.get(EXACTNL)
if sensor_type == CONDITION: