mirror of
https://github.com/home-assistant/core.git
synced 2026-09-27 18:08:37 -04:00
Drop translations from the Sofar coordinator errors (#181221)
This commit is contained in:
@@ -73,12 +73,10 @@ class SofarDataUpdateCoordinator(DataUpdateCoordinator[UpdateReport]):
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="no_component_answered",
|
||||
translation_placeholders={"name": self.name},
|
||||
)
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="no_component_answered",
|
||||
translation_placeholders={"name": self.name},
|
||||
) from ExceptionGroup("all components failed to refresh", errors)
|
||||
except ModbusError as err:
|
||||
# ModbusConnectionError (dead link) and ModbusTimeoutError reach
|
||||
@@ -86,7 +84,6 @@ class SofarDataUpdateCoordinator(DataUpdateCoordinator[UpdateReport]):
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="modbus_error",
|
||||
translation_placeholders={"error": str(err)},
|
||||
) from err
|
||||
else:
|
||||
return report
|
||||
|
||||
@@ -612,10 +612,10 @@
|
||||
"message": "Maximum power must be a multiple of 100 W."
|
||||
},
|
||||
"modbus_error": {
|
||||
"message": "{error}"
|
||||
"message": "Error communicating with the inverter."
|
||||
},
|
||||
"no_component_answered": {
|
||||
"message": "{name}: no component answered."
|
||||
"message": "No component answered."
|
||||
},
|
||||
"unrecognized_inverter_model": {
|
||||
"message": "Unrecognized Sofar inverter model for {title}."
|
||||
|
||||
@@ -346,7 +346,7 @@ async def test_every_component_failing_recovers_on_a_later_poll(
|
||||
assert hass.states.get(entity_id).state == STATE_UNAVAILABLE
|
||||
# Availability alone cannot tell a failed poll from one that reported
|
||||
# every component as failed; only the logged error separates them.
|
||||
assert "no component answered" in caplog.text
|
||||
assert "No component answered" in caplog.text
|
||||
|
||||
mock_connection.for_unit(1).fail_requests(None)
|
||||
freezer.tick(timedelta(seconds=SCAN_INTERVAL))
|
||||
|
||||
Reference in New Issue
Block a user