mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Upgrade luftdaten to 0.2.0 (#14620)
This commit is contained in:
parent
a5e66ce6ba
commit
5f9e4ae136
@ -4,7 +4,6 @@ Support for Luftdaten sensors.
|
|||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/sensor.luftdaten/
|
https://home-assistant.io/components/sensor.luftdaten/
|
||||||
"""
|
"""
|
||||||
import asyncio
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
REQUIREMENTS = ['luftdaten==0.1.3']
|
REQUIREMENTS = ['luftdaten==0.2.0']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -59,8 +58,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def async_setup_platform(
|
||||||
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
hass, config, async_add_devices, discovery_info=None):
|
||||||
"""Set up the Luftdaten sensor."""
|
"""Set up the Luftdaten sensor."""
|
||||||
from luftdaten import Luftdaten
|
from luftdaten import Luftdaten
|
||||||
|
|
||||||
@ -71,7 +70,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
session = async_get_clientsession(hass)
|
session = async_get_clientsession(hass)
|
||||||
luftdaten = LuftdatenData(Luftdaten(sensor_id, hass.loop, session))
|
luftdaten = LuftdatenData(Luftdaten(sensor_id, hass.loop, session))
|
||||||
|
|
||||||
yield from luftdaten.async_update()
|
await luftdaten.async_update()
|
||||||
|
|
||||||
if luftdaten.data is None:
|
if luftdaten.data is None:
|
||||||
_LOGGER.error("Sensor is not available: %s", sensor_id)
|
_LOGGER.error("Sensor is not available: %s", sensor_id)
|
||||||
|
@ -518,7 +518,7 @@ lmnotify==0.0.4
|
|||||||
locationsharinglib==2.0.2
|
locationsharinglib==2.0.2
|
||||||
|
|
||||||
# homeassistant.components.sensor.luftdaten
|
# homeassistant.components.sensor.luftdaten
|
||||||
luftdaten==0.1.3
|
luftdaten==0.2.0
|
||||||
|
|
||||||
# homeassistant.components.light.lw12wifi
|
# homeassistant.components.light.lw12wifi
|
||||||
lw12==0.9.2
|
lw12==0.9.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user