Explorar el Código

device: use unique failure messages for each failure path

Messages for updatedps, status and refresh were all copy and paste.
Use different wording so we can spot patterns in failures.
Jason Rumney hace 3 años
padre
commit
6ea6a55e30
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      custom_components/tuya_local/device.py

+ 2 - 2
custom_components/tuya_local/device.py

@@ -272,13 +272,13 @@ class TuyaLocalDevice(object):
                     ):
                         poll = await self._retry_on_failed_connection(
                             lambda: self._api.updatedps(self._force_dps),
-                            f"Failed to refresh device state for {self.name}",
+                            f"Failed to update device dps for {self.name}",
                         )
                         dps_updated = True
                     else:
                         poll = await self._retry_on_failed_connection(
                             lambda: self._api.status(),
-                            f"Failed to refresh device state for {self.name}",
+                            f"Failed to fetch device status for {self.name}",
                         )
                         dps_updated = False
                         full_poll = True