From faf73e304a26f164e294bedd0a91136a68261690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Oldag?= Date: Sun, 1 Nov 2020 15:23:42 +0100 Subject: [PATCH 01/10] Bump pwmled to v1.6.6 (#42607) --- homeassistant/components/rpi_gpio_pwm/manifest.json | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/rpi_gpio_pwm/manifest.json b/homeassistant/components/rpi_gpio_pwm/manifest.json index cde9f24843f..2467673e950 100644 --- a/homeassistant/components/rpi_gpio_pwm/manifest.json +++ b/homeassistant/components/rpi_gpio_pwm/manifest.json @@ -2,6 +2,6 @@ "domain": "rpi_gpio_pwm", "name": "pigpio Daemon PWM LED", "documentation": "https://www.home-assistant.io/integrations/rpi_gpio_pwm", - "requirements": ["pwmled==1.5.3"], + "requirements": ["pwmled==1.6.6"], "codeowners": [] } diff --git a/requirements_all.txt b/requirements_all.txt index 8d0a2be17d5..4418da89d70 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1182,7 +1182,7 @@ pushbullet.py==0.11.0 pushover_complete==1.1.1 # homeassistant.components.rpi_gpio_pwm -pwmled==1.5.3 +pwmled==1.6.6 # homeassistant.components.august py-august==0.25.0 From 6d54ed14b4b736830b492e5777bc24cbed787dd4 Mon Sep 17 00:00:00 2001 From: airthusiast <67556031+airthusiast@users.noreply.github.com> Date: Fri, 30 Oct 2020 18:50:59 +0100 Subject: [PATCH 02/10] Fix Fibaro HC2 climate device missing temperature (#42627) --- homeassistant/components/fibaro/climate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/fibaro/climate.py b/homeassistant/components/fibaro/climate.py index 6a7a6f145d8..58fde1e370b 100644 --- a/homeassistant/components/fibaro/climate.py +++ b/homeassistant/components/fibaro/climate.py @@ -321,7 +321,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity): """Return the current temperature.""" if self._temp_sensor_device: device = self._temp_sensor_device.fibaro_device - if device.properties.heatingThermostatSetpoint: + if "heatingThermostatSetpoint" in device.properties: return float(device.properties.heatingThermostatSetpoint) return float(device.properties.value) return None @@ -331,7 +331,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity): """Return the temperature we try to reach.""" if self._target_temp_device: device = self._target_temp_device.fibaro_device - if device.properties.heatingThermostatSetpointFuture: + if "heatingThermostatSetpointFuture" in device.properties: return float(device.properties.heatingThermostatSetpointFuture) return float(device.properties.targetLevel) return None From 2430c5ea22a4b203fed8b3b8e07287fdcdabe2c6 Mon Sep 17 00:00:00 2001 From: Malte Franken Date: Fri, 30 Oct 2020 22:23:07 +1100 Subject: [PATCH 03/10] Fix geo_rss_events import statement (#42629) * bump integration library version * fix import statement --- homeassistant/components/geo_rss_events/manifest.json | 2 +- homeassistant/components/geo_rss_events/sensor.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/geo_rss_events/manifest.json b/homeassistant/components/geo_rss_events/manifest.json index 77d38d58ad7..4a434aed8d7 100644 --- a/homeassistant/components/geo_rss_events/manifest.json +++ b/homeassistant/components/geo_rss_events/manifest.json @@ -2,6 +2,6 @@ "domain": "geo_rss_events", "name": "GeoRSS", "documentation": "https://www.home-assistant.io/integrations/geo_rss_events", - "requirements": ["georss_generic_client==0.3"], + "requirements": ["georss_generic_client==0.4"], "codeowners": ["@exxamalte"] } diff --git a/homeassistant/components/geo_rss_events/sensor.py b/homeassistant/components/geo_rss_events/sensor.py index 5a11136fd43..c75234f5f2b 100644 --- a/homeassistant/components/geo_rss_events/sensor.py +++ b/homeassistant/components/geo_rss_events/sensor.py @@ -9,7 +9,7 @@ from datetime import timedelta import logging from georss_client import UPDATE_OK, UPDATE_OK_NO_DATA -from georss_client.generic_feed import GenericFeed +from georss_generic_client import GenericFeed import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA diff --git a/requirements_all.txt b/requirements_all.txt index 4418da89d70..b93fd488492 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -638,7 +638,7 @@ geojson_client==0.4 geopy==1.21.0 # homeassistant.components.geo_rss_events -georss_generic_client==0.3 +georss_generic_client==0.4 # homeassistant.components.ign_sismologia georss_ign_sismologia_client==0.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f3e61a25d4d..482025a58eb 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -315,7 +315,7 @@ geojson_client==0.4 geopy==1.21.0 # homeassistant.components.geo_rss_events -georss_generic_client==0.3 +georss_generic_client==0.4 # homeassistant.components.ign_sismologia georss_ign_sismologia_client==0.2 From 92f9a77770fab371118f6af30f4004f65d6362e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 30 Oct 2020 15:20:42 +0100 Subject: [PATCH 04/10] Bump pycfdns to 1.2.1 (#42634) --- homeassistant/components/cloudflare/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/cloudflare/manifest.json b/homeassistant/components/cloudflare/manifest.json index cab768953b1..e2f55b13a7f 100644 --- a/homeassistant/components/cloudflare/manifest.json +++ b/homeassistant/components/cloudflare/manifest.json @@ -2,7 +2,7 @@ "domain": "cloudflare", "name": "Cloudflare", "documentation": "https://www.home-assistant.io/integrations/cloudflare", - "requirements": ["pycfdns==1.1.1"], + "requirements": ["pycfdns==1.2.1"], "codeowners": ["@ludeeus", "@ctalkington"], "config_flow": true } diff --git a/requirements_all.txt b/requirements_all.txt index b93fd488492..3484a7a3857 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1288,7 +1288,7 @@ pybotvac==0.0.17 pycarwings2==2.9 # homeassistant.components.cloudflare -pycfdns==1.1.1 +pycfdns==1.2.1 # homeassistant.components.channels pychannels==1.0.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 482025a58eb..b48e0665681 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -636,7 +636,7 @@ pyblackbird==0.5 pybotvac==0.0.17 # homeassistant.components.cloudflare -pycfdns==1.1.1 +pycfdns==1.2.1 # homeassistant.components.cast pychromecast==7.5.1 From 5f28c82837b273f0d6dd174e31f8de5e4ba404a4 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 30 Oct 2020 19:04:11 +0100 Subject: [PATCH 05/10] Make sure Tasmota status sensors are disabled (#42643) --- homeassistant/components/tasmota/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tasmota/sensor.py b/homeassistant/components/tasmota/sensor.py index 076ca457a23..bdaac51f09c 100644 --- a/homeassistant/components/tasmota/sensor.py +++ b/homeassistant/components/tasmota/sensor.py @@ -1,6 +1,7 @@ """Support for Tasmota sensors.""" from typing import Optional +from hatasmota import status_sensor from hatasmota.const import ( SENSOR_AMBIENT, SENSOR_APPARENT_POWERUSAGE, @@ -162,7 +163,7 @@ class TasmotaSensor(TasmotaAvailability, TasmotaDiscoveryUpdate, Entity): def entity_registry_enabled_default(self) -> bool: """Return if the entity should be enabled when first added to the entity registry.""" # Hide status sensors to not overwhelm users - if self._tasmota_entity.quantity == SENSOR_STATUS_SIGNAL: + if self._tasmota_entity.quantity in status_sensor.SENSORS: return False return True From 562ccbbe251f5ece061eab80ff9979c1dbc792be Mon Sep 17 00:00:00 2001 From: Jason Hunter Date: Sat, 31 Oct 2020 09:15:11 -0400 Subject: [PATCH 06/10] attempt to renew subscription immediately to stop endless loop if it fails after setup (#42651) --- homeassistant/components/onvif/event.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/onvif/event.py b/homeassistant/components/onvif/event.py index eb61cbb4b71..eaf23236042 100644 --- a/homeassistant/components/onvif/event.py +++ b/homeassistant/components/onvif/event.py @@ -74,6 +74,14 @@ class EventManager: async def async_start(self) -> bool: """Start polling events.""" if await self.device.create_pullpoint_subscription(): + # Create subscription manager + self._subscription = self.device.create_subscription_service( + "PullPointSubscription" + ) + + # Renew immediately + await self.async_renew() + # Initialize events pullpoint = self.device.create_pullpoint_service() try: @@ -87,11 +95,6 @@ class EventManager: # Parse event initialization await self.async_parse_messages(response.NotificationMessage) - # Create subscription manager - self._subscription = self.device.create_subscription_service( - "PullPointSubscription" - ) - self.started = True return True From a93ae418a2d86dca3db5ebaf63592b9a4294364d Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Sun, 1 Nov 2020 11:05:55 -0500 Subject: [PATCH 07/10] Bump up ZHA dependencies (#42679) * Bump up ZHA dependencies * Fix tests because of zigpy request signature change --- homeassistant/components/zha/core/gateway.py | 2 +- homeassistant/components/zha/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/zha/test_cover.py | 37 ++++++++++---------- tests/components/zha/test_discover.py | 1 + tests/components/zha/test_light.py | 13 ++++--- tests/components/zha/test_switch.py | 4 +-- 8 files changed, 33 insertions(+), 30 deletions(-) diff --git a/homeassistant/components/zha/core/gateway.py b/homeassistant/components/zha/core/gateway.py index bb57d7f03f4..bdfcf1b24f2 100644 --- a/homeassistant/components/zha/core/gateway.py +++ b/homeassistant/components/zha/core/gateway.py @@ -637,7 +637,7 @@ class ZHAGateway: _LOGGER.debug("Shutting down ZHA ControllerApplication") for unsubscribe in self._unsubs: unsubscribe() - await self.application_controller.shutdown() + await self.application_controller.pre_shutdown() @callback diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index 01c24bdc6f6..be8619811d8 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -9,7 +9,7 @@ "zha-quirks==0.0.45", "zigpy-cc==0.5.2", "zigpy-deconz==0.11.0", - "zigpy==0.26.0", + "zigpy==0.27.0", "zigpy-xbee==0.13.0", "zigpy-zigate==0.6.2", "zigpy-znp==0.2.2" diff --git a/requirements_all.txt b/requirements_all.txt index 3484a7a3857..93942625b63 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2355,7 +2355,7 @@ zigpy-zigate==0.6.2 zigpy-znp==0.2.2 # homeassistant.components.zha -zigpy==0.26.0 +zigpy==0.27.0 # homeassistant.components.zoneminder zm-py==0.4.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b48e0665681..425838fe4e3 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1124,4 +1124,4 @@ zigpy-zigate==0.6.2 zigpy-znp==0.2.2 # homeassistant.components.zha -zigpy==0.26.0 +zigpy==0.27.0 diff --git a/tests/components/zha/test_cover.py b/tests/components/zha/test_cover.py index b295543b3e8..783637d26d7 100644 --- a/tests/components/zha/test_cover.py +++ b/tests/components/zha/test_cover.py @@ -32,7 +32,7 @@ from .common import ( send_attributes_report, ) -from tests.async_mock import AsyncMock, MagicMock, call, patch +from tests.async_mock import AsyncMock, MagicMock, patch from tests.common import async_capture_events, mock_coro, mock_restore_cache @@ -144,9 +144,10 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): DOMAIN, SERVICE_CLOSE_COVER, {"entity_id": entity_id}, blocking=True ) assert cluster.request.call_count == 1 - assert cluster.request.call_args == call( - False, 0x1, (), expect_reply=True, manufacturer=None, tsn=None - ) + assert cluster.request.call_args[0][0] is False + assert cluster.request.call_args[0][1] == 0x01 + assert cluster.request.call_args[0][2] == () + assert cluster.request.call_args[1]["expect_reply"] is True # open from UI with patch( @@ -156,9 +157,10 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): DOMAIN, SERVICE_OPEN_COVER, {"entity_id": entity_id}, blocking=True ) assert cluster.request.call_count == 1 - assert cluster.request.call_args == call( - False, 0x0, (), expect_reply=True, manufacturer=None, tsn=None - ) + assert cluster.request.call_args[0][0] is False + assert cluster.request.call_args[0][1] == 0x00 + assert cluster.request.call_args[0][2] == () + assert cluster.request.call_args[1]["expect_reply"] is True # set position UI with patch( @@ -171,15 +173,11 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): blocking=True, ) assert cluster.request.call_count == 1 - assert cluster.request.call_args == call( - False, - 0x5, - (zigpy.types.uint8_t,), - 53, - expect_reply=True, - manufacturer=None, - tsn=None, - ) + assert cluster.request.call_args[0][0] is False + assert cluster.request.call_args[0][1] == 0x05 + assert cluster.request.call_args[0][2] == (zigpy.types.uint8_t,) + assert cluster.request.call_args[0][3] == 53 + assert cluster.request.call_args[1]["expect_reply"] is True # stop from UI with patch( @@ -189,9 +187,10 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): DOMAIN, SERVICE_STOP_COVER, {"entity_id": entity_id}, blocking=True ) assert cluster.request.call_count == 1 - assert cluster.request.call_args == call( - False, 0x2, (), expect_reply=True, manufacturer=None, tsn=None - ) + assert cluster.request.call_args[0][0] is False + assert cluster.request.call_args[0][1] == 0x02 + assert cluster.request.call_args[0][2] == () + assert cluster.request.call_args[1]["expect_reply"] is True # test rejoin await async_test_rejoin(hass, zigpy_cover_device, [cluster], (1,)) diff --git a/tests/components/zha/test_discover.py b/tests/components/zha/test_discover.py index 5589a7d94ac..b5da98dc01f 100644 --- a/tests/components/zha/test_discover.py +++ b/tests/components/zha/test_discover.py @@ -113,6 +113,7 @@ async def test_devices( 0, expect_reply=True, manufacturer=None, + tries=1, tsn=None, ) diff --git a/tests/components/zha/test_light.py b/tests/components/zha/test_light.py index 642504384cc..ea1b8487b7c 100644 --- a/tests/components/zha/test_light.py +++ b/tests/components/zha/test_light.py @@ -323,7 +323,7 @@ async def async_test_on_off_from_hass(hass, cluster, entity_id): assert cluster.request.call_count == 1 assert cluster.request.await_count == 1 assert cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None, tsn=None + False, ON, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) await async_test_off_from_hass(hass, cluster, entity_id) @@ -340,7 +340,7 @@ async def async_test_off_from_hass(hass, cluster, entity_id): assert cluster.request.call_count == 1 assert cluster.request.await_count == 1 assert cluster.request.call_args == call( - False, OFF, (), expect_reply=True, manufacturer=None, tsn=None + False, OFF, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) @@ -360,7 +360,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 0 assert level_cluster.request.await_count == 0 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None, tsn=None + False, ON, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) on_off_cluster.request.reset_mock() level_cluster.request.reset_mock() @@ -373,7 +373,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 1 assert level_cluster.request.await_count == 1 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None, tsn=None + False, ON, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) assert level_cluster.request.call_args == call( False, @@ -383,6 +383,7 @@ async def async_test_level_on_off_from_hass( 100.0, expect_reply=True, manufacturer=None, + tries=1, tsn=None, ) on_off_cluster.request.reset_mock() @@ -396,7 +397,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 1 assert level_cluster.request.await_count == 1 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None, tsn=None + False, ON, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) assert level_cluster.request.call_args == call( False, @@ -406,6 +407,7 @@ async def async_test_level_on_off_from_hass( 1, expect_reply=True, manufacturer=None, + tries=1, tsn=None, ) on_off_cluster.request.reset_mock() @@ -445,6 +447,7 @@ async def async_test_flash_from_hass(hass, cluster, entity_id, flash): 0, expect_reply=True, manufacturer=None, + tries=1, tsn=None, ) diff --git a/tests/components/zha/test_switch.py b/tests/components/zha/test_switch.py index aab8dafef4f..80412d95fb7 100644 --- a/tests/components/zha/test_switch.py +++ b/tests/components/zha/test_switch.py @@ -136,7 +136,7 @@ async def test_switch(hass, zha_device_joined_restored, zigpy_device): ) assert len(cluster.request.mock_calls) == 1 assert cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None, tsn=None + False, ON, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) # turn off from HA @@ -150,7 +150,7 @@ async def test_switch(hass, zha_device_joined_restored, zigpy_device): ) assert len(cluster.request.mock_calls) == 1 assert cluster.request.call_args == call( - False, OFF, (), expect_reply=True, manufacturer=None, tsn=None + False, OFF, (), expect_reply=True, manufacturer=None, tries=1, tsn=None ) # test joining a new switch to the network and HA From 769c5c1779071b9502ff52a63f924d2ea0ced88a Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Sat, 31 Oct 2020 16:05:59 -0500 Subject: [PATCH 08/10] Fix canary camera entity inheritance (#42691) --- homeassistant/components/canary/camera.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/canary/camera.py b/homeassistant/components/canary/camera.py index 608dfe02b8a..a90eb5a2825 100644 --- a/homeassistant/components/canary/camera.py +++ b/homeassistant/components/canary/camera.py @@ -78,6 +78,7 @@ class CanaryCamera(CoordinatorEntity, Camera): def __init__(self, hass, coordinator, location_id, device, timeout, ffmpeg_args): """Initialize a Canary security camera.""" super().__init__(coordinator) + Camera.__init__(self) self._ffmpeg = hass.data[DATA_FFMPEG] self._ffmpeg_arguments = ffmpeg_args self._location_id = location_id From 43a990350b8413762ccc34e62c19ee19540fe8dd Mon Sep 17 00:00:00 2001 From: Matthew Donoughe Date: Sun, 1 Nov 2020 12:25:34 -0500 Subject: [PATCH 09/10] Use pylutron_caseta 0.7.1 (#42701) --- homeassistant/components/lutron_caseta/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/lutron_caseta/manifest.json b/homeassistant/components/lutron_caseta/manifest.json index f80e34a6b5c..366c9cb7f14 100644 --- a/homeassistant/components/lutron_caseta/manifest.json +++ b/homeassistant/components/lutron_caseta/manifest.json @@ -3,7 +3,7 @@ "name": "Lutron Caséta", "documentation": "https://www.home-assistant.io/integrations/lutron_caseta", "requirements": [ - "pylutron-caseta==0.7.0" + "pylutron-caseta==0.7.1" ], "codeowners": [ "@swails" diff --git a/requirements_all.txt b/requirements_all.txt index 93942625b63..0113e7e81bf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1487,7 +1487,7 @@ pylitejet==0.1 pyloopenergy==0.2.1 # homeassistant.components.lutron_caseta -pylutron-caseta==0.7.0 +pylutron-caseta==0.7.1 # homeassistant.components.lutron pylutron==0.2.5 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 425838fe4e3..81c138dbda2 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -730,7 +730,7 @@ pylibrespot-java==0.1.0 pylitejet==0.1 # homeassistant.components.lutron_caseta -pylutron-caseta==0.7.0 +pylutron-caseta==0.7.1 # homeassistant.components.mailgun pymailgunner==1.4 From aecc3476e84fcdd87675c381c9eea01247f2a338 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 1 Nov 2020 20:00:21 +0000 Subject: [PATCH 10/10] Bumped version to 0.117.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 95ce48ca88f..44c3669db9e 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1,7 +1,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 117 -PATCH_VERSION = "1" +PATCH_VERSION = "2" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 7, 1)