Fix spelling [runtime] (#114169)

This commit is contained in:
Marc Mueller 2024-03-25 11:32:50 +01:00 committed by GitHub
parent 8ae2fefcf3
commit 9b7cc088be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 16 deletions

View file

@ -82,9 +82,9 @@ async def async_setup_entry(
async_add_entities( async_add_entities(
EzvizButtonEntity(coordinator, camera, entity_description) EzvizButtonEntity(coordinator, camera, entity_description)
for camera in coordinator.data for camera in coordinator.data
for capibility, value in coordinator.data[camera]["supportExt"].items() for capability, value in coordinator.data[camera]["supportExt"].items()
for entity_description in BUTTON_ENTITIES for entity_description in BUTTON_ENTITIES
if capibility == entity_description.supported_ext if capability == entity_description.supported_ext
if value == "1" if value == "1"
) )

View file

@ -36,8 +36,8 @@ async def async_setup_entry(
async_add_entities( async_add_entities(
EzvizLight(coordinator, camera) EzvizLight(coordinator, camera)
for camera in coordinator.data for camera in coordinator.data
for capibility, value in coordinator.data[camera]["supportExt"].items() for capability, value in coordinator.data[camera]["supportExt"].items()
if capibility == str(SupportExt.SupportAlarmLight.value) if capability == str(SupportExt.SupportAlarmLight.value)
if value == "1" if value == "1"
) )

View file

@ -129,9 +129,9 @@ class FreeboxHomeEntity(Entity):
if self._remove_signal_update is not None: if self._remove_signal_update is not None:
self._remove_signal_update() self._remove_signal_update()
def remove_signal_update(self, dispacher: Callable[[], None]) -> None: def remove_signal_update(self, dispatcher: Callable[[], None]) -> None:
"""Register state update callback.""" """Register state update callback."""
self._remove_signal_update = dispacher self._remove_signal_update = dispatcher
def get_value(self, ep_type: str, name: str): def get_value(self, ep_type: str, name: str):
"""Get the value.""" """Get the value."""

View file

@ -165,11 +165,13 @@ async def async_setup_entry(
message = ( message = (
f"Unsupported sensor field: {field}\nPlease create an issue on " f"Unsupported sensor field: {field}\nPlease create an issue on "
"GitHub." "GitHub."
" https://github.com/home-assistant/core/issues/new?assignees=&la" " https://github.com/home-assistant/core/issues/new?assignees="
"bels=&template=bug_report.yml&integration_name=LaCrosse%20View&integrat" "&labels=&template=bug_report.yml&integration_name=LaCrosse%20View"
"ion_link=https://www.home-assistant.io/integrations/lacrosse_view/&addi" "&integration_link="
f"tional_information=Field:%20{field}%0ASensor%20Model:%20{sensor.model}&" "https://www.home-assistant.io/integrations/lacrosse_view/"
f"title=LaCrosse%20View%20Unsupported%20sensor%20field:%20{field}" "&additional_information="
f"Field:%20{field}%0ASensor%20Model:%20{sensor.model}"
f"&title=LaCrosse%20View%20Unsupported%20sensor%20field:%20{field}"
) )
_LOGGER.warning(message) _LOGGER.warning(message)

View file

@ -174,7 +174,7 @@ class MqttLawnMower(MqttEntity, LawnMowerEntity, RestoreEntity):
self._attr_activity = LawnMowerActivity(payload) self._attr_activity = LawnMowerActivity(payload)
except ValueError: except ValueError:
_LOGGER.error( _LOGGER.error(
"Invalid activity for %s: '%s' (valid activies: %s)", "Invalid activity for %s: '%s' (valid activities: %s)",
self.entity_id, self.entity_id,
payload, payload,
[option.value for option in LawnMowerActivity], [option.value for option in LawnMowerActivity],

View file

@ -107,11 +107,11 @@ async def test_load_backups_with_exception(
"""Test loading backups with exception.""" """Test loading backups with exception."""
manager = BackupManager(hass) manager = BackupManager(hass)
with patch("pathlib.Path.glob", return_value=[TEST_BACKUP.path]), patch( with patch("pathlib.Path.glob", return_value=[TEST_BACKUP.path]), patch(
"tarfile.open", side_effect=OSError("Test ecxeption") "tarfile.open", side_effect=OSError("Test exception")
): ):
await manager.load_backups() await manager.load_backups()
backups = await manager.get_backups() backups = await manager.get_backups()
assert f"Unable to read backup {TEST_BACKUP.path}: Test ecxeption" in caplog.text assert f"Unable to read backup {TEST_BACKUP.path}: Test exception" in caplog.text
assert backups == {} assert backups == {}

View file

@ -731,8 +731,8 @@ async def test_mqtt_payload_not_a_valid_activity_warning(
await hass.async_block_till_done() await hass.async_block_till_done()
assert ( assert (
"Invalid activity for lawn_mower.test_lawn_mower: 'painting' (valid activies: ['error', 'paused', 'mowing', 'docked'])" "Invalid activity for lawn_mower.test_lawn_mower: 'painting' "
in caplog.text "(valid activities: ['error', 'paused', 'mowing', 'docked'])" in caplog.text
) )