Add location to Norway airquality (#21347)

This commit is contained in:
Daniel Høyer Iversen authored and Fabian Affolter committed 2019-02-23 10:35:18 +01:00
1 parent 8f70c16863
commit b7b4a6dcc8
3 files changed
+6 -4

No files matched your search

@@ -17,7 +17,7 @@ from homeassistant.const import (CONF_LATITUDE, CONF_LONGITUDE,
from homeassistant.helpers.aiohttp_client import async_get_clientsession
REQUIREMENTS = ['pyMetno==0.4.5']
REQUIREMENTS = ['pyMetno==0.4.6']
_LOGGER = logging.getLogger(__name__)
@@ -91,7 +91,9 @@ class AirSensor(AirQualityEntity):
@property
def device_state_attributes(self) -> dict:
"""Return other details about the sensor state."""
return {'level': self._api.data.get('level')}
return {'level': self._api.data.get('level'),
'location': self._api.data.get('location'),
}
@property
def name(self) -> str:
+1 -1
View File
@@ -13,7 +13,7 @@ from homeassistant.helpers.event import (
async_call_later, async_track_utc_time_change)
import homeassistant.util.dt as dt_util
REQUIREMENTS = ['pyMetno==0.4.5']
REQUIREMENTS = ['pyMetno==0.4.6']
_LOGGER = logging.getLogger(__name__)