Skip to content

Commit

Permalink
Merge pull request home-assistant#41555 from home-assistant/rc
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Oct 9, 2020
2 parents b2885f6 + a26413c commit 52d8c66
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 10 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/arris_tg2492lg/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/netatmo/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ async def find_entities(data_class_name):
conditions = [
c.lower()
for c in data_class.get_monitored_conditions(module_id=module["_id"])
if c.lower() in SENSOR_TYPES
]
for condition in conditions:
if f"{condition}_value" in SENSOR_TYPES:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/omnilogic/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def state(self):
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:
Expand Down
15 changes: 15 additions & 0 deletions homeassistant/components/plant/group.py
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion homeassistant/components/poolsense/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%]"
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/yeelight/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
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,
}
Expand Down Expand Up @@ -661,7 +661,7 @@ def set_effect(self, effect) -> None:
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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/yeelight/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
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 = 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)
Expand Down
4 changes: 2 additions & 2 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
63 changes: 63 additions & 0 deletions tests/components/group/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 52d8c66

Please sign in to comment.