mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
try to fix requirements for yr sensor
This commit is contained in:
parent
ff15fea9f8
commit
618ebfe43c
@ -38,6 +38,7 @@ sensor:
|
|||||||
import logging
|
import logging
|
||||||
import datetime
|
import datetime
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
import xmltodict
|
||||||
|
|
||||||
from homeassistant.const import ATTR_ENTITY_PICTURE
|
from homeassistant.const import ATTR_ENTITY_PICTURE
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
@ -166,7 +167,7 @@ class YrSensor(Entity):
|
|||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
return
|
return
|
||||||
data = response.read().decode('utf-8')
|
data = response.read().decode('utf-8')
|
||||||
import xmltodict
|
|
||||||
self._weather_data = xmltodict.parse(data)['weatherdata']
|
self._weather_data = xmltodict.parse(data)['weatherdata']
|
||||||
model = self._weather_data['meta']['model']
|
model = self._weather_data['meta']['model']
|
||||||
if '@nextrun' not in model:
|
if '@nextrun' not in model:
|
||||||
|
@ -170,3 +170,6 @@ https://github.com/persandstrom/python-verisure/archive/9873c4527f01b1ba1f72ae60
|
|||||||
|
|
||||||
# homeassistant.components.zwave
|
# homeassistant.components.zwave
|
||||||
pydispatcher==2.0.5
|
pydispatcher==2.0.5
|
||||||
|
|
||||||
|
# homeassistant.components.sensor.yr
|
||||||
|
xmltodict
|
||||||
|
Loading…
x
Reference in New Issue
Block a user