From 0fdf1391e210f4e7aefb2b0e79ac6a0a549fb35a Mon Sep 17 00:00:00 2001 From: Erik Eriksson Date: Thu, 9 Feb 2017 18:00:18 +0100 Subject: [PATCH 01/18] Don't thow exception if connection to server is lost (#5775) --- homeassistant/components/sensor/tellduslive.py | 4 +++- homeassistant/components/tellduslive.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensor/tellduslive.py b/homeassistant/components/sensor/tellduslive.py index b7f3cf60892..9bebbe6e3dc 100644 --- a/homeassistant/components/sensor/tellduslive.py +++ b/homeassistant/components/sensor/tellduslive.py @@ -85,7 +85,9 @@ class TelldusLiveSensor(TelldusLiveEntity): @property def state(self): """Return the state of the sensor.""" - if self._type == SENSOR_TYPE_TEMP: + if not self.available: + return None + elif self._type == SENSOR_TYPE_TEMP: return self._value_as_temperature elif self._type == SENSOR_TYPE_HUMIDITY: return self._value_as_humidity diff --git a/homeassistant/components/tellduslive.py b/homeassistant/components/tellduslive.py index 259d4e1becb..84ab96841d9 100644 --- a/homeassistant/components/tellduslive.py +++ b/homeassistant/components/tellduslive.py @@ -17,7 +17,7 @@ import voluptuous as vol DOMAIN = 'tellduslive' -REQUIREMENTS = ['tellduslive==0.3.0'] +REQUIREMENTS = ['tellduslive==0.3.2'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 12aaaab9666..21c5538c76b 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -645,7 +645,7 @@ steamodd==4.21 tellcore-py==1.1.2 # homeassistant.components.tellduslive -tellduslive==0.3.0 +tellduslive==0.3.2 # homeassistant.components.sensor.temper temperusb==1.5.1 From 60f85b1e094f0a54675abe519ba6ebd3ef5686ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Thu, 9 Feb 2017 22:25:06 +0100 Subject: [PATCH 02/18] Handle connection errors when connecting to Apple TVs (#5829) * Handle connection errors when connecting to Apple TVs Also bump pyatv to 0.1.2 which fixes a request leak. * Fix pylint error * Fix import order --- homeassistant/components/media_player/apple_tv.py | 5 ++++- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/media_player/apple_tv.py b/homeassistant/components/media_player/apple_tv.py index 19700e2f8d7..a4632c5a12d 100644 --- a/homeassistant/components/media_player/apple_tv.py +++ b/homeassistant/components/media_player/apple_tv.py @@ -8,6 +8,7 @@ import asyncio import logging import hashlib +import aiohttp import voluptuous as vol from homeassistant.components.media_player import ( @@ -21,7 +22,7 @@ import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_util -REQUIREMENTS = ['pyatv==0.1.1'] +REQUIREMENTS = ['pyatv==0.1.2'] _LOGGER = logging.getLogger(__name__) @@ -128,6 +129,8 @@ class AppleTvDevice(MediaPlayerDevice): self._playing = playing except exceptions.AuthenticationError as ex: _LOGGER.warning('%s (bad login id?)', str(ex)) + except aiohttp.errors.ClientOSError as ex: + _LOGGER.error('failed to connect to Apple TV (%s)', str(ex)) except asyncio.TimeoutError: _LOGGER.warning('timed out while connecting to Apple TV') diff --git a/requirements_all.txt b/requirements_all.txt index 21c5538c76b..e67826fa1f6 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -418,7 +418,7 @@ pyasn1-modules==0.0.8 pyasn1==0.2.2 # homeassistant.components.media_player.apple_tv -pyatv==0.1.1 +pyatv==0.1.2 # homeassistant.components.device_tracker.bbox # homeassistant.components.sensor.bbox From 7259082de59dcec83ab08b9487e26c2324c158bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Thu, 9 Feb 2017 23:07:46 +0100 Subject: [PATCH 03/18] Reuse default aiohttp session (#5836) --- homeassistant/components/media_player/apple_tv.py | 6 ++++-- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/media_player/apple_tv.py b/homeassistant/components/media_player/apple_tv.py index a4632c5a12d..2f47b1ba0a8 100644 --- a/homeassistant/components/media_player/apple_tv.py +++ b/homeassistant/components/media_player/apple_tv.py @@ -18,11 +18,12 @@ from homeassistant.components.media_player import ( from homeassistant.const import ( STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_STANDBY, CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP) +from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_util -REQUIREMENTS = ['pyatv==0.1.2'] +REQUIREMENTS = ['pyatv==0.1.3'] _LOGGER = logging.getLogger(__name__) @@ -62,7 +63,8 @@ def async_setup_platform(hass, config, async_add_entities, hass.data[DATA_APPLE_TV].append(host) details = pyatv.AppleTVDevice(name, host, login_id) - atv = pyatv.connect_to_apple_tv(details, hass.loop) + session = async_get_clientsession(hass) + atv = pyatv.connect_to_apple_tv(details, hass.loop, session=session) entity = AppleTvDevice(atv, name) @asyncio.coroutine diff --git a/requirements_all.txt b/requirements_all.txt index e67826fa1f6..605bc2b0de9 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -418,7 +418,7 @@ pyasn1-modules==0.0.8 pyasn1==0.2.2 # homeassistant.components.media_player.apple_tv -pyatv==0.1.2 +pyatv==0.1.3 # homeassistant.components.device_tracker.bbox # homeassistant.components.sensor.bbox From 3f87d28616de97acb09c35a73af1f547969ebbe3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 10 Feb 2017 02:31:20 +0100 Subject: [PATCH 04/18] Update aiohttp 1.3.1 (#5838) --- requirements_all.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_all.txt b/requirements_all.txt index 605bc2b0de9..07943439eb6 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -6,7 +6,7 @@ pip>=7.0.0 jinja2>=2.8 voluptuous==0.9.3 typing>=3,<4 -aiohttp==1.3 +aiohttp==1.3.1 async_timeout==1.1.0 # homeassistant.components.nuimo_controller diff --git a/setup.py b/setup.py index b9d5d3460fb..b6b679315e1 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ REQUIRES = [ 'jinja2>=2.8', 'voluptuous==0.9.3', 'typing>=3,<4', - 'aiohttp==1.3', + 'aiohttp==1.3.1', 'async_timeout==1.1.0', ] From 7bf7c727d1582fb82ac726a41fbd04d587a2fd5c Mon Sep 17 00:00:00 2001 From: Philipp Schmitt Date: Fri, 10 Feb 2017 02:57:19 +0100 Subject: [PATCH 05/18] Refactoring and JSON decode error handling (#5826) * Refactoring and JSON decode error handling * Catch ValueError instead of simplejson.scanner.JSONDecodeError --- homeassistant/components/zoneminder.py | 43 ++++++++++++-------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/homeassistant/components/zoneminder.py b/homeassistant/components/zoneminder.py index 4920a5a6ce2..0fbe807fb2a 100644 --- a/homeassistant/components/zoneminder.py +++ b/homeassistant/components/zoneminder.py @@ -5,7 +5,6 @@ For more details about this component, please refer to the documentation at https://home-assistant.io/components/zoneminder/ """ import logging -import json from urllib.parse import urljoin import requests @@ -79,46 +78,44 @@ def login(): ZM['url'] + 'api/host/getVersion.json', cookies=ZM['cookies'], timeout=DEFAULT_TIMEOUT) - if req.status_code != requests.codes.ok: + if not req.ok: _LOGGER.error("Connection error logging into ZoneMinder") return False return True -# pylint: disable=no-member -def get_state(api_url): - """Get a state from the ZoneMinder API service.""" +def _zm_request(method, api_url, data=None): + """Perform a Zoneminder request.""" # Since the API uses sessions that expire, sometimes we need to re-auth # if the call fails. for _ in range(LOGIN_RETRIES): - req = requests.get(urljoin(ZM['url'], api_url), cookies=ZM['cookies'], - timeout=DEFAULT_TIMEOUT) + req = requests.request( + method, urljoin(ZM['url'], api_url), data=data, + cookies=ZM['cookies'], timeout=DEFAULT_TIMEOUT) - if req.status_code != requests.codes.ok: + if not req.ok: login() else: break + else: _LOGGER.exception("Unable to get API response from ZoneMinder") - return json.loads(req.text) + try: + return req.json() + except ValueError: + _LOGGER.exception('JSON decode exception caught while attempting to ' + 'decode "%s"', req.text) + + +# pylint: disable=no-member +def get_state(api_url): + """Get a state from the ZoneMinder API service.""" + return _zm_request('get', api_url) # pylint: disable=no-member def change_state(api_url, post_data): """Update a state using the Zoneminder API.""" - for _ in range(LOGIN_RETRIES): - req = requests.post( - urljoin(ZM['url'], api_url), data=post_data, cookies=ZM['cookies'], - timeout=DEFAULT_TIMEOUT) - - if req.status_code != requests.codes.ok: - login() - else: - break - - else: - _LOGGER.exception("Unable to get API response from ZoneMinder") - - return json.loads(req.text) + return _zm_request('post', api_url, data=post_data) From 3d7b79f523d0c2d040adfe2378ba79958045b4fc Mon Sep 17 00:00:00 2001 From: Adam Mills Date: Thu, 9 Feb 2017 21:17:17 -0500 Subject: [PATCH 06/18] [recorder] Add tests for full schema migration (#5831) * [recorder] Add tests for full schema migration * Remove leftover code * Fix duplicate creation of sqlalchemy Index object * It's that kind of day... * Improve models_original docstring --- homeassistant/components/recorder/__init__.py | 7 +- tests/components/recorder/models_original.py | 163 ++++++++++++++++++ tests/components/recorder/test_init.py | 58 ++++++- 3 files changed, 216 insertions(+), 12 deletions(-) create mode 100644 tests/components/recorder/models_original.py diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 14b9fe11574..8d3213a4805 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -345,15 +345,16 @@ class Recorder(threading.Thread): def _apply_update(self, new_version): """Perform operations to bring schema up to date.""" - from sqlalchemy import Index, Table + from sqlalchemy import Table import homeassistant.components.recorder.models as models if new_version == 1: def create_index(table_name, column_name): """Create an index for the specified table and column.""" table = Table(table_name, models.Base.metadata) - index_name = "_".join(("ix", table_name, column_name)) - index = Index(index_name, getattr(table.c, column_name)) + name = "_".join(("ix", table_name, column_name)) + # Look up the index object that was created from the models + index = next(idx for idx in table.indexes if idx.name == name) _LOGGER.debug("Creating index for table %s column %s", table_name, column_name) index.create(self.engine) diff --git a/tests/components/recorder/models_original.py b/tests/components/recorder/models_original.py new file mode 100644 index 00000000000..31ec5ee7ed7 --- /dev/null +++ b/tests/components/recorder/models_original.py @@ -0,0 +1,163 @@ +"""Models for SQLAlchemy. + +This file contains the original models definitions before schema tracking was +implemented. It is used to test the schema migration logic. +""" + +import json +from datetime import datetime +import logging + +from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer, + String, Text, distinct) +from sqlalchemy.ext.declarative import declarative_base + +import homeassistant.util.dt as dt_util +from homeassistant.core import Event, EventOrigin, State, split_entity_id +from homeassistant.remote import JSONEncoder + +# SQLAlchemy Schema +# pylint: disable=invalid-name +Base = declarative_base() + +_LOGGER = logging.getLogger(__name__) + + +class Events(Base): # type: ignore + """Event history data.""" + + __tablename__ = 'events' + event_id = Column(Integer, primary_key=True) + event_type = Column(String(32), index=True) + event_data = Column(Text) + origin = Column(String(32)) + time_fired = Column(DateTime(timezone=True)) + created = Column(DateTime(timezone=True), default=datetime.utcnow) + + @staticmethod + def from_event(event): + """Create an event database object from a native event.""" + return Events(event_type=event.event_type, + event_data=json.dumps(event.data, cls=JSONEncoder), + origin=str(event.origin), + time_fired=event.time_fired) + + def to_native(self): + """Convert to a natve HA Event.""" + try: + return Event( + self.event_type, + json.loads(self.event_data), + EventOrigin(self.origin), + _process_timestamp(self.time_fired) + ) + except ValueError: + # When json.loads fails + _LOGGER.exception("Error converting to event: %s", self) + return None + + +class States(Base): # type: ignore + """State change history.""" + + __tablename__ = 'states' + state_id = Column(Integer, primary_key=True) + domain = Column(String(64)) + entity_id = Column(String(255)) + state = Column(String(255)) + attributes = Column(Text) + event_id = Column(Integer, ForeignKey('events.event_id')) + last_changed = Column(DateTime(timezone=True), default=datetime.utcnow) + last_updated = Column(DateTime(timezone=True), default=datetime.utcnow) + created = Column(DateTime(timezone=True), default=datetime.utcnow) + + __table_args__ = (Index('states__state_changes', + 'last_changed', 'last_updated', 'entity_id'), + Index('states__significant_changes', + 'domain', 'last_updated', 'entity_id'), ) + + @staticmethod + def from_event(event): + """Create object from a state_changed event.""" + entity_id = event.data['entity_id'] + state = event.data.get('new_state') + + dbstate = States(entity_id=entity_id) + + # State got deleted + if state is None: + dbstate.state = '' + dbstate.domain = split_entity_id(entity_id)[0] + dbstate.attributes = '{}' + dbstate.last_changed = event.time_fired + dbstate.last_updated = event.time_fired + else: + dbstate.domain = state.domain + dbstate.state = state.state + dbstate.attributes = json.dumps(dict(state.attributes), + cls=JSONEncoder) + dbstate.last_changed = state.last_changed + dbstate.last_updated = state.last_updated + + return dbstate + + def to_native(self): + """Convert to an HA state object.""" + try: + return State( + self.entity_id, self.state, + json.loads(self.attributes), + _process_timestamp(self.last_changed), + _process_timestamp(self.last_updated) + ) + except ValueError: + # When json.loads fails + _LOGGER.exception("Error converting row to state: %s", self) + return None + + +class RecorderRuns(Base): # type: ignore + """Representation of recorder run.""" + + __tablename__ = 'recorder_runs' + run_id = Column(Integer, primary_key=True) + start = Column(DateTime(timezone=True), default=datetime.utcnow) + end = Column(DateTime(timezone=True)) + closed_incorrect = Column(Boolean, default=False) + created = Column(DateTime(timezone=True), default=datetime.utcnow) + + def entity_ids(self, point_in_time=None): + """Return the entity ids that existed in this run. + + Specify point_in_time if you want to know which existed at that point + in time inside the run. + """ + from sqlalchemy.orm.session import Session + + session = Session.object_session(self) + + assert session is not None, 'RecorderRuns need to be persisted' + + query = session.query(distinct(States.entity_id)).filter( + States.last_updated >= self.start) + + if point_in_time is not None: + query = query.filter(States.last_updated < point_in_time) + elif self.end is not None: + query = query.filter(States.last_updated < self.end) + + return [row[0] for row in query] + + def to_native(self): + """Return self, native format is this model.""" + return self + + +def _process_timestamp(ts): + """Process a timestamp into datetime object.""" + if ts is None: + return None + elif ts.tzinfo is None: + return dt_util.UTC.localize(ts) + else: + return dt_util.as_utc(ts) diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index ce395044d11..0bfa3a20997 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -6,15 +6,18 @@ import unittest from unittest.mock import patch, call, MagicMock import pytest +from sqlalchemy import create_engine + from homeassistant.core import callback from homeassistant.const import MATCH_ALL from homeassistant.components import recorder from homeassistant.bootstrap import setup_component from tests.common import get_test_home_assistant +from tests.components.recorder import models_original -class TestRecorder(unittest.TestCase): - """Test the recorder module.""" +class BaseTestRecorder(unittest.TestCase): + """Base class for common recorder tests.""" def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" @@ -87,6 +90,10 @@ class TestRecorder(unittest.TestCase): time_fired=timestamp, )) + +class TestRecorder(BaseTestRecorder): + """Test the recorder module.""" + def test_saving_state(self): """Test saving and restoring a state.""" entity_id = 'test.recorder' @@ -205,15 +212,48 @@ class TestRecorder(unittest.TestCase): with self.assertRaises(ValueError): recorder._INSTANCE._apply_update(-1) + +def create_engine_test(*args, **kwargs): + """Test version of create_engine that initializes with old schema. + + This simulates an existing db with the old schema. + """ + engine = create_engine(*args, **kwargs) + models_original.Base.metadata.create_all(engine) + return engine + + +class TestMigrateRecorder(BaseTestRecorder): + """Test recorder class that starts with an original schema db.""" + + @patch('sqlalchemy.create_engine', new=create_engine_test) + @patch('homeassistant.components.recorder.Recorder._migrate_schema') + def setUp(self, migrate): # pylint: disable=invalid-name + """Setup things to be run when tests are started. + + create_engine is patched to create a db that starts with the old + schema. + + _migrate_schema is mocked to ensure it isn't run, so we can test it + below. + """ + super().setUp() + def test_schema_update_calls(self): # pylint: disable=no-self-use """Test that schema migrations occurr in correct order.""" - test_version = recorder.models.SchemaChanges(schema_version=0) - with recorder.session_scope() as session: - session.add(test_version) - with patch.object(recorder._INSTANCE, '_apply_update') as update: - recorder._INSTANCE._migrate_schema() - update.assert_has_calls([call(version+1) for version in range( - 0, recorder.models.SCHEMA_VERSION)]) + with patch.object(recorder._INSTANCE, '_apply_update') as update: + recorder._INSTANCE._migrate_schema() + update.assert_has_calls([call(version+1) for version in range( + 0, recorder.models.SCHEMA_VERSION)]) + + def test_schema_migrate(self): # pylint: disable=no-self-use + """Test the full schema migration logic. + + We're just testing that the logic can execute successfully here without + throwing exceptions. Maintaining a set of assertions based on schema + inspection could quickly become quite cumbersome. + """ + recorder._INSTANCE._migrate_schema() @pytest.fixture From 2b62e9f008a59cdd3132a501e2b09aff98d4330a Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 10 Feb 2017 12:30:44 +0200 Subject: [PATCH 07/18] Fix zwave helper getter not to fail on some None results. (#5845) --- homeassistant/components/zwave/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 8fcfd3897a7..867a0f96062 100755 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -646,6 +646,7 @@ class ZWaveDeviceEntity(Entity): method, class_id, index, label, data, member, kwargs) values = self._value.node.get_values(**kwargs).values() _LOGGER.debug('values=%s', values) + results = None if not values: return None for value in values: From cee389f62106ad95013c4f6a69e163496a9a0b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Br=C3=A6dstrup?= Date: Fri, 10 Feb 2017 12:00:28 +0100 Subject: [PATCH 08/18] D-Link switch version bump of external library (#5843) --- homeassistant/components/switch/dlink.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch/dlink.py b/homeassistant/components/switch/dlink.py index 3e1f7db3ddb..11aff81a0d5 100644 --- a/homeassistant/components/switch/dlink.py +++ b/homeassistant/components/switch/dlink.py @@ -15,7 +15,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.const import TEMP_CELSIUS, STATE_UNKNOWN REQUIREMENTS = ['https://github.com/LinuxChristian/pyW215/archive/' - 'v0.3.7.zip#pyW215==0.3.7'] + 'v0.4.zip#pyW215==0.4'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 07943439eb6..229ec1229fd 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -198,7 +198,7 @@ hikvision==0.4 # http://github.com/adafruit/Adafruit_Python_DHT/archive/310c59b0293354d07d94375f1365f7b9b9110c7d.zip#Adafruit_DHT==1.3.0 # homeassistant.components.switch.dlink -https://github.com/LinuxChristian/pyW215/archive/v0.3.7.zip#pyW215==0.3.7 +https://github.com/LinuxChristian/pyW215/archive/v0.4.zip#pyW215==0.4 # homeassistant.components.media_player.webostv # homeassistant.components.notify.webostv From 0f6aed16a2b89ec4fd8aa42e8deff5f53baf7666 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Fri, 10 Feb 2017 14:45:31 +0100 Subject: [PATCH 09/18] bump python-yeelight version (#5850) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- homeassistant/components/light/yeelight.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/yeelight.py b/homeassistant/components/light/yeelight.py index 616bae94a91..5eae4c66bb6 100644 --- a/homeassistant/components/light/yeelight.py +++ b/homeassistant/components/light/yeelight.py @@ -22,7 +22,7 @@ from homeassistant.components.light import ( Light, PLATFORM_SCHEMA) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['yeelight==0.2.1'] +REQUIREMENTS = ['yeelight==0.2.2'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 229ec1229fd..34f74ca6bd9 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -711,7 +711,7 @@ yahoo-finance==1.4.0 yahooweather==0.8 # homeassistant.components.light.yeelight -yeelight==0.2.1 +yeelight==0.2.2 # homeassistant.components.light.zengge zengge==0.2 From a071cd21f2c1b30affb5f9cc86b6a60fe65b0515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Vran=C3=ADk?= Date: Fri, 10 Feb 2017 14:56:49 +0100 Subject: [PATCH 10/18] version bump (#5846) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- homeassistant/components/hdmi_cec.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/hdmi_cec.py b/homeassistant/components/hdmi_cec.py index 11a3f0f2d02..a154bdf609e 100644 --- a/homeassistant/components/hdmi_cec.py +++ b/homeassistant/components/hdmi_cec.py @@ -26,7 +26,7 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_START, STATE_UNKNOWN, from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import Entity -REQUIREMENTS = ['pyCEC==0.4.12'] +REQUIREMENTS = ['pyCEC==0.4.13'] DOMAIN = 'hdmi_cec' diff --git a/requirements_all.txt b/requirements_all.txt index 34f74ca6bd9..695b7144fa3 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -403,7 +403,7 @@ pwaqi==1.4 py-cpuinfo==0.2.3 # homeassistant.components.hdmi_cec -pyCEC==0.4.12 +pyCEC==0.4.13 # homeassistant.components.switch.tplink pyHS100==0.2.3 From eaa6392535b55f49106b12693e8804a9ab589db1 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 10 Feb 2017 17:51:08 +0100 Subject: [PATCH 11/18] Fix check_config script. (#5853) --- homeassistant/scripts/check_config.py | 1 + tests/test_bootstrap.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/scripts/check_config.py b/homeassistant/scripts/check_config.py index b1ecaaa57ba..154754c667a 100644 --- a/homeassistant/scripts/check_config.py +++ b/homeassistant/scripts/check_config.py @@ -33,6 +33,7 @@ MOCKS = { } SILENCE = ( 'homeassistant.bootstrap.clear_secret_cache', + 'homeassistant.bootstrap.async_register_signal_handling', 'homeassistant.core._LOGGER.info', 'homeassistant.loader._LOGGER.info', 'homeassistant.bootstrap._LOGGER.info', diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 0a1e3633916..0fede71a63d 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -58,7 +58,7 @@ class TestBootstrap: autospec=True) @mock.patch('homeassistant.util.location.detect_location_info', autospec=True, return_value=None) - @mock.patch('homeassistant.helpers.signal.async_register_signal_handling') + @mock.patch('homeassistant.bootstrap.async_register_signal_handling') def test_from_config_file(self, mock_upgrade, mock_detect, mock_signal): """Test with configuration file.""" components = ['browser', 'conversation', 'script'] @@ -290,7 +290,7 @@ class TestBootstrap: assert 'comp' not in self.hass.config.components @mock.patch('homeassistant.bootstrap.enable_logging') - @mock.patch('homeassistant.helpers.signal.async_register_signal_handling') + @mock.patch('homeassistant.bootstrap.async_register_signal_handling') def test_home_assistant_core_config_validation(self, log_mock, sig_mock): """Test if we pass in wrong information for HA conf.""" # Extensive HA conf validation testing is done in test_config.py From 0e6ab3ace6fa8f62e8dbcbe57546244349eabe58 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 10 Feb 2017 09:30:13 -0800 Subject: [PATCH 12/18] Update frontend (#5855) --- homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 2 +- .../frontend/www_static/frontend.html.gz | Bin 138154 -> 138153 bytes .../www_static/home-assistant-polymer | 2 +- .../frontend/www_static/service_worker.js | 2 +- .../frontend/www_static/service_worker.js.gz | Bin 2338 -> 2337 bytes 6 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 4f8b6aed2d0..40cda09ae24 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -2,7 +2,7 @@ FINGERPRINTS = { "core.js": "adfeb513cf650acf763e284d76a48d6b", - "frontend.html": "ae96f5256a562f35a652f31560a3b550", + "frontend.html": "43340b2369646b779e04a9925c225ab4", "mdi.html": "c1dde43ccf5667f687c418fc8daf9668", "micromarkdown-js.html": "93b5ec4016f0bba585521cf4d18dec1a", "panels/ha-panel-dev-event.html": "5c82300b3cf543a92cf4297506e450e7", diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 70a7063556b..31f8a0789dd 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -600,4 +600,4 @@ this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,th this.hass.callService('media_player', service, serviceData); }, }); -}()); \ No newline at end of file +}()); \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/frontend.html.gz b/homeassistant/components/frontend/www_static/frontend.html.gz index 2e368d5b7f80e50e9f04a54b610ee75669fe1a4e..2790cc1ddf447ff91abfdf445239ca8e335103ea 100644 GIT binary patch delta 10641 zcmV;CDQ?!Pw+N}X2nQdF2nbR5oq-3n2LXBVe`K9|=-A>Q2E=+ABe#(;$?lp1h-8!M z$tke*I=_O8Z)b&3s#l#D5D~wSu#ICt1b~|YeDPV70oQNtCG7$az&TP(sr7nwSgk+5 z%i^na_KInhb5x34z~A+~yDkdfz5np0cl66o?|bg~PndrPGU zFCMFJzQDU~Ok~?@)Ei4yy)1kdPY8AI09$ZZcl9m)I`h1yuOpmQrRYk9QR_ZBNR-U1dP{tg-iAPDarQYb?nOqv*(xuJ%Q#)>Rptr-nP4HR=?^;Df9M61 z&Nljs7nQ4TjbaOW8^L5gW*=2-4`$;|Jg8QlLhx#zWE4B~D#u_j7`_Ii=6CpmVgN@} ze!Wzse})sZ%&%vc6dMhTPw*GTh7(^fJ*_OqFwA)SR6V--dhrqS$#!JGC*T2;1@f%` zuoDs-$eu*R7^78J4d6*D&pd6*f6nxjeBjd84d4f+-_*TwEI zni^sl}>uH>y)& z>~HYYYQVbH3+o$d_kbr>9`I}5SPiiMDUYn07D6&futmH;e@Jzc@JC(Gc#G4md;3BL z1;%5@pSnWDq|JB;t=2K#K^=g+@1K%ln`b}_&J1K_PNcj{R#*8|LQWYZSr7N0iW%+O zwt8j#OysvMXJBlc<|+IYD+VH)iv}L}ZqmESS946x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3g`mm5x)yOAD|{TkF;OC zix9u_L^O3PN*{tUr~ZPXIuOX2%JTtNw!eLTL$bkg@1d1XT;4YJK zGI6i6F7d8)YM1EVB;K_Zabui$oS(_bB?OShjFYb!Z`fkId0MCzAy79*^BoIp{rvK; z$J!~2wg?<&9fJd9ZQ+vp)`qFNTcA5w(lvuI^Mmnu5t2=X4*LzyYJqq_r1&Ot}+K;v=zXYge0}ME4U8JfOyxw`ObD ztnN{DBidaa+eZN}UG!z-1N|T>uj8AB9`pR`hwYBpngG2`<#>3!*&!7aBviK>g%~oS zt_ej~P%S=FYzd8lQcl5;6}}MyeC@+cL4d{UZk2W6e?{a1ja9G2nJM|#cKUM91v#Sd zA?q3zRk>|ZHOISk5|EGav4BW%<}qK7SjDG^a9sIq66LsD-Q8EdGqtjh986)IX@#^u sey6&r0m4l!urs8JsNvm&9e<;WK>jhG-=QQ2cdvv059+M<25XiG02bNHMF0Q* diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index 44ed8271458..f3808ff4d44 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 44ed827145879dd12e20183be75a2af9594240a1 +Subproject commit f3808ff4d44733f5810e21131e0daa1425bf5f22 diff --git a/homeassistant/components/frontend/www_static/service_worker.js b/homeassistant/components/frontend/www_static/service_worker.js index 39156226abe..334d21443f1 100644 --- a/homeassistant/components/frontend/www_static/service_worker.js +++ b/homeassistant/components/frontend/www_static/service_worker.js @@ -1 +1 @@ -"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}function notificationEventCallback(e,t){firePushCallback({action:t.action,data:t.notification.data,tag:t.notification.tag,type:e},t.notification.data.jwt)}function firePushCallback(e,t){delete e.data.jwt,0===Object.keys(e.data).length&&e.data.constructor===Object&&delete e.data,fetch("/api/notify.html5/callback",{method:"POST",headers:new Headers({"Content-Type":"application/json",Authorization:"Bearer "+t}),body:JSON.stringify(e)})}var precacheConfig=[["/","7fd1a89b1d937df60e7a50429eec0d2b"],["/frontend/panels/dev-event-5c82300b3cf543a92cf4297506e450e7.html","1bb68c3df5c14307a2550a0cca39b435"],["/frontend/panels/dev-info-0469024d94d6270a8680df2be44ba916.html","35995794b5a909d517be812ad4f46ea8"],["/frontend/panels/dev-service-9f749635e518a4ca7991975bdefdb10a.html","1bc71eb7620c7b7198fd4b7976d6bc13"],["/frontend/panels/dev-state-7d069ba8fd5379fa8f59858b8c0a7473.html","18694d76e03e1194c734e9819923b70b"],["/frontend/panels/dev-template-2b618508510afa5281c9ecae0c3a3dbd.html","554e7f893ab24c8548813382142207d4"],["/frontend/panels/map-9c8c7924ba8f731560c9f4093835cc26.html","8ae4874622d23d995ddf2a8b0ffa8d80"],["/static/core-adfeb513cf650acf763e284d76a48d6b.js","f5fdf5f1f754e801f9f54ad31a3cc922"],["/static/frontend-ae96f5256a562f35a652f31560a3b550.html","d2a5bfe0753090d2abc2f1a57bab6627"],["/static/mdi-7a0f14bbf3822449f9060b9c53bd7376.html","8d60ec43a3f8a77b21c312783ae5b892"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/icons/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/icons/favicon.ico","04235bda7843ec2fceb1cbe2bc696cf4"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","32b5a9b7ada86304bec6b43d3f2194f0"]],cacheName="sw-precache-v2--"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var a=new URL(e);return"/"===a.pathname.slice(-1)&&(a.pathname+=t),a.toString()},createCacheKey=function(e,t,a,n){var c=new URL(e);return n&&c.toString().match(n)||(c.search+=(c.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(a)),c.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var a=new URL(t).pathname;return e.some(function(e){return a.match(e)})},stripIgnoredUrlParameters=function(e,t){var a=new URL(e);return a.search=a.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),a.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],a=e[1],n=new URL(t,self.location),c=createCacheKey(n,hashParamName,a,!1);return[n.toString(),c]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(a){if(!t.has(a))return e.add(new Request(a,{credentials:"same-origin",redirect:"follow"}))}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(a){return Promise.all(a.map(function(a){if(!t.has(a.url))return e.delete(a)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,a=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);t=urlsToCacheKeys.has(a);var n="index.html";!t&&n&&(a=addDirectoryIndex(a,n),t=urlsToCacheKeys.has(a));var c="/";!t&&c&&"navigate"===e.request.mode&&isPathWhitelisted(["^((?!(static|api|local|service_worker.js|manifest.json)).)*$"],e.request.url)&&(a=new URL(c,self.location).toString(),t=urlsToCacheKeys.has(a)),t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(a)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}),self.addEventListener("push",function(e){var t;e.data&&(t=e.data.json(),e.waitUntil(self.registration.showNotification(t.title,t).then(function(e){firePushCallback({type:"received",tag:t.tag,data:t.data},t.data.jwt)})))}),self.addEventListener("notificationclick",function(e){var t;notificationEventCallback("clicked",e),e.notification.close(),e.notification.data&&e.notification.data.url&&(t=e.notification.data.url,t&&e.waitUntil(clients.matchAll({type:"window"}).then(function(e){var a,n;for(a=0;an!PY&O%T%{4hDKe*lujt7YeMXDrZ$F=>x_komT$+Dc?=}ZzaAn}gx9p3|-RSSdG zG=((IM6W7oinp!q1_;zV_OgqrsS)`x@1L*H&haXO-(|6(< zNYkU&zw&|-s+pM&hwD#eU120v($vj%!*IAK&eve%+;zr$S&TdLu7bH)l<`=uZE*bS z1()|KNwU!jnu z_;0s%>ii14fo9;Gm|M>mwYoa}=f`(%1DiS346W#ccEOv$vH@u`2Q}zoHa$CY#*XhO zt|?U^13_Y;!i4B3Nurb`OvNB`;hg*Up>8^})Og7&DBH1uixJqEk7Aio7KVaJ9Y>7k zRO*Q4X&fdH#UZ2}3aEz&kz|r79ZM3iFy%CkLmo=WSuP?LAJd887W zhCEBMP-!Y4iUiL|vQfk0Jde{n5;4!iT*V|6kP*sNgnj|fj;m>*xhN!za-Bwb!eWR? z#v{qoJSXUnP@t6{A-{7-rUXQq&`_o#C3&V*B+@)hR3ao{k7zR7z$itqbHQ;}%+g%r zL!4)ECNdfF6a%o;lO^bMngGU#kUWwpiy+TPo>L~$@R0x+SS(Acii(6}ahSzuzUDE_ zh|Dn;Ae4+VCDcY$97mAqEN5KMNM>=AWrVSel8DkURnfz$u&s=8naMP#k@Y8KBu+w^ z>nO}w#$qYyHar=JC`+RRQ;sr)p;8z`o{3N+04fW64Hlq6j%D4zh${^uCYW9c=8M#6 z!hmKL5FTZSbnvZ3xjNRES(@k+UC2VBbIeAr7~xFHoYFnH8wW-aV^Jt5OY$U2M4ILh z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NDXug&Na1(o<&aa>?b9^o>8t)&4n}g+irZD!Nr9~SzXf<05k Date: Fri, 10 Feb 2017 22:22:15 +0200 Subject: [PATCH 13/18] [recorder] Run end model changed in session scope (#5858) --- homeassistant/components/recorder/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 8d3213a4805..66eb06f4d27 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -421,8 +421,8 @@ class Recorder(threading.Thread): def _close_run(self): """Save end time for current run.""" - self._run.end = dt_util.utcnow() with session_scope() as session: + self._run.end = dt_util.utcnow() self._commit(session, self._run) self._run = None From 849ae9903cccff7bed5056c1abb999c29183ca0b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 10 Feb 2017 12:55:59 -0800 Subject: [PATCH 14/18] Recorder run can be None (#5854) --- homeassistant/components/recorder/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 66eb06f4d27..b227a8ce76a 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -124,7 +124,8 @@ def run_information(point_in_time: Optional[datetime]=None): res = query(recorder_runs).filter( (recorder_runs.start < point_in_time) & (recorder_runs.end > point_in_time)).first() - session.expunge(res) + if res: + session.expunge(res) return res From bb043c47f8e6b60b783096ee3f2a64a90dfab2a1 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Sat, 11 Feb 2017 00:24:07 +0100 Subject: [PATCH 15/18] Rflink update and small refactor. (#5789) * Use same pattern for device defaults in both platforms. * Update Rflink that passes loop downstream. * Update requirements. --- homeassistant/components/rflink.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/rflink.py b/homeassistant/components/rflink.py index 13696318e01..9a9e6d1145f 100644 --- a/homeassistant/components/rflink.py +++ b/homeassistant/components/rflink.py @@ -36,7 +36,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity import voluptuous as vol -REQUIREMENTS = ['rflink==0.0.24'] +REQUIREMENTS = ['rflink==0.0.28'] DOMAIN = 'rflink' diff --git a/requirements_all.txt b/requirements_all.txt index 695b7144fa3..fff2eaef756 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -586,7 +586,7 @@ qnapstats==0.2.1 radiotherm==1.2 # homeassistant.components.rflink -rflink==0.0.24 +rflink==0.0.28 # homeassistant.components.switch.rpi_rf # rpi-rf==0.9.6 From 3fb70afb1439a433d2fef57260cc610aa9d9769c Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Fri, 10 Feb 2017 23:51:19 -0500 Subject: [PATCH 16/18] Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call (#5865) * Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call * Make lint happy --- homeassistant/components/sensor/amcrest.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/sensor/amcrest.py b/homeassistant/components/sensor/amcrest.py index 08d551b8fde..f250905e952 100644 --- a/homeassistant/components/sensor/amcrest.py +++ b/homeassistant/components/sensor/amcrest.py @@ -122,10 +122,18 @@ class AmcrestSensor(Entity): def update(self): """Get the latest data and updates the state.""" - version, build_date = self._camera.software_information - self._attrs['Build Date'] = build_date.split('=')[-1] - self._attrs['Serial Number'] = self._camera.serial_number - self._attrs['Version'] = version.split('=')[-1] + try: + version, build_date = self._camera.software_information + self._attrs['Build Date'] = build_date.split('=')[-1] + self._attrs['Version'] = version.split('=')[-1] + except ValueError: + self._attrs['Build Date'] = 'Not Available' + self._attrs['Version'] = 'Not Available' + + try: + self._attrs['Serial Number'] = self._camera.serial_number + except ValueError: + self._attrs['Serial Number'] = 'Not Available' if self._sensor_type == 'motion_detector': self._state = self._camera.is_motion_detected From d8a34877d4f94332b41d8ee2c4b7c1b9248369ca Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 10 Feb 2017 20:55:52 -0800 Subject: [PATCH 17/18] Version bump to 0.38 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index eda303a552e..358294dde4d 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 38 -PATCH_VERSION = '0.dev0' +PATCH_VERSION = '0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) From b59b42db2c72c28d5ce76a8ba7bac601e7de00ee Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 11 Feb 2017 19:58:20 -0800 Subject: [PATCH 18/18] 0.38.1 (#5889) * Upgrade AppleTV dep to 0.1.4 * Version bump to 0.38.1 * Update logbook in frontend --- homeassistant/components/frontend/version.py | 2 +- .../www_static/panels/ha-panel-logbook.html | 2 +- .../panels/ha-panel-logbook.html.gz | Bin 8001 -> 8006 bytes .../components/media_player/apple_tv.py | 2 +- homeassistant/const.py | 2 +- requirements_all.txt | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 40cda09ae24..859a9e52bbd 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -12,7 +12,7 @@ FINGERPRINTS = { "panels/ha-panel-dev-template.html": "2b618508510afa5281c9ecae0c3a3dbd", "panels/ha-panel-history.html": "8955c1d093a2c417c89ed90dd627c7d3", "panels/ha-panel-iframe.html": "d920f0aa3c903680f2f8795e2255daab", - "panels/ha-panel-logbook.html": "f36297a894524518fa70883f264492b0", + "panels/ha-panel-logbook.html": "7eb06cf9fdeab6683bcd755276f571aa", "panels/ha-panel-map.html": "9c8c7924ba8f731560c9f4093835cc26", "websocket_test.html": "575de64b431fe11c3785bf96d7813450" } diff --git a/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html b/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html index 7b5c0f6d33c..1335ff844be 100644 --- a/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html +++ b/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html @@ -1,4 +1,4 @@ \ No newline at end of file + */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single:after{clear:both}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-next,.pika-prev{display:block;cursor:pointer;position:relative;outline:0;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{float:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==)}.is-rtl .pika-prev,.pika-next{float:right;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=)}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table td,.pika-table th{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:700;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:0;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:700}.is-selected .pika-button{color:#fff;font-weight:700;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#3af;box-shadow:none;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:none;cursor:help}} \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html.gz b/homeassistant/components/frontend/www_static/panels/ha-panel-logbook.html.gz index c81ae0bc4545bec3ebb536adf50165d822f0ac1d..5c3f2b97bd8376771fa8ec1a362d8587dc2de9f6 100644 GIT binary patch delta 571 zcmV-B0>u5nKE^%=ABzYG;oP6G2N@lI(wK@*5_qt*R$Noy81&tnD54xyD1*W-97AVw zLtAm`U>kUpFY6V)TzhVSmCn4=Q0IViy%9lAx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istant/components/media_player/apple_tv.py +++ b/homeassistant/components/media_player/apple_tv.py @@ -23,7 +23,7 @@ import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_util -REQUIREMENTS = ['pyatv==0.1.3'] +REQUIREMENTS = ['pyatv==0.1.4'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/const.py b/homeassistant/const.py index 358294dde4d..2cbaf395c39 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 38 -PATCH_VERSION = '0' +PATCH_VERSION = '1' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) diff --git a/requirements_all.txt b/requirements_all.txt index fff2eaef756..2303b7926c8 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -418,7 +418,7 @@ pyasn1-modules==0.0.8 pyasn1==0.2.2 # homeassistant.components.media_player.apple_tv -pyatv==0.1.3 +pyatv==0.1.4 # homeassistant.components.device_tracker.bbox # homeassistant.components.sensor.bbox