mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Catch unknown equipment values (#49073)
* Catch unknown equipment values * Catch unknown equipment values * Remove warning spam.
This commit is contained in:
parent
1d28f485d3
commit
41ff6fc278
@ -195,9 +195,15 @@ class ScreenlogicEntity(CoordinatorEntity):
|
|||||||
"""Return device information for the controller."""
|
"""Return device information for the controller."""
|
||||||
controller_type = self.config_data["controller_type"]
|
controller_type = self.config_data["controller_type"]
|
||||||
hardware_type = self.config_data["hardware_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 {
|
return {
|
||||||
"connections": {(dr.CONNECTION_NETWORK_MAC, self.mac)},
|
"connections": {(dr.CONNECTION_NETWORK_MAC, self.mac)},
|
||||||
"name": self.gateway_name,
|
"name": self.gateway_name,
|
||||||
"manufacturer": "Pentair",
|
"manufacturer": "Pentair",
|
||||||
"model": EQUIPMENT.CONTROLLER_HARDWARE[controller_type][hardware_type],
|
"model": equipment_model,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user