Compare commits

..

19 Commits

Author SHA1 Message Date
Paulus Schoutsen
b76d7edf74 Merge pull request #37443 from home-assistant/rc 2020-07-03 22:14:46 -07:00
Paulus Schoutsen
18c16c464e Bumped version to 0.112.2 2020-07-03 22:43:02 +00:00
Alan Tse
30e980d389 Bump teslajsonpy to 0.9.2 (#37434)
* Bump teslajsonpy to 0.9.1
closes #37340

* Bump teslajsonpy to 0.9.2
2020-07-03 22:42:54 +00:00
Teemu R
e3d3b87f2e Bump python-miio to 0.5.2.1 (#37422) 2020-07-03 22:42:53 +00:00
Aaron Bach
032a6f3143 Bump pytile to 4.0.0 (#37398) 2020-07-03 22:42:52 +00:00
J. Nick Koston
d7ecbb8ebe Ensure logbook entries appear when the logbook.log (#37388)
service without a domain or entity_id
2020-07-03 22:42:51 +00:00
J. Nick Koston
ed086e5200 Handle index already existing on db migration with MySQLdb backend (#37384)
_create_index needed the same check as _add_columns since
the MySQLdb backend throws OperationalError instead
of InternalError in this case
2020-07-03 22:42:51 +00:00
Erik Montnemery
08ebc4ce62 Don't print MQTT credentials to log (#37364) 2020-07-03 22:42:50 +00:00
Paulus Schoutsen
460bd2b3bb Merge pull request #37377 from home-assistant/rc 2020-07-02 14:46:19 -07:00
Paulus Schoutsen
ec690bb369 Bumped version to 0.112.1 2020-07-02 20:15:44 +00:00
starkillerOG
16dae8457a Add DenonAvr missing error message (#37370) 2020-07-02 20:11:54 +00:00
Bram Kragten
38599d2970 Update frontend to 20200702.0 (#37369) 2020-07-02 20:11:53 +00:00
Robert Van Gorkom
5013b7e049 Fix withings bug that grabbed oldest value instead of the newest (#37362)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-02 20:11:52 +00:00
uvjustin
b21c81656f Use entry.data.get() in forked_daapd config_flow as some entries miss… (#37359) 2020-07-02 20:11:52 +00:00
Robert Van Gorkom
69a5c63b71 Fix gogogate2 issue where non-admin users could not login (#37353) 2020-07-02 20:11:51 +00:00
Markus Bong
9b854bdcd3 Fix devolo sensor subscriber (#37337) 2020-07-02 20:11:50 +00:00
bsmappee
f335127750 Smappee dependency update (#37331) 2020-07-02 20:11:49 +00:00
Courtenay
9131f5fa69 Change log url in config check error notification (#37311) 2020-07-02 20:11:49 +00:00
John Hollowell
976d375a33 Update proxmoxve integration to correctly renew authentication (#37016) 2020-07-02 20:11:48 +00:00
25 changed files with 133 additions and 46 deletions

View File

@@ -39,6 +39,13 @@ class ConnectDenonAVR:
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(

View File

@@ -80,7 +80,7 @@ class DevoloMultiLevelDeviceEntity(DevoloDeviceEntity):
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

View File

@@ -133,7 +133,7 @@ class ForkedDaapdFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
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

View File

@@ -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",

View File

@@ -63,7 +63,7 @@ class Gogogate2FlowHandler(ConfigFlow, domain=DOMAIN):
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, "")

View File

@@ -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"]
}

View File

@@ -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%]",

View File

@@ -325,7 +325,7 @@ async def async_setup(hass, config):
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",
)

View File

@@ -112,7 +112,7 @@ async def async_setup(hass: ha.HomeAssistant, config: dict) -> bool:
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",
)

View File

@@ -117,6 +117,12 @@ async def async_setup(hass, config):
domain = service.data.get(ATTR_DOMAIN)
entity_id = service.data.get(ATTR_ENTITY_ID)
if entity_id is None and domain is None:
# If there is no entity_id or
# domain, the event will get filtered
# away so we use the "logbook" domain
domain = DOMAIN
message.hass = hass
message = message.async_render()
async_log_entry(hass, name, message, domain, entity_id)

View File

@@ -476,10 +476,14 @@ async def async_setup_entry(hass, entry):
if conf is None:
conf = CONFIG_SCHEMA({DOMAIN: dict(entry.data)})[DOMAIN]
elif any(key in conf for key in entry.data):
_LOGGER.warning(
shared_keys = conf.keys() & entry.data.keys()
override = {k: entry.data[k] for k in shared_keys}
if CONF_PASSWORD in override:
override[CONF_PASSWORD] = "********"
_LOGGER.info(
"Data in your configuration entry is going to override your "
"configuration.yaml: %s",
entry.data,
override,
)
conf = _merge_config(entry, conf)

View File

@@ -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"]
}

View File

@@ -81,7 +81,9 @@ def _create_index(engine, table_name, index_name):
try:
index.create(engine)
except OperationalError as err:
if "already exists" not in str(err).lower():
lower_err_str = str(err).lower()
if "already exists" not in lower_err_str and "duplicate" not in lower_err_str:
raise
_LOGGER.warning(

View File

@@ -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

View File

@@ -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"

View File

@@ -3,6 +3,6 @@
"name": "Tesla",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tesla",
"requirements": ["teslajsonpy==0.9.0"],
"requirements": ["teslajsonpy==0.9.2"],
"codeowners": ["@zabuldon", "@alandtse"]
}

View File

@@ -3,6 +3,6 @@
"name": "Tile",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tile",
"requirements": ["pytile==3.0.6"],
"requirements": ["pytile==4.0.0"],
"codeowners": ["@bachya"]
}

View File

@@ -770,8 +770,13 @@ class DataManager:
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 {

View File

@@ -3,7 +3,7 @@
"name": "Xiaomi Miio",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/xiaomi_miio",
"requirements": ["construct==2.9.45", "python-miio==0.5.1"],
"requirements": ["construct==2.9.45", "python-miio==0.5.2.1"],
"codeowners": ["@rytilahti", "@syssi"],
"zeroconf": ["_miio._udp.local."]
}

View File

@@ -1,7 +1,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 112
PATCH_VERSION = "0"
PATCH_VERSION = "2"
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER = (3, 7, 0)

View File

@@ -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

View File

@@ -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
@@ -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
@@ -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
@@ -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
@@ -1712,7 +1712,7 @@ python-juicenet==1.0.1
# python-lirc==1.2.3
# homeassistant.components.xiaomi_miio
python-miio==0.5.1
python-miio==0.5.2.1
# homeassistant.components.mpd
python-mpd2==1.0.0
@@ -1778,7 +1778,7 @@ python_opendata_transport==0.2.1
pythonegardia==1.0.40
# homeassistant.components.tile
pytile==3.0.6
pytile==4.0.0
# homeassistant.components.touchline
pytouchline==0.7
@@ -2094,7 +2094,7 @@ temperusb==1.5.3
tesla-powerwall==0.2.11
# homeassistant.components.tesla
teslajsonpy==0.9.0
teslajsonpy==0.9.2
# homeassistant.components.thermoworks_smoke
thermoworks_smoke==0.1.8

View File

@@ -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
@@ -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
@@ -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
@@ -748,7 +748,7 @@ python-izone==1.1.2
python-juicenet==1.0.1
# homeassistant.components.xiaomi_miio
python-miio==0.5.1
python-miio==0.5.2.1
# homeassistant.components.nest
python-nest==4.1.0
@@ -775,7 +775,7 @@ python-velbus==2.0.43
python_awair==0.1.1
# homeassistant.components.tile
pytile==3.0.6
pytile==4.0.0
# homeassistant.components.traccar
pytraccar==0.9.0
@@ -890,7 +890,7 @@ tellduslive==0.10.11
tesla-powerwall==0.2.11
# homeassistant.components.tesla
teslajsonpy==0.9.0
teslajsonpy==0.9.2
# homeassistant.components.toon
toonapi==0.1.0

View File

@@ -77,7 +77,15 @@ class TestComponentLogbook(unittest.TestCase):
},
True,
)
self.hass.services.call(
logbook.DOMAIN,
"log",
{
logbook.ATTR_NAME: "This entry",
logbook.ATTR_MESSAGE: "has no domain or entity_id",
},
True,
)
# Logbook entry service call results in firing an event.
# Our service call will unblock when the event listeners have been
# scheduled. This means that they may not have been processed yet.
@@ -92,15 +100,21 @@ class TestComponentLogbook(unittest.TestCase):
dt_util.utcnow() + timedelta(hours=1),
)
)
assert len(events) == 1
assert len(events) == 2
assert len(calls) == 2
first_call = calls[-2]
assert first_call.data.get(logbook.ATTR_NAME) == "Alarm"
assert first_call.data.get(logbook.ATTR_MESSAGE) == "is triggered"
assert first_call.data.get(logbook.ATTR_DOMAIN) == "switch"
assert first_call.data.get(logbook.ATTR_ENTITY_ID) == "switch.test_switch"
assert len(calls) == 1
last_call = calls[-1]
assert last_call.data.get(logbook.ATTR_NAME) == "Alarm"
assert last_call.data.get(logbook.ATTR_MESSAGE) == "is triggered"
assert last_call.data.get(logbook.ATTR_DOMAIN) == "switch"
assert last_call.data.get(logbook.ATTR_ENTITY_ID) == "switch.test_switch"
assert last_call.data.get(logbook.ATTR_NAME) == "This entry"
assert last_call.data.get(logbook.ATTR_MESSAGE) == "has no domain or entity_id"
assert last_call.data.get(logbook.ATTR_DOMAIN) == "logbook"
def test_service_call_create_log_book_entry_no_message(self):
"""Test if service call create log book entry without message."""

View File

@@ -1,5 +1,4 @@
"""Tests for the Withings component."""
import time
from typing import Any
from unittest.mock import patch
@@ -40,8 +39,8 @@ PERSON0 = new_profile_config(
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=(
@@ -87,11 +86,61 @@ PERSON0 = new_profile_config(
),
),
),
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=(