diff --git a/homeassistant/components/frontend/manifest.json b/homeassistant/components/frontend/manifest.json index 6e513d55742..41728bc1664 100644 --- a/homeassistant/components/frontend/manifest.json +++ b/homeassistant/components/frontend/manifest.json @@ -3,7 +3,7 @@ "name": "Home Assistant Frontend", "documentation": "https://www.home-assistant.io/integrations/frontend", "requirements": [ - "home-assistant-frontend==20191119.2" + "home-assistant-frontend==20191119.5" ], "dependencies": [ "api", diff --git a/homeassistant/components/netatmo/__init__.py b/homeassistant/components/netatmo/__init__.py index 4b9f0690ac5..de371f97e28 100644 --- a/homeassistant/components/netatmo/__init__.py +++ b/homeassistant/components/netatmo/__init__.py @@ -259,4 +259,4 @@ class CameraData: @Throttle(MIN_TIME_BETWEEN_EVENT_UPDATES) def update_event(self): """Call the Netatmo API to update the events.""" - self.camera_data.updateEvent(home=self.home, cameratype=self.camera_type) + self.camera_data.updateEvent(home=self.home, devicetype=self.camera_type) diff --git a/homeassistant/components/netatmo/manifest.json b/homeassistant/components/netatmo/manifest.json index 9d1178d9d17..232e99eeae8 100644 --- a/homeassistant/components/netatmo/manifest.json +++ b/homeassistant/components/netatmo/manifest.json @@ -3,10 +3,10 @@ "name": "Netatmo", "documentation": "https://www.home-assistant.io/integrations/netatmo", "requirements": [ - "pyatmo==3.0.1" + "pyatmo==3.1.0" ], "dependencies": [ "webhook" ], "codeowners": [] -} +} \ No newline at end of file diff --git a/homeassistant/components/netatmo/sensor.py b/homeassistant/components/netatmo/sensor.py index f76062035d2..fa7aedae739 100644 --- a/homeassistant/components/netatmo/sensor.py +++ b/homeassistant/components/netatmo/sensor.py @@ -155,14 +155,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None): for module in all_module_infos.values(): if module["module_name"] not in module_names: continue + _LOGGER.debug( + "Adding module %s %s", module["module_name"], module["id"] + ) for condition in data.station_data.monitoredConditions( moduleId=module["id"] ): - _LOGGER.debug( - "Adding %s %s", - module["module_name"], - data.station_data.moduleById(mid=module["id"]), - ) entities.append(NetatmoSensor(data, module, condition.lower())) return entities @@ -200,18 +198,26 @@ class NetatmoSensor(Entity): def __init__(self, netatmo_data, module_info, sensor_type): """Initialize the sensor.""" self.netatmo_data = netatmo_data - module = self.netatmo_data.station_data.moduleById(mid=module_info["id"]) - if module["type"] == "NHC": + + device = self.netatmo_data.station_data.moduleById(mid=module_info["id"]) + if not device: + # Assume it's a station if module can't be found + device = self.netatmo_data.station_data.stationById(sid=module_info["id"]) + + if device["type"] == "NHC": self.module_name = module_info["station_name"] else: - self.module_name = module_info["module_name"] + self.module_name = ( + f"{module_info['station_name']} {module_info['module_name']}" + ) + self._name = f"{DOMAIN} {self.module_name} {SENSOR_TYPES[sensor_type][0]}" self.type = sensor_type self._state = None self._device_class = SENSOR_TYPES[self.type][3] self._icon = SENSOR_TYPES[self.type][2] self._unit_of_measurement = SENSOR_TYPES[self.type][1] - self._module_type = module["type"] + self._module_type = device["type"] self._module_id = module_info["id"] self._unique_id = f"{self._module_id}-{self.type}" diff --git a/homeassistant/components/plex/__init__.py b/homeassistant/components/plex/__init__.py index 4a575722826..386be56340a 100644 --- a/homeassistant/components/plex/__init__.py +++ b/homeassistant/components/plex/__init__.py @@ -16,6 +16,7 @@ from homeassistant.const import ( CONF_TOKEN, CONF_URL, CONF_VERIFY_SSL, + EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, ) from homeassistant.helpers import config_validation as cv @@ -164,12 +165,16 @@ async def async_setup_entry(hass, entry): websocket = PlexWebsocket( plex_server.plex_server, update_plex, session=session, verify_ssl=verify_ssl ) - hass.loop.create_task(websocket.listen()) hass.data[PLEX_DOMAIN][WEBSOCKETS][server_id] = websocket + async def async_start_websocket_session(_): + await websocket.listen() + def close_websocket_session(_): websocket.close() + hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, async_start_websocket_session) + unsub = hass.bus.async_listen_once( EVENT_HOMEASSISTANT_STOP, close_websocket_session ) diff --git a/homeassistant/components/plex/media_player.py b/homeassistant/components/plex/media_player.py index d6720fd9e95..ad5fb2f73f1 100644 --- a/homeassistant/components/plex/media_player.py +++ b/homeassistant/components/plex/media_player.py @@ -68,6 +68,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): hass, PLEX_NEW_MP_SIGNAL.format(server_id), async_new_media_players ) hass.data[PLEX_DOMAIN][DISPATCHERS][server_id].append(unsub) + _LOGGER.debug("New entity listener created") @callback diff --git a/homeassistant/const.py b/homeassistant/const.py index ef16de573a0..3520260481b 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1,7 +1,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 102 -PATCH_VERSION = "0" +PATCH_VERSION = "1" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 6, 1) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index a98bb2b46d7..1c4aaa1191f 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -11,7 +11,7 @@ contextvars==2.4;python_version<"3.7" cryptography==2.8 distro==1.4.0 hass-nabucasa==0.29 -home-assistant-frontend==20191119.2 +home-assistant-frontend==20191119.5 importlib-metadata==0.23 jinja2>=2.10.3 netdisco==2.6.0 diff --git a/requirements_all.txt b/requirements_all.txt index 833a4d47105..651c089a4fd 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -655,7 +655,7 @@ hole==0.5.0 holidays==0.9.11 # homeassistant.components.frontend -home-assistant-frontend==20191119.2 +home-assistant-frontend==20191119.5 # homeassistant.components.zwave homeassistant-pyozw==0.1.4 @@ -1105,7 +1105,7 @@ pyalmond==0.0.2 pyarlo==0.2.3 # homeassistant.components.netatmo -pyatmo==3.0.1 +pyatmo==3.1.0 # homeassistant.components.atome pyatome==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 75564e13b94..8fc004f3363 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -222,7 +222,7 @@ hole==0.5.0 holidays==0.9.11 # homeassistant.components.frontend -home-assistant-frontend==20191119.2 +home-assistant-frontend==20191119.5 # homeassistant.components.zwave homeassistant-pyozw==0.1.4