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

2022.7.2 #74760

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 9 commits into from
Jul 8, 2022
Merged

2022.7.2 #74760

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
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.54.0"],
"requirements": ["hass-nabucasa==0.54.1"],
"dependencies": ["http", "webhook"],
"after_dependencies": ["google_assistant", "alexa"],
"codeowners": ["@home-assistant/cloud"],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/deconz/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "deCONZ",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/deconz",
"requirements": ["pydeconz==96"],
"requirements": ["pydeconz==97"],
"ssdp": [
{
"manufacturer": "Royal Philips Electronics",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/freebox/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def update_sensors(self) -> None:
# According to the doc `syst_datas["sensors"]` is temperature sensors in celsius degree.
# Name and id of sensors may vary under Freebox devices.
for sensor in syst_datas["sensors"]:
self.sensors_temperature[sensor["name"]] = sensor["value"]
self.sensors_temperature[sensor["name"]] = sensor.get("value")

# Connection sensors
connection_datas: dict[str, Any] = await self._api.connection.get_status()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/freebox/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(
self._disk = disk
self._partition = partition
self._attr_name = f"{partition['label']} {description.name}"
self._unique_id = f"{self._router.mac} {description.key} {self._disk['id']} {self._partition['id']}"
self._attr_unique_id = f"{self._router.mac} {description.key} {self._disk['id']} {self._partition['id']}"

@property
def device_info(self) -> DeviceInfo:
Expand Down
7 changes: 7 additions & 0 deletions homeassistant/components/here_travel_time/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"mode": "Travel Mode"
}
},
"origin_menu": {
"title": "Choose Origin",
"menu_options": {
"origin_coordinates": "Using a map location",
"origin_entity": "Using an entity"
}
},
"origin_coordinates": {
"title": "Choose Origin",
"data": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
},
"title": "Choose Origin"
},
"origin_menu": {
"menu_options": {
"origin_coordinates": "Using a map location",
"origin_entity": "Using an entity"
},
"title": "Choose Origin"
},
"user": {
"data": {
"api_key": "API Key",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rainmachine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
entry.data[CONF_IP_ADDRESS],
entry.data[CONF_PASSWORD],
port=entry.data[CONF_PORT],
ssl=entry.data.get(CONF_SSL, DEFAULT_SSL),
use_ssl=entry.data.get(CONF_SSL, DEFAULT_SSL),
)
except RainMachineError as err:
raise ConfigEntryNotReady from err
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rainmachine/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def async_get_controller(
websession = aiohttp_client.async_get_clientsession(hass)
client = Client(session=websession)
try:
await client.load_local(ip_address, password, port=port, ssl=ssl)
await client.load_local(ip_address, password, port=port, use_ssl=ssl)
except RainMachineError:
return None
else:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rainmachine/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "RainMachine",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/rainmachine",
"requirements": ["regenmaschine==2022.06.1"],
"requirements": ["regenmaschine==2022.07.0"],
"codeowners": ["@bachya"],
"iot_class": "local_polling",
"homekit": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifi_direct/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_device_name(self, device):
def _connect(self):
"""Connect to the Unifi AP SSH server."""

self.ssh = pxssh.pxssh()
self.ssh = pxssh.pxssh(options={"HostKeyAlgorithms": "ssh-rsa"})
try:
self.ssh.login(
self.host, self.username, password=self.password, port=self.port
Expand Down
25 changes: 10 additions & 15 deletions homeassistant/components/zha/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __init__(self, *args, **kwargs):
self._color_channel = None
self._identify_channel = None
self._default_transition = None
self._color_mode = ColorMode.UNKNOWN # Set by sub classes
self._attr_color_mode = ColorMode.UNKNOWN # Set by sub classes

@property
def extra_state_attributes(self) -> dict[str, Any]:
Expand All @@ -159,11 +159,6 @@ def is_on(self) -> bool:
return False
return self._state

@property
def color_mode(self):
"""Return the color mode of this light."""
return self._color_mode

@property
def brightness(self):
"""Return the brightness of this light."""
Expand Down Expand Up @@ -309,7 +304,7 @@ async def async_turn_on(self, **kwargs):
if isinstance(result, Exception) or result[1] is not Status.SUCCESS:
self.debug("turned on: %s", t_log)
return
self._color_mode = ColorMode.COLOR_TEMP
self._attr_color_mode = ColorMode.COLOR_TEMP
self._color_temp = temperature
self._hs_color = None

Expand All @@ -323,7 +318,7 @@ async def async_turn_on(self, **kwargs):
if isinstance(result, Exception) or result[1] is not Status.SUCCESS:
self.debug("turned on: %s", t_log)
return
self._color_mode = ColorMode.HS
self._attr_color_mode = ColorMode.HS
self._hs_color = hs_color
self._color_temp = None

Expand Down Expand Up @@ -451,13 +446,13 @@ def __init__(self, unique_id, zha_device: ZHADevice, channels, **kwargs):
self._attr_supported_color_modes
)
if len(self._attr_supported_color_modes) == 1:
self._color_mode = next(iter(self._attr_supported_color_modes))
self._attr_color_mode = next(iter(self._attr_supported_color_modes))
else: # Light supports color_temp + hs, determine which mode the light is in
assert self._color_channel
if self._color_channel.color_mode == Color.ColorMode.Color_temperature:
self._color_mode = ColorMode.COLOR_TEMP
self._attr_color_mode = ColorMode.COLOR_TEMP
else:
self._color_mode = ColorMode.HS
self._attr_color_mode = ColorMode.HS

if self._identify_channel:
self._supported_features |= light.LightEntityFeature.FLASH
Expand Down Expand Up @@ -518,7 +513,7 @@ def async_restore_last_state(self, last_state):
if "off_brightness" in last_state.attributes:
self._off_brightness = last_state.attributes["off_brightness"]
if "color_mode" in last_state.attributes:
self._color_mode = ColorMode(last_state.attributes["color_mode"])
self._attr_color_mode = ColorMode(last_state.attributes["color_mode"])
if "color_temp" in last_state.attributes:
self._color_temp = last_state.attributes["color_temp"]
if "hs_color" in last_state.attributes:
Expand Down Expand Up @@ -558,13 +553,13 @@ async def async_get_state(self):

if (color_mode := results.get("color_mode")) is not None:
if color_mode == Color.ColorMode.Color_temperature:
self._color_mode = ColorMode.COLOR_TEMP
self._attr_color_mode = ColorMode.COLOR_TEMP
color_temp = results.get("color_temperature")
if color_temp is not None and color_mode:
self._color_temp = color_temp
self._hs_color = None
else:
self._color_mode = ColorMode.HS
self._attr_color_mode = ColorMode.HS
color_x = results.get("current_x")
color_y = results.get("current_y")
if color_x is not None and color_y is not None:
Expand Down Expand Up @@ -650,7 +645,7 @@ def __init__(
CONF_DEFAULT_LIGHT_TRANSITION,
0,
)
self._color_mode = None
self._attr_color_mode = None

async def async_added_to_hass(self):
"""Run when about to be added to hass."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

MAJOR_VERSION: Final = 2022
MINOR_VERSION: Final = 7
PATCH_VERSION: Final = "1"
PATCH_VERSION: Final = "2"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ aiohttp_cors==0.7.0
astral==2.2
async-upnp-client==0.31.2
async_timeout==4.0.2
atomicwrites==1.4.0
atomicwrites-homeassistant==1.4.1
attrs==21.2.0
awesomeversion==22.6.0
bcrypt==3.1.7
certifi>=2021.5.30
ciso8601==2.2.0
cryptography==36.0.2
fnvhash==0.1.0
hass-nabucasa==0.54.0
hass-nabucasa==0.54.1
home-assistant-frontend==20220707.0
httpx==0.23.0
ifaddr==0.1.7
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "homeassistant"
version = "2022.7.1"
version = "2022.7.2"
license = {text = "Apache-2.0"}
description = "Open-source home automation platform running on Python 3."
readme = "README.rst"
Expand All @@ -28,7 +28,7 @@ dependencies = [
"astral==2.2",
"async_timeout==4.0.2",
"attrs==21.2.0",
"atomicwrites==1.4.0",
"atomicwrites-homeassistant==1.4.1",
"awesomeversion==22.6.0",
"bcrypt==3.1.7",
"certifi>=2021.5.30",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ aiohttp==3.8.1
astral==2.2
async_timeout==4.0.2
attrs==21.2.0
atomicwrites==1.4.0
atomicwrites-homeassistant==1.4.1
awesomeversion==22.6.0
bcrypt==3.1.7
certifi>=2021.5.30
Expand Down
6 changes: 3 additions & 3 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ habitipy==0.2.0
hangups==0.4.18

# homeassistant.components.cloud
hass-nabucasa==0.54.0
hass-nabucasa==0.54.1

# homeassistant.components.splunk
hass_splunk==0.1.1
Expand Down Expand Up @@ -1444,7 +1444,7 @@ pydaikin==2.7.0
pydanfossair==0.1.0

# homeassistant.components.deconz
pydeconz==96
pydeconz==97

# homeassistant.components.delijn
pydelijn==1.0.0
Expand Down Expand Up @@ -2065,7 +2065,7 @@ raincloudy==0.0.7
raspyrfm-client==1.2.8

# homeassistant.components.rainmachine
regenmaschine==2022.06.1
regenmaschine==2022.07.0

# homeassistant.components.renault
renault-api==0.1.11
Expand Down
6 changes: 3 additions & 3 deletions requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ habitipy==0.2.0
hangups==0.4.18

# homeassistant.components.cloud
hass-nabucasa==0.54.0
hass-nabucasa==0.54.1

# homeassistant.components.tasmota
hatasmota==0.5.1
Expand Down Expand Up @@ -974,7 +974,7 @@ pycoolmasternet-async==0.1.2
pydaikin==2.7.0

# homeassistant.components.deconz
pydeconz==96
pydeconz==97

# homeassistant.components.dexcom
pydexcom==0.2.3
Expand Down Expand Up @@ -1376,7 +1376,7 @@ radios==0.1.1
radiotherm==2.1.0

# homeassistant.components.rainmachine
regenmaschine==2022.06.1
regenmaschine==2022.07.0

# homeassistant.components.renault
renault-api==0.1.11
Expand Down
31 changes: 31 additions & 0 deletions tests/components/deconz/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,37 @@ async def test_dont_add_sensor_if_state_is_none(
assert len(hass.states.async_all()) == 0


async def test_air_quality_sensor_without_ppb(hass, aioclient_mock):
"""Test sensor with scaled data is not created if state is None."""
data = {
"sensors": {
"1": {
"config": {
"on": True,
"reachable": True,
},
"ep": 2,
"etag": "c2d2e42396f7c78e11e46c66e2ec0200",
"lastseen": "2020-11-20T22:48Z",
"manufacturername": "BOSCH",
"modelid": "AIR",
"name": "BOSCH Air quality sensor",
"state": {
"airquality": "poor",
"lastupdated": "2020-11-20T22:48:00.209",
},
"swversion": "20200402",
"type": "ZHAAirQuality",
"uniqueid": "00:00:00:00:00:00:00:00-02-fdef",
}
}
}
with patch.dict(DECONZ_WEB_REQUEST, data):
await setup_deconz_integration(hass, aioclient_mock)

assert len(hass.states.async_all()) == 1


async def test_add_battery_later(hass, aioclient_mock, mock_deconz_websocket):
"""Test that a sensor without an initial battery state creates a battery sensor once state exist."""
data = {
Expand Down
13 changes: 5 additions & 8 deletions tests/components/demo/test_init.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
"""The tests for the Demo component."""
from contextlib import suppress
import json
import os
from unittest.mock import patch

import pytest

from homeassistant.components.demo import DOMAIN
from homeassistant.components.device_tracker.legacy import YAML_DEVICES
from homeassistant.components.recorder import get_instance
from homeassistant.components.recorder.statistics import list_statistic_ids
from homeassistant.helpers.json import JSONEncoder
Expand All @@ -22,11 +20,10 @@ def mock_history(hass):


@pytest.fixture(autouse=True)
def demo_cleanup(hass):
"""Clean up device tracker demo file."""
yield
with suppress(FileNotFoundError):
os.remove(hass.config.path(YAML_DEVICES))
def mock_device_tracker_update_config(hass):
"""Prevent device tracker from creating known devices file."""
with patch("homeassistant.components.device_tracker.legacy.update_config"):
yield


async def test_setting_up_demo(hass):
Expand Down
Loading
0