Typos corrected.
parent
fed00b437a
commit
202447405f
|
|
@ -144,7 +144,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator):
|
||||||
authorized=None,
|
authorized=None,
|
||||||
reason="ecowitt_disabled",
|
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
|
# Check webhook ID from URL
|
||||||
expected_webhook = self.config.options.get(ECOWITT_WEBHOOK_ID, "")
|
expected_webhook = self.config.options.get(ECOWITT_WEBHOOK_ID, "")
|
||||||
|
|
@ -205,7 +205,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator):
|
||||||
if health:
|
if health:
|
||||||
health.update_forwarding(self.windy, self.pocasi)
|
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))
|
_LOGGER.info("Dev log (ecowitt): %s", anonymize(data))
|
||||||
|
|
||||||
return aiohttp.web.Response(body="OK", status=200)
|
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_enabled = checked_or(entry.options.get(ECOWITT_ENABLED), bool, False)
|
||||||
_ecowitt_path = ECOWITT_URL_PREFIX + "/{webhook_id}"
|
_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:
|
if routes:
|
||||||
_LOGGER.debug("We have routes registered, will try to switch dispatcher.")
|
_LOGGER.debug("We have routes registered, will try to switch dispatcher.")
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ class EcowittBridge:
|
||||||
self._know_native_keys: set[str] = set()
|
self._know_native_keys: set[str] = set()
|
||||||
|
|
||||||
# Callback for new entities
|
# Callback for new entities
|
||||||
self._add_entities_cb = callback
|
self._add_entities_cb: AddEntitiesCallback | None = None
|
||||||
|
|
||||||
def set_add_entities(self, callback: AddEntitiesCallback) -> None:
|
def set_add_entities(self, callback: AddEntitiesCallback) -> None:
|
||||||
"""Store the platform callback for dynamic entity creation."""
|
"""Store the platform callback for dynamic entity creation."""
|
||||||
|
|
@ -239,7 +239,7 @@ class EcoWittNativeSensor(SensorEntity):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
_atttr_should_poll = False
|
_attr_should_poll = False
|
||||||
|
|
||||||
def __init__(self, sensor: EcoWittSensor) -> None:
|
def __init__(self, sensor: EcoWittSensor) -> None:
|
||||||
"""Initialize native EcoWittSensor."""
|
"""Initialize native EcoWittSensor."""
|
||||||
|
|
@ -254,7 +254,7 @@ class EcoWittNativeSensor(SensorEntity):
|
||||||
device_class, unit, state_class = ha_meta
|
device_class, unit, state_class = ha_meta
|
||||||
self._attr_device_class = device_class
|
self._attr_device_class = device_class
|
||||||
self._attr_native_unit_of_measurement = unit
|
self._attr_native_unit_of_measurement = unit
|
||||||
self._attr_state_calss = state_class
|
self._attr_state_class = state_class
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue