Catch unknown equipment values (#49073)
* Catch unknown equipment values * Catch unknown equipment values * Remove warning spam.pull/49086/head
parent
1d28f485d3
commit
41ff6fc278
|
@ -195,9 +195,15 @@ class ScreenlogicEntity(CoordinatorEntity):
|
|||
"""Return device information for the controller."""
|
||||
controller_type = self.config_data["controller_type"]
|
||||
hardware_type = self.config_data["hardware_type"]
|
||||
try:
|
||||
equipment_model = EQUIPMENT.CONTROLLER_HARDWARE[controller_type][
|
||||
hardware_type
|
||||
]
|
||||
except KeyError:
|
||||
equipment_model = f"Unknown Model C:{controller_type} H:{hardware_type}"
|
||||
return {
|
||||
"connections": {(dr.CONNECTION_NETWORK_MAC, self.mac)},
|
||||
"name": self.gateway_name,
|
||||
"manufacturer": "Pentair",
|
||||
"model": EQUIPMENT.CONTROLLER_HARDWARE[controller_type][hardware_type],
|
||||
"model": equipment_model,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue