From 22bef1d0d35de54da1f41be1acecdce13bc92442 Mon Sep 17 00:00:00 2001 From: cgtobi Date: Fri, 9 Oct 2020 08:37:56 +0200 Subject: [PATCH 1/8] Fix Netatmo non specified sensor types (#41517) --- homeassistant/components/netatmo/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/netatmo/sensor.py b/homeassistant/components/netatmo/sensor.py index af41e01c7df..f0664daf1f8 100644 --- a/homeassistant/components/netatmo/sensor.py +++ b/homeassistant/components/netatmo/sensor.py @@ -136,6 +136,7 @@ async def async_setup_entry(hass, entry, async_add_entities): conditions = [ c.lower() for c in data_class.get_monitored_conditions(module_id=module["_id"]) + if c in SENSOR_TYPES ] for condition in conditions: if f"{condition}_value" in SENSOR_TYPES: From cca259422573a1eff113e2826f9cfc64f9d8bb1d Mon Sep 17 00:00:00 2001 From: Arjan van Balken Date: Thu, 8 Oct 2020 19:08:20 +0200 Subject: [PATCH 2/8] Update Arris TG2492LG dependency version (#41465) --- homeassistant/components/arris_tg2492lg/manifest.json | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/arris_tg2492lg/manifest.json b/homeassistant/components/arris_tg2492lg/manifest.json index 385bb955627..2d27824ba63 100644 --- a/homeassistant/components/arris_tg2492lg/manifest.json +++ b/homeassistant/components/arris_tg2492lg/manifest.json @@ -3,7 +3,7 @@ "name": "Arris TG2492LG", "documentation": "https://www.home-assistant.io/integrations/arris_tg2492lg", "requirements": [ - "arris-tg2492lg==1.0.0" + "arris-tg2492lg==1.1.0" ], "codeowners": [ "@vanbalken" diff --git a/requirements_all.txt b/requirements_all.txt index c291319b2f3..5b03c56d938 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -275,7 +275,7 @@ aqualogic==1.0 arcam-fmj==0.5.3 # homeassistant.components.arris_tg2492lg -arris-tg2492lg==1.0.0 +arris-tg2492lg==1.1.0 # homeassistant.components.ampio asmog==0.0.6 From 7cdbbc248fbb558d0b0c1c082995d18aff88c985 Mon Sep 17 00:00:00 2001 From: djtimca <60706061+djtimca@users.noreply.github.com> Date: Thu, 8 Oct 2020 17:48:54 -0400 Subject: [PATCH 3/8] Fix omnilogic temperature sensor with metric setting (#41509) --- homeassistant/components/omnilogic/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/omnilogic/sensor.py b/homeassistant/components/omnilogic/sensor.py index f4bb0f45d5e..e3324cfabc3 100644 --- a/homeassistant/components/omnilogic/sensor.py +++ b/homeassistant/components/omnilogic/sensor.py @@ -119,7 +119,7 @@ class OmniLogicTemperatureSensor(OmnilogicSensor): state = sensor_data if self._unit_type == "Metric": - hayward_state = round((hayward_state - 32) * 5 / 9, 1) + hayward_state = round((int(hayward_state) - 32) * 5 / 9, 1) hayward_unit_of_measure = TEMP_CELSIUS if int(sensor_data) == -1: From 56436e63870ca8dfea8c0e20d4d310a062b9667a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Oct 2020 01:37:27 -0500 Subject: [PATCH 4/8] Restore group support to plant entities (#41519) --- homeassistant/components/plant/group.py | 15 ++++++ tests/components/group/test_init.py | 63 +++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 homeassistant/components/plant/group.py diff --git a/homeassistant/components/plant/group.py b/homeassistant/components/plant/group.py new file mode 100644 index 00000000000..5d6edfa2b9a --- /dev/null +++ b/homeassistant/components/plant/group.py @@ -0,0 +1,15 @@ +"""Describe group states.""" + + +from homeassistant.components.group import GroupIntegrationRegistry +from homeassistant.const import STATE_OK, STATE_PROBLEM +from homeassistant.core import callback +from homeassistant.helpers.typing import HomeAssistantType + + +@callback +def async_describe_on_off_states( + hass: HomeAssistantType, registry: GroupIntegrationRegistry +) -> None: + """Describe group on off states.""" + registry.on_off_states({STATE_PROBLEM}, STATE_OK) diff --git a/tests/components/group/test_init.py b/tests/components/group/test_init.py index 18d37267334..5006461d32c 100644 --- a/tests/components/group/test_init.py +++ b/tests/components/group/test_init.py @@ -1213,3 +1213,66 @@ async def test_group_that_references_two_types_of_groups(hass): assert hass.states.get("group.covers").state == "closed" assert hass.states.get("group.device_trackers").state == "home" assert hass.states.get("group.grouped_group").state == "on" + + +async def test_plant_group(hass): + """Test plant states can be grouped.""" + + entity_ids = [ + "plant.upstairs", + "plant.downstairs", + ] + + assert await async_setup_component( + hass, + "plant", + { + "plant": { + "plantname": { + "sensors": { + "moisture": "sensor.mqtt_plant_moisture", + "battery": "sensor.mqtt_plant_battery", + "temperature": "sensor.mqtt_plant_temperature", + "conductivity": "sensor.mqtt_plant_conductivity", + "brightness": "sensor.mqtt_plant_brightness", + }, + "min_moisture": 20, + "max_moisture": 60, + "min_battery": 17, + "min_conductivity": 500, + "min_temperature": 15, + "min_brightness": 500, + } + } + }, + ) + assert await async_setup_component( + hass, + "group", + { + "group": { + "plants": {"entities": entity_ids}, + "plant_with_binary_sensors": { + "entities": [*entity_ids, "binary_sensor.planter"] + }, + } + }, + ) + await hass.async_block_till_done() + + hass.states.async_set("binary_sensor.planter", "off") + for entity_id in entity_ids: + hass.states.async_set(entity_id, "ok") + await hass.async_block_till_done() + await hass.async_block_till_done() + + assert hass.states.get("group.plants").state == "ok" + assert hass.states.get("group.plant_with_binary_sensors").state == "off" + + hass.states.async_set("binary_sensor.planter", "on") + for entity_id in entity_ids: + hass.states.async_set(entity_id, "problem") + + await hass.async_block_till_done() + assert hass.states.get("group.plants").state == "problem" + assert hass.states.get("group.plant_with_binary_sensors").state == "on" From 72b95f7529b918cf320471c8b0a608d6a0509bb3 Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Fri, 9 Oct 2020 19:30:42 +0800 Subject: [PATCH 5/8] Bump yeelight to 0.5.4 (#41524) --- homeassistant/components/yeelight/light.py | 4 ++-- homeassistant/components/yeelight/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index a84ebebf6e3..93dbc5bcb07 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -137,7 +137,7 @@ EFFECTS_MAP = { EFFECT_POLICE2: yee_transitions.police2, EFFECT_CHRISTMAS: yee_transitions.christmas, EFFECT_RGB: yee_transitions.rgb, - EFFECT_RANDOM_LOOP: yee_transitions.randomloop, + EFFECT_RANDOM_LOOP: yee_transitions.random_loop, EFFECT_LSD: yee_transitions.lsd, EFFECT_SLOWDOWN: yee_transitions.slowdown, } @@ -661,7 +661,7 @@ class YeelightGenericLight(YeelightEntity, LightEntity): elif effect in EFFECTS_MAP: flow = Flow(count=0, transitions=EFFECTS_MAP[effect]()) elif effect == EFFECT_FAST_RANDOM_LOOP: - flow = Flow(count=0, transitions=yee_transitions.randomloop(duration=250)) + flow = Flow(count=0, transitions=yee_transitions.random_loop(duration=250)) elif effect == EFFECT_WHATSAPP: flow = Flow(count=2, transitions=yee_transitions.pulse(37, 211, 102)) elif effect == EFFECT_FACEBOOK: diff --git a/homeassistant/components/yeelight/manifest.json b/homeassistant/components/yeelight/manifest.json index 1e8c0472fdd..3c708d57560 100644 --- a/homeassistant/components/yeelight/manifest.json +++ b/homeassistant/components/yeelight/manifest.json @@ -3,7 +3,7 @@ "name": "Yeelight", "documentation": "https://www.home-assistant.io/integrations/yeelight", "requirements": [ - "yeelight==0.5.3" + "yeelight==0.5.4" ], "codeowners": [ "@rytilahti", diff --git a/requirements_all.txt b/requirements_all.txt index 5b03c56d938..d6f490ff1ee 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2295,7 +2295,7 @@ xs1-api-client==3.0.0 yalesmartalarmclient==0.1.6 # homeassistant.components.yeelight -yeelight==0.5.3 +yeelight==0.5.4 # homeassistant.components.yeelightsunflower yeelightsunflower==0.0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a977daa08e0..3b1b13fa1a8 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1064,7 +1064,7 @@ wolf_smartset==0.1.6 xmltodict==0.12.0 # homeassistant.components.yeelight -yeelight==0.5.3 +yeelight==0.5.4 # homeassistant.components.zeroconf zeroconf==0.28.5 From dae2117078c6a3d80c0033267b0add6886366857 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Fri, 9 Oct 2020 11:16:16 +0200 Subject: [PATCH 6/8] Fix description reference in PoolSense config flow (#41535) --- homeassistant/components/poolsense/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/poolsense/strings.json b/homeassistant/components/poolsense/strings.json index d26a44cc275..71b30e0bf77 100644 --- a/homeassistant/components/poolsense/strings.json +++ b/homeassistant/components/poolsense/strings.json @@ -3,7 +3,7 @@ "step": { "user": { "title": "PoolSense", - "description": "[%key:common::config_flow::description%]", + "description": "[%key:common::config_flow::description::confirm_setup%]", "data": { "email": "[%key:common::config_flow::data::email%]", "password": "[%key:common::config_flow::data::password%]" From c9d53dec8d3d1ffad5a78a4cd5db55ea6ef2b3d2 Mon Sep 17 00:00:00 2001 From: cgtobi Date: Fri, 9 Oct 2020 12:34:52 +0200 Subject: [PATCH 7/8] Fix missing weather sensors (#41540) --- homeassistant/components/netatmo/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/netatmo/sensor.py b/homeassistant/components/netatmo/sensor.py index f0664daf1f8..e20ce91d844 100644 --- a/homeassistant/components/netatmo/sensor.py +++ b/homeassistant/components/netatmo/sensor.py @@ -136,7 +136,7 @@ async def async_setup_entry(hass, entry, async_add_entities): conditions = [ c.lower() for c in data_class.get_monitored_conditions(module_id=module["_id"]) - if c in SENSOR_TYPES + if c.lower() in SENSOR_TYPES ] for condition in conditions: if f"{condition}_value" in SENSOR_TYPES: From a26413c9897c654e4a8b77ec8db61ace6e95d487 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 9 Oct 2020 13:44:04 +0000 Subject: [PATCH 8/8] Bumped version to 0.116.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index bbf942c94d3..0acd31bc30a 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1,7 +1,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 116 -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)