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