Use assignment expressions [A-I] (#66880)
This commit is contained in:
parent
6e49b0e122
commit
4f20a8023b
18 changed files with 20 additions and 43 deletions
|
@ -272,8 +272,7 @@ def setup_platform(
|
|||
devices = []
|
||||
for conf in discovery_info[ATTR_DISCOVER_DEVICES]:
|
||||
state = conf.get(ATTR_PARAM)
|
||||
entity_desc = SENSOR_DESCRIPTIONS.get(state)
|
||||
if entity_desc is None:
|
||||
if (entity_desc := SENSOR_DESCRIPTIONS.get(state)) is None:
|
||||
name = conf.get(ATTR_NAME)
|
||||
_LOGGER.warning(
|
||||
"Sensor (%s) entity description is missing. Sensor state (%s) needs to be maintained",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue