Skip to content
Merged

0.117.2 #42724

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/components/canary/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cloudflare/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions homeassistant/components/fibaro/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def current_temperature(self):
"""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
Expand All @@ -331,7 +331,7 @@ def target_temperature(self):
"""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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/geo_rss_events/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/geo_rss_events/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lutron_caseta/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 8 additions & 5 deletions homeassistant/components/onvif/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ def async_remove_listener(self, update_callback: CALLBACK_TYPE) -> None:
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:
Expand All @@ -87,11 +95,6 @@ async def async_start(self) -> bool:
# 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

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rpi_gpio_pwm/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
3 changes: 2 additions & 1 deletion homeassistant/components/tasmota/sensor.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -162,7 +163,7 @@ def device_class(self) -> Optional[str]:
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

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/zha/core/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ async def shutdown(self):
_LOGGER.debug("Shutting down ZHA ControllerApplication")
for unsubscribe in self._unsubs:
unsubscribe()
await self.application_controller.shutdown()
await self.application_controller.pre_shutdown()


@callback
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/zha/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 5 additions & 5 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
37 changes: 18 additions & 19 deletions tests/components/zha/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
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


Expand Down Expand Up @@ -144,9 +144,10 @@ async def get_chan_attr(*args, **kwargs):
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(
Expand All @@ -156,9 +157,10 @@ async def get_chan_attr(*args, **kwargs):
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(
Expand All @@ -171,15 +173,11 @@ async def get_chan_attr(*args, **kwargs):
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(
Expand All @@ -189,9 +187,10 @@ async def get_chan_attr(*args, **kwargs):
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,))
Expand Down
1 change: 1 addition & 0 deletions tests/components/zha/test_discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ async def test_devices(
0,
expect_reply=True,
manufacturer=None,
tries=1,
tsn=None,
)

Expand Down
13 changes: 8 additions & 5 deletions tests/components/zha/test_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
)


Expand All @@ -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()
Expand All @@ -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,
Expand All @@ -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()
Expand All @@ -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,
Expand All @@ -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()
Expand Down Expand Up @@ -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,
)

Expand Down
4 changes: 2 additions & 2 deletions tests/components/zha/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down