From db2783c2d1c4c67d24b40c4301632aafefbcd0ea Mon Sep 17 00:00:00 2001 From: Jan Harkes Date: Fri, 8 Apr 2016 23:51:48 -0400 Subject: [PATCH] Upgrade astral (#1754) * Upgrade astral to 1.0 * Pass timezone as string, not object, to astral.Location. --- homeassistant/components/sun.py | 6 +++--- requirements_all.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/sun.py b/homeassistant/components/sun.py index 0f25d12706b..f4e13b11761 100644 --- a/homeassistant/components/sun.py +++ b/homeassistant/components/sun.py @@ -14,7 +14,7 @@ from homeassistant.helpers.event import ( from homeassistant.util import dt as dt_util from homeassistant.util import location as location_util -REQUIREMENTS = ['astral==0.9'] +REQUIREMENTS = ['astral==1.0'] DOMAIN = "sun" ENTITY_ID = "sun.sun" @@ -113,8 +113,8 @@ def setup(hass, config): from astral import Location - location = Location(('', '', latitude, longitude, hass.config.time_zone, - elevation)) + location = Location(('', '', latitude, longitude, + hass.config.time_zone.zone, elevation)) sun = Sun(hass, location) sun.point_in_time_listener(dt_util.utcnow()) diff --git a/requirements_all.txt b/requirements_all.txt index 3ca5bde300c..58622fdeb70 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -26,7 +26,7 @@ TwitterAPI==2.3.6 apcaccess==0.0.4 # homeassistant.components.sun -astral==0.9 +astral==1.0 # homeassistant.components.light.blinksticklight blinkstick==1.1.7