From 009a573324d083abc4dc4076cd7271fc18f11080 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 18 Aug 2022 22:48:49 +0200 Subject: [PATCH] Adjust type hints in alpha-vantage sensor entity (#76988) --- homeassistant/components/alpha_vantage/sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/alpha_vantage/sensor.py b/homeassistant/components/alpha_vantage/sensor.py index 534383f0bbf..02c6958e0da 100644 --- a/homeassistant/components/alpha_vantage/sensor.py +++ b/homeassistant/components/alpha_vantage/sensor.py @@ -128,7 +128,7 @@ class AlphaVantageSensor(SensorEntity): self._attr_native_unit_of_measurement = symbol.get(CONF_CURRENCY, self._symbol) self._attr_icon = ICONS.get(symbol.get(CONF_CURRENCY, "USD")) - def update(self): + def update(self) -> None: """Get the latest data and updates the states.""" _LOGGER.debug("Requesting new data for symbol %s", self._symbol) all_values, _ = self._timeseries.get_intraday(self._symbol) @@ -144,7 +144,7 @@ class AlphaVantageSensor(SensorEntity): ATTR_LOW: values["3. low"], } if isinstance(values, dict) - else None + else {} ) _LOGGER.debug("Received new values for symbol %s", self._symbol) @@ -167,7 +167,7 @@ class AlphaVantageForeignExchange(SensorEntity): self._attr_icon = ICONS.get(self._from_currency, "USD") self._attr_native_unit_of_measurement = self._to_currency - def update(self): + def update(self) -> None: """Get the latest data and updates the states.""" _LOGGER.debug( "Requesting new data for forex %s - %s", @@ -187,7 +187,7 @@ class AlphaVantageForeignExchange(SensorEntity): CONF_TO: self._to_currency, } if values is not None - else None + else {} ) _LOGGER.debug(