8000 2021.12.9 by balloob · Pull Request #63867 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

2021.12.9 #63867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4d8cf8f
Bump pychromecast to 10.2.3 (#63429)
emontnemery Jan 5, 2022
5f3e89d
Bump flux_led to 0.27.40 to fix SK6812RGBW white level reporting (#63…
bdraco Jan 5, 2022
178b63f
Fix incorrect access to entity registry in Xiaomi Miio (#63446)
frenck Jan 5, 2022
2d7defb
Pickup screenlogic codeowner (#61477)
bdraco Dec 11, 2021
4318bec
Bump screenlogicpy (#63533)
dieselrabbit Jan 6, 2022
4ad77a7
Bump soco to 0.25.3 (#63548)
jjlawren Jan 6, 2022
f487f2e
Fix KeyError during call to homekit.unpair (#63627)
bdraco Jan 7, 2022
2036286
Ensure selected entity is pre-selected in homekit options flow (#63628)
bdraco Jan 8, 2022
1923f86
Bump flux_led to 0.27.41 (#63638)
bdraco Jan 7, 2022
b4391fd
Add default mode 'auto' for tradfri starkvind air purifier on turn on…
leahoswald Jan 8, 2022
79d789c
Bump flux_led to 0.27.42 (#63651)
bdraco Jan 8, 2022
ea5b18c
Split august motion and image capture binary sensors (#62154)
bdraco Dec 19, 2021
028169c
Bump yalexs to 1.1.16 (#62700)
bdraco Dec 23, 2021
0828eb5
Fix august locks failing to lock/unlock (#63652)
bdraco Jan 10, 2022
70d21bf
Switchbot Set initial state for switch (#63654)
RenierM26 Jan 8, 2022
1444a3c
8000 Fix Tuya climate c_f DP not being a string (#63680)
frenck Jan 10, 2022
50d6905
Fix Netgear used method version (#63686)
starkillerOG Jan 9, 2022
3e02fff
Bump flux_led to 0.27.44 to fix CCT ceiling lights (#63712)
bdraco Jan 9, 2022
c725793
Bump PySwitchbot to 0.13.2 (#63713)
RenierM26 Jan 10, 2022
e2c7c7f
Bump WazeRouteCalculator to 0.14 (#63718)
k-korn Jan 9, 2022
4a3d1bc
Fix zwave_js device actions (#63769)
raman325 Jan 10, 2022
e0ba71e
Add client metadata to cloud register (#63794)
ludeeus Jan 10, 2022
50bd5d6
Support Tuya strip lights with correct values for saturation and brig…
Knodd Jan 10, 2022
f6d21a0
Bump flux_led to 0.27.45 to fix missing controls on ZJ21410 models (#…
bdraco Jan 10, 2022
ab4aa5d
Bump aioharmony to 0.2.9 (#63858)
bdraco Jan 10, 2022
a4f717c
Bump frontend to 20211229.1 (#63866)
balloob Jan 11, 2022
25b07b0
Bumped version to 2021.12.9
balloob Jan 11, 2022
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
8000
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ homeassistant/components/samsungtv/* @escoand @chemelli74
homeassistant/components/scene/* @home-assistant/core
homeassistant/components/schluter/* @prairieapps
homeassistant/components/scrape/* @fabaff
homeassistant/components/screenlogic/* @dieselrabbit
homeassistant/components/screenlogic/* @dieselrabbit @bdraco
homeassistant/components/script/* @home-assistant/core
homeassistant/components/search/* @home-assistant/core
homeassistant/components/select/* @home-assistant/core
Expand Down
18 changes: 18 additions & 0 deletions homeassistant/components/august/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ async def async_lock(self, device_id):
device_id,
)

async def async_lock_async(self, device_id):
"""Lock the device but do not wait for a response since it will come via pubnub."""
return await self._async_call_api_op_requires_bridge(
device_id,
self._api.async_lock_async,
self._august_gateway.access_token,
device_id,
)

async def async_unlock(self, device_id):
"""Unlock the device."""
return await self._async_call_api_op_requires_bridge(
Expand All @@ -254,6 +263,15 @@ async def async_unlock(self, device_id):
device_id,
)

async def async_unlock_async(self, device_id):
"""Unlock the device but do not wait for a response since it will come via pubnub."""
return await self._async_call_api_op_requires_bridge(
device_id,
self._api.async_unlock_async,
self._august_gateway.access_token,
device_id,
)

async def _async_call_api_op_requires_bridge(
self, device_id, func, *args, **kwargs
):
Expand Down
18 changes: 18 additions & 0 deletions homeassistant/components/august/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ def _retrieve_motion_state(data: AugustData, detail: DoorbellDetail) -> bool:
return _activity_time_based_state(latest)


def _retrieve_image_capture_state(data: AugustData, detail: DoorbellDetail) -> bool:
latest = data.activity_stream.get_latest_device_activity(
detail.device_id, {ActivityType.DOORBELL_IMAGE_CAPTURE}
)

if latest is None:
return False

return _activity_time_based_state(latest)


def _retrieve_ding_state(data: AugustData, detail: DoorbellDetail) -> bool:
latest = data.activity_stream.get_latest_device_activity(
detail.device_id, {ActivityType.DOORBELL_DING}
Expand Down Expand Up @@ -126,6 +137,13 @@ class AugustBinarySensorEntityDescription(
value_fn=_retrieve_motion_state,
is_time_based=True,
),
AugustBinarySensorEntityDescription(
key="doorbell_image_capture",
name="Image Capture",
icon="mdi:file-image",
value_fn=_retrieve_image_capture_state,
is_time_based=True,
),
AugustBinarySensorEntityDescription(
key="doorbell_online",
name="Online",
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/august/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def model(self):
def _update_from_data(self):
"""Get the latest state of the sensor."""
doorbell_activity = self._data.activity_stream.get_latest_device_activity(
self._device_id, {ActivityType.DOORBELL_MOTION}
self._device_id,
{ActivityType.DOORBELL_MOTION, ActivityType.DOORBELL_IMAGE_CAPTURE},
)

if doorbell_activity is not None:
Expand Down
6 changes: 6 additions & 0 deletions homeassistant/components/august/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ def __init__(self, data, device):

async def async_lock(self, **kwargs):
"""Lock the device."""
if self._data.activity_stream.pubnub.connected:
await self._data.async_lock_async(self._device_id)
return
await self._call_lock_operation(self._data.async_lock)

async def async_unlock(self, **kwargs):
"""Unlock the device."""
if self._data.activity_stream.pubnub.connected:
await self._data.async_unlock_async(self._device_id)
return
await self._call_lock_operation(self._data.async_unlock)

async def _call_lock_operation(self, lock_operation):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/august/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "august",
"name": "August",
"documentation": "https://www.home-assistant.io/integrations/august",
"requirements": ["yalexs==1.1.13"],
"requirements": ["yalexs==1.1.17"],
"codeowners": ["@bdraco"],
"dhcp": [
{
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Google Cast",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/cast",
"requirements": ["pychromecast==10.2.2"],
"requirements": ["pychromecast==10.2.3"],
"after_dependencies": [
"cloud",
"http",
Expand Down
18 changes: 17 additions & 1 deletion homeassistant/components/cloud/http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.http.data_validator import RequestDataValidator
from homeassistant.components.websocket_api import const as ws_const
from homeassistant.util.location import async_detect_location_info

from .const import (
DOMAIN,
Expand Down Expand Up @@ -220,8 +221,23 @@ async def post(self, request, data):
hass = request.app["hass"]
cloud = hass.data[DOMAIN]

client_metadata = None

if location_info := await async_detect_location_info(
hass.helpers.aiohttp_client.async_get_clientsession()
):
client_metadata = {
"NC_COUNTRY_CODE": location_info.country_code,
"NC_REGION_CODE": location_info.region_code,
"NC_ZIP_CODE": location_info.zip_code,
}

async with async_timeout.timeout(REQUEST_TIMEOUT):
await cloud.auth.async_register(data["email"], data["password"])
await cloud.auth.async_register(
data["email"],
data["password"],
client_metadata=client_metadata,
)

return self.json_message("ok")

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cloud/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "cloud",
"name": "Home Assistant Cloud",
"documentation": "https://www.home-assistant.io/integrations/cloud",
"requirements": ["hass-nabucasa==0.50.0"],
"requirements": ["hass-nabucasa==0.51.0"],
"dependencies": ["http", "webhook"],
"after_dependencies": ["google_assistant", "alexa"],
"codeowners": ["@home-assistant/cloud"],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/flux_led/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Flux LED/MagicHome",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/flux_led",
"requirements": ["flux_led==0.27.32"],
"requirements": ["flux_led==0.27.45"],
"quality_scale": "platinum",
"codeowners": ["@icemanch"],
"iot_class": "local_push",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/manifest.json
B93C
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Home Assistant Frontend",
"documentation": "https://www.home-assistant.io/integrations/frontend",
"requirements": [
"home-assistant-frontend==20211229.0"
"home-assistant-frontend==20211229.1"
],
"dependencies": [
"api",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/harmony/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "harmony",
"name": "Logitech Harmony Hub",
"documentation": "https://www.home-assistant.io/integrations/harmony",
"requirements": ["aioharmony==0.2.8"],
"requirements": ["aioharmony==0.2.9"],
"codeowners": [
"@ehendrix23",
"@bramkragten",
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/homekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,12 @@ def async_unpair(self):
"""Remove all pairings for an accessory so it can be repaired."""
state = self.driver.state
for client_uuid in list(state.paired_clients):
state.remove_paired_client(client_uuid)
# We need to check again since removing a single client
# can result in removing all the clients that the client
# granted access to if it was an admin, otherwise
# remove_paired_client can generate a KeyError
if client_uuid in state.paired_clients:
state.remove_paired_client(client_uuid)
self.driver.async_persist()
self.driver.async_update_advertisement()
self._async_show_setup_message()
Expand Down
25 changes: 16 additions & 9 deletions homeassistant/components/homekit/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,15 +446,25 @@ async def async_step_include_exclude(self, user_input=None):
return await self.async_step_advanced()

entity_filter = self.hk_options.get(CONF_FILTER, {})
entities = entity_filter.get(CONF_INCLUDE_ENTITIES, [])

all_supported_entities = _async_get_matching_entities(
self.hass,
domains=self.hk_options[CONF_DOMAINS],
)

data_schema = {}
entity_schema = vol.In
entities = entity_filter.get(CONF_INCLUDE_ENTITIES, [])
if self.hk_options[CONF_HOMEKIT_MODE] != HOMEKIT_MODE_ACCESSORY:
# Strip out entities that no longer exist to prevent error in the UI
valid_entities = [
entity_id for entity_id in entities if entity_id in all_supported_entities
]
if self.hk_options[CONF_HOMEKIT_MODE] == HOMEKIT_MODE_ACCESSORY:
# In accessory mode we can only have one
default_value = valid_entities[0] if valid_entities else None
entity_schema = vol.In
entities_schema_required = vol.Required
else:
# Bridge mode
entities_schema_required = vol.Optional
include_exclude_mode = MODE_INCLUDE
if not entities:
include_exclude_mode = MODE_EXCLUDE
Expand All @@ -463,13 +473,10 @@ async def async_step_include_exclude(self, user_input=None):
vol.Required(CONF_INCLUDE_EXCLUDE_MODE, default=include_exclude_mode)
] = vol.In(INCLUDE_EXCLUDE_MODES)
entity_schema = cv.multi_select
default_value = valid_entities

# Strip out entities that no longer exist to prevent error in the UI
valid_entities = [
entity_id for entity_id in entities if entity_id in all_supported_entities
]
data_schema[
vol.Optional(CONF_ENTITIES, default=valid_entities)
entities_schema_required(CONF_ENTITIES, default=default_value)
] = entity_schema(all_supported_entities)

return self.async_show_form(
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/netgear/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
DEFAULT_CONSIDER_HOME,
DEFAULT_NAME,
DOMAIN,
MODELS_V2,
ORBI_PORT,
MODELS_PORT_80,
PORT_80,
)
from .errors import CannotLoginException
from .router import get_api
Expand Down Expand Up @@ -141,13 +141,13 @@ async def async_step_ssdp(self, discovery_info: ssdp.SsdpServiceInfo) -> FlowRes
self._abort_if_unique_id_configured(updates=updated_data)

updated_data[CONF_PORT] = DEFAULT_PORT
for model in MODELS_V2:
for model in MODELS_PORT_80:
if discovery_info.upnp.get(ssdp.ATTR_UPNP_MODEL_NUMBER, "").startswith(
model
) or discovery_info.upnp.get(ssdp.ATTR_UPNP_MODEL_NAME, "").startswith(
model
):
updated_data[CONF_PORT] = ORBI_PORT
updated_data[CONF_PORT] = PORT_80

self.placeholders.update(updated_data)
self.discovered = True
Expand Down
22 changes: 20 additions & 2 deletions homeassistant/components/netgear/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@
DEFAULT_CONSIDER_HOME = timedelta(seconds=180)
DEFAULT_NAME = "Netgear router"

# models using port 80 instead of 5000
MODELS_PORT_80 = [
"Orbi",
"RBK",
"RBR",
"RBS",
"RBW",
"LBK",
"LBR",
"CBK",
"CBR",
"SRC",
"SRK",
"SRR",
"SRS",
"SXK",
"SXR",
"SXS",
]
PORT_80 = 80
# update method V2 models
MODELS_V2 = [
"Orbi",
Expand All @@ -23,13 +43,11 @@
"CBR",
"SRC",
"SRK",
"SRR",
"SRS",
"SXK",
"SXR",
"SXS",
]
ORBI_PORT = 80

# Icons
DEVICE_ICONS = {
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/components/netgear/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ def _setup(self) -> None:
if self.model.startswith(model):
self.method_version = 2

if self.method_version == 2:
if not self._api.get_attached_devices_2():
_LOGGER.error(
"Netgear Model '%s' in MODELS_V2 list, but failed to get attached devices using V2",
self.model,
)
self.method_version = 1

async def async_setup(self) -> None:
"""Set up a Netgear router."""
await self.hass.async_add_executor_job(self._setup)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/screenlogic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "Pentair ScreenLogic",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/screenlogic",
"requirements": ["screenlogicpy==0.5.3"],
"codeowners": ["@dieselrabbit"],
"requirements": ["screenlogicpy==0.5.4"],
"codeowners": ["@dieselrabbit", "@bdraco"],
"dhcp": [
{
"hostname": "pentair: *",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sonos/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Sonos",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/sonos",
"requirements": ["soco==0.25.2"],
"requirements": ["soco==0.25.3"],
"dependencies": ["ssdp"],
"after_dependencies": ["plex", "zeroconf"],
"zeroconf": ["_sonos._tcp.local."],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switchbot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "switchbot",
"name": "SwitchBot",
"documentation": "https://www.home-assistant.io/integrations/switchbot",
"requirements": ["PySwitchbot==0.13.0"],
"requirements": ["PySwitchbot==0.13.2"],
"config_flow": true,
"codeowners": ["@danielhiversen", "@RenierM26"],
"iot_class": "local_polling"
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/switchbot/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __init__(
super().__init__(coordinator, idx, mac, name)
self._attr_unique_id = idx
self._device = device
self._attr_is_on = False

async def async_added_to_hass(self) -> None:
"""Run when entity about to be added."""
Expand All @@ -132,6 +133,7 @@ async def async_turn_on(self, **kwargs: Any) -> None:
)
if self._last_run_success:
self._attr_is_on = True
self.async_write_ha_state()

async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn device off."""
Expand All @@ -143,6 +145,7 @@ async def async_turn_off(self, **kwargs: Any) -> None:
)
if self._last_run_success:
self._attr_is_on = False
self.async_write_ha_state()

@property
def assumed_state(self) -> bool:
Expand Down
Loading
0