Skip to content

Commit

Permalink
Merge pull request #37377 from home-assistant/rc
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Jul 2, 2020
2 parents dc8bfb7 + ec690bb commit 460bd2b
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 27 deletions.
7 changes: 7 additions & 0 deletions homeassistant/components/denonavr/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ async def async_connect_receiver(self):
or self._receiver.model_name is None
or self._receiver.receiver_type is None
):
_LOGGER.error(
"Missing receiver information: manufacturer '%s', name '%s', model '%s', type '%s'",
self._receiver.manufacturer,
self._receiver.name,
self._receiver.model_name,
self._receiver.receiver_type,
)
return False

_LOGGER.debug(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_control/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def unit_of_measurement(self):

def _sync(self, message=None):
"""Update the multi level sensor state."""
if message[0].startswith("devolo.MultiLevelSensor"):
if message[0] == self._multi_level_sensor_property.element_uid:
self._state = self._device_instance.multi_level_sensor_property[
message[0]
].value
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/forked_daapd/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def async_step_user(self, user_input=None):
if user_input is not None:
# check for any entries with same host, abort if found
for entry in self._async_current_entries():
if entry.data[CONF_HOST] == user_input[CONF_HOST]:
if entry.data.get(CONF_HOST) == user_input[CONF_HOST]:
return self.async_abort(reason="already_configured")
validate_result = await self.validate_input(user_input)
if validate_result[0] == "ok": # success
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "frontend",
"name": "Home Assistant Frontend",
"documentation": "https://www.home-assistant.io/integrations/frontend",
"requirements": ["home-assistant-frontend==20200701.0"],
"requirements": ["home-assistant-frontend==20200702.0"],
"dependencies": [
"api",
"auth",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/gogogate2/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def async_step_user(self, user_input: dict = None):
CONF_IP_ADDRESS, default=user_input.get(CONF_IP_ADDRESS, "")
): str,
vol.Required(
CONF_USERNAME, default=user_input.get(CONF_USERNAME, "admin")
CONF_USERNAME, default=user_input.get(CONF_USERNAME, "")
): str,
vol.Required(
CONF_PASSWORD, default=user_input.get(CONF_PASSWORD, "")
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/gogogate2/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"name": "Gogogate2",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/gogogate2",
"requirements": ["gogogate2-api==1.0.3"],
"requirements": ["gogogate2-api==1.0.4"],
"codeowners": ["@vangorra"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/gogogate2/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"step": {
"user": {
"title": "Setup GogoGate2",
"description": "Provide requisite information below. Note: only the 'admin' user is known to work.",
"description": "Provide requisite information below.",
"data": {
"ip_address": "IP Address",
"username": "[%key:common::config_flow::data::username%]",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/hassio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ async def async_handle_core_service(call):
if errors:
_LOGGER.error(errors)
hass.components.persistent_notification.async_create(
"Config error. See [the logs](/developer-tools/logs) for details.",
"Config error. See [the logs](/config/logs) for details.",
"Config validating",
f"{HASS_DOMAIN}.check_config",
)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homeassistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def async_handle_core_service(call):
if errors:
_LOGGER.error(errors)
hass.components.persistent_notification.async_create(
"Config error. See [the logs](/developer-tools/logs) for details.",
"Config error. See [the logs](/config/logs) for details.",
"Config validating",
f"{ha.DOMAIN}.check_config",
)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/proxmoxve/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"name": "Proxmox VE",
"documentation": "https://www.home-assistant.io/integrations/proxmoxve",
"codeowners": ["@k4ds3", "@jhollowe"],
"requirements": ["proxmoxer==1.1.0"]
"requirements": ["proxmoxer==1.1.1"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/safe_mode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async def async_setup(hass: HomeAssistant, config: dict):
"""Set up the Safe Mode component."""
persistent_notification.async_create(
hass,
"Home Assistant is running in safe mode. Check [the error log](/developer-tools/logs) to see what went wrong.",
"Home Assistant is running in safe mode. Check [the error log](/config/logs) to see what went wrong.",
"Safe Mode",
)
return True
2 changes: 1 addition & 1 deletion homeassistant/components/smappee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"documentation": "https://www.home-assistant.io/integrations/smappee",
"dependencies": ["http"],
"requirements": [
"pysmappee==0.1.0"
"pysmappee==0.1.2"
],
"codeowners": [
"@bsmappee"
Expand Down
9 changes: 7 additions & 2 deletions homeassistant/components/withings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,13 @@ async def async_get_measures(self) -> Dict[MeasureType, Any]:

response = await self._hass.async_add_executor_job(self._api.measure_get_meas)

groups = query_measure_groups(
response, MeasureTypes.ANY, MeasureGroupAttribs.UNAMBIGUOUS
# Sort from oldest to newest.
groups = sorted(
query_measure_groups(
response, MeasureTypes.ANY, MeasureGroupAttribs.UNAMBIGUOUS
),
key=lambda group: group.created.datetime,
reverse=False,
)

return {
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 = 112
PATCH_VERSION = "0"
PATCH_VERSION = "1"
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER = (3, 7, 0)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defusedxml==0.6.0
distro==1.5.0
emoji==0.5.4
hass-nabucasa==0.34.7
home-assistant-frontend==20200701.0
home-assistant-frontend==20200702.0
importlib-metadata==1.6.0;python_version<'3.8'
jinja2>=2.11.1
netdisco==2.7.1
Expand Down
8 changes: 4 additions & 4 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ glances_api==0.2.0
gntp==1.0.3

# homeassistant.components.gogogate2
gogogate2-api==1.0.3
gogogate2-api==1.0.4

# homeassistant.components.google
google-api-python-client==1.6.4
Expand Down Expand Up @@ -738,7 +738,7 @@ hole==0.5.1
holidays==0.10.2

# homeassistant.components.frontend
home-assistant-frontend==20200701.0
home-assistant-frontend==20200702.0

# homeassistant.components.zwave
homeassistant-pyozw==0.1.10
Expand Down Expand Up @@ -1125,7 +1125,7 @@ prometheus_client==0.7.1
protobuf==3.6.1

# homeassistant.components.proxmoxve
proxmoxer==1.1.0
proxmoxer==1.1.1

# homeassistant.components.systemmonitor
psutil==5.7.0
Expand Down Expand Up @@ -1610,7 +1610,7 @@ pysignalclirestapi==0.3.4
pysma==0.3.5

# homeassistant.components.smappee
pysmappee==0.1.0
pysmappee==0.1.2

# homeassistant.components.smartthings
pysmartapp==0.3.2
Expand Down
6 changes: 3 additions & 3 deletions requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ gios==0.1.1
glances_api==0.2.0

# homeassistant.components.gogogate2
gogogate2-api==1.0.3
gogogate2-api==1.0.4

# homeassistant.components.google
google-api-python-client==1.6.4
Expand Down Expand Up @@ -343,7 +343,7 @@ hole==0.5.1
holidays==0.10.2

# homeassistant.components.frontend
home-assistant-frontend==20200701.0
home-assistant-frontend==20200702.0

# homeassistant.components.zwave
homeassistant-pyozw==0.1.10
Expand Down Expand Up @@ -715,7 +715,7 @@ pysignalclirestapi==0.3.4
pysma==0.3.5

# homeassistant.components.smappee
pysmappee==0.1.0
pysmappee==0.1.2

# homeassistant.components.smartthings
pysmartapp==0.3.2
Expand Down
59 changes: 54 additions & 5 deletions tests/components/withings/test_sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for the Withings component."""
import time
from typing import Any
from unittest.mock import patch

Expand Down Expand Up @@ -40,8 +39,8 @@
MeasureGetMeasGroup(
attrib=MeasureGetMeasGroupAttrib.DEVICE_ENTRY_FOR_USER,
category=MeasureGetMeasGroupCategory.REAL,
created=time.time(),
date=time.time(),
created=arrow.utcnow().shift(hours=-1),
date=arrow.utcnow().shift(hours=-1),
deviceid="DEV_ID",
grpid=1,
measures=(
Expand Down Expand Up @@ -87,11 +86,61 @@
),
),
),
MeasureGetMeasGroup(
attrib=MeasureGetMeasGroupAttrib.DEVICE_ENTRY_FOR_USER,
category=MeasureGetMeasGroupCategory.REAL,
created=arrow.utcnow().shift(hours=-2),
date=arrow.utcnow().shift(hours=-2),
deviceid="DEV_ID",
grpid=1,
measures=(
MeasureGetMeasMeasure(type=MeasureType.WEIGHT, unit=0, value=71),
MeasureGetMeasMeasure(
type=MeasureType.FAT_MASS_WEIGHT, unit=0, value=51
),
MeasureGetMeasMeasure(
type=MeasureType.FAT_FREE_MASS, unit=0, value=61
),
MeasureGetMeasMeasure(
type=MeasureType.MUSCLE_MASS, unit=0, value=51
),
MeasureGetMeasMeasure(type=MeasureType.BONE_MASS, unit=0, value=11),
MeasureGetMeasMeasure(type=MeasureType.HEIGHT, unit=0, value=21),
MeasureGetMeasMeasure(
type=MeasureType.TEMPERATURE, unit=0, value=41
),
MeasureGetMeasMeasure(
type=MeasureType.BODY_TEMPERATURE, unit=0, value=41
),
MeasureGetMeasMeasure(
type=MeasureType.SKIN_TEMPERATURE, unit=0, value=21
),
MeasureGetMeasMeasure(
type=MeasureType.FAT_RATIO, unit=-3, value=71
),
MeasureGetMeasMeasure(
type=MeasureType.DIASTOLIC_BLOOD_PRESSURE, unit=0, value=71
),
MeasureGetMeasMeasure(
type=MeasureType.SYSTOLIC_BLOOD_PRESSURE, unit=0, value=101
),
MeasureGetMeasMeasure(
type=MeasureType.HEART_RATE, unit=0, value=61
),
MeasureGetMeasMeasure(type=MeasureType.SP02, unit=-2, value=96),
MeasureGetMeasMeasure(
type=MeasureType.HYDRATION, unit=-2, value=96
),
MeasureGetMeasMeasure(
type=MeasureType.PULSE_WAVE_VELOCITY, unit=0, value=101
),
),
),
MeasureGetMeasGroup(
attrib=MeasureGetMeasGroupAttrib.DEVICE_ENTRY_FOR_USER_AMBIGUOUS,
category=MeasureGetMeasGroupCategory.REAL,
created=time.time(),
date=time.time(),
created=arrow.utcnow(),
date=arrow.utcnow(),
deviceid="DEV_ID",
grpid=1,
measures=(
Expand Down

0 comments on commit 460bd2b

Please sign in to comment.