From 202447405f84cabd705046c46433f482ae595b6e Mon Sep 17 00:00:00 2001 From: SchiZzA Date: Sat, 11 Apr 2026 17:37:53 +0200 Subject: [PATCH] Typos corrected. --- custom_components/sws12500/__init__.py | 6 +++--- custom_components/sws12500/ecowitt.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/custom_components/sws12500/__init__.py b/custom_components/sws12500/__init__.py index 1df9535..efc8197 100644 --- a/custom_components/sws12500/__init__.py +++ b/custom_components/sws12500/__init__.py @@ -144,7 +144,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator): authorized=None, reason="ecowitt_disabled", ) - return aiohttp.web.Response(text="Ecowwit disabled", status=403) + return aiohttp.web.Response(text="Ecowitt disabled", status=403) # Check webhook ID from URL expected_webhook = self.config.options.get(ECOWITT_WEBHOOK_ID, "") @@ -205,7 +205,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator): if health: health.update_forwarding(self.windy, self.pocasi) - if (checked(self.config.options.get(DEV_DBG), True)) is not None: + if (_ := checked(self.config.options.get(DEV_DBG), True)) is not None: _LOGGER.info("Dev log (ecowitt): %s", anonymize(data)) return aiohttp.web.Response(body="OK", status=200) @@ -533,7 +533,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: _ecowitt_enabled = checked_or(entry.options.get(ECOWITT_ENABLED), bool, False) _ecowitt_path = ECOWITT_URL_PREFIX + "/{webhook_id}" - _LOGGER.debug("WS Link is %s", "enbled" if _wslink else "disabled") + _LOGGER.debug("WS Link is %s", "enabled" if _wslink else "disabled") if routes: _LOGGER.debug("We have routes registered, will try to switch dispatcher.") diff --git a/custom_components/sws12500/ecowitt.py b/custom_components/sws12500/ecowitt.py index 5448b60..fbc963b 100644 --- a/custom_components/sws12500/ecowitt.py +++ b/custom_components/sws12500/ecowitt.py @@ -161,7 +161,7 @@ class EcowittBridge: self._know_native_keys: set[str] = set() # Callback for new entities - self._add_entities_cb = callback + self._add_entities_cb: AddEntitiesCallback | None = None def set_add_entities(self, callback: AddEntitiesCallback) -> None: """Store the platform callback for dynamic entity creation.""" @@ -239,7 +239,7 @@ class EcoWittNativeSensor(SensorEntity): """ _attr_has_entity_name = True - _atttr_should_poll = False + _attr_should_poll = False def __init__(self, sensor: EcoWittSensor) -> None: """Initialize native EcoWittSensor.""" @@ -254,7 +254,7 @@ class EcoWittNativeSensor(SensorEntity): device_class, unit, state_class = ha_meta self._attr_device_class = device_class self._attr_native_unit_of_measurement = unit - self._attr_state_calss = state_class + self._attr_state_class = state_class @property def name(self) -> str: