mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Upgrade alpha_vantage to 1.9.0 (#12352)
This commit is contained in:
parent
ba9fef4de6
commit
66d14da5e9
@ -15,7 +15,7 @@ from homeassistant.const import (
|
|||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
REQUIREMENTS = ['alpha_vantage==1.8.0']
|
REQUIREMENTS = ['alpha_vantage==1.9.0']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -98,8 +98,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
from_cur = conversion.get(CONF_FROM)
|
from_cur = conversion.get(CONF_FROM)
|
||||||
to_cur = conversion.get(CONF_TO)
|
to_cur = conversion.get(CONF_TO)
|
||||||
try:
|
try:
|
||||||
_LOGGER.debug("Configuring forex %s - %s",
|
_LOGGER.debug("Configuring forex %s - %s", from_cur, to_cur)
|
||||||
from_cur, to_cur)
|
|
||||||
forex.get_currency_exchange_rate(
|
forex.get_currency_exchange_rate(
|
||||||
from_currency=from_cur, to_currency=to_cur)
|
from_currency=from_cur, to_currency=to_cur)
|
||||||
except ValueError as error:
|
except ValueError as error:
|
||||||
@ -214,10 +213,8 @@ class AlphaVantageForeignExchange(Entity):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data and updates the states."""
|
"""Get the latest data and updates the states."""
|
||||||
_LOGGER.debug("Requesting new data for forex %s - %s",
|
_LOGGER.debug("Requesting new data for forex %s - %s",
|
||||||
self._from_currency,
|
self._from_currency, self._to_currency)
|
||||||
self._to_currency)
|
|
||||||
self.values, _ = self._foreign_exchange.get_currency_exchange_rate(
|
self.values, _ = self._foreign_exchange.get_currency_exchange_rate(
|
||||||
from_currency=self._from_currency, to_currency=self._to_currency)
|
from_currency=self._from_currency, to_currency=self._to_currency)
|
||||||
_LOGGER.debug("Received new data for forex %s - %s",
|
_LOGGER.debug("Received new data for forex %s - %s",
|
||||||
self._from_currency,
|
self._from_currency, self._to_currency)
|
||||||
self._to_currency)
|
|
||||||
|
@ -85,7 +85,7 @@ aiopvapi==1.5.4
|
|||||||
alarmdecoder==1.13.2
|
alarmdecoder==1.13.2
|
||||||
|
|
||||||
# homeassistant.components.sensor.alpha_vantage
|
# homeassistant.components.sensor.alpha_vantage
|
||||||
alpha_vantage==1.8.0
|
alpha_vantage==1.9.0
|
||||||
|
|
||||||
# homeassistant.components.amcrest
|
# homeassistant.components.amcrest
|
||||||
amcrest==1.2.1
|
amcrest==1.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user