Use assignment expressions 37 (#58827)
This commit is contained in:
parent
8e03102892
commit
b6d9e517c2
14 changed files with 29 additions and 52 deletions
|
@ -49,8 +49,7 @@ async def async_setup_entry(
|
|||
# Add switch from config file
|
||||
entities = []
|
||||
for packet_id, entity_info in discovery_info[CONF_DEVICES].items():
|
||||
event = get_rfx_object(packet_id)
|
||||
if event is None:
|
||||
if (event := get_rfx_object(packet_id)) is None:
|
||||
_LOGGER.error("Invalid device: %s", packet_id)
|
||||
continue
|
||||
if not supported(event):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue