Merge pull request #41555 from home-assistant/rc

This commit is contained in:
Paulus Schoutsen 2020-10-09 16:46:08 +02:00 committed by GitHub
commit 52d8c66a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 89 additions and 10 deletions

View File

@ -3,7 +3,7 @@
"name": "Arris TG2492LG", "name": "Arris TG2492LG",
"documentation": "https://www.home-assistant.io/integrations/arris_tg2492lg", "documentation": "https://www.home-assistant.io/integrations/arris_tg2492lg",
"requirements": [ "requirements": [
"arris-tg2492lg==1.0.0" "arris-tg2492lg==1.1.0"
], ],
"codeowners": [ "codeowners": [
"@vanbalken" "@vanbalken"

View File

@ -136,6 +136,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
conditions = [ conditions = [
c.lower() c.lower()
for c in data_class.get_monitored_conditions(module_id=module["_id"]) for c in data_class.get_monitored_conditions(module_id=module["_id"])
if c.lower() in SENSOR_TYPES
] ]
for condition in conditions: for condition in conditions:
if f"{condition}_value" in SENSOR_TYPES: if f"{condition}_value" in SENSOR_TYPES:

View File

@ -119,7 +119,7 @@ class OmniLogicTemperatureSensor(OmnilogicSensor):
state = sensor_data state = sensor_data
if self._unit_type == "Metric": 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 hayward_unit_of_measure = TEMP_CELSIUS
if int(sensor_data) == -1: if int(sensor_data) == -1:

View File

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

View File

@ -3,7 +3,7 @@
"step": { "step": {
"user": { "user": {
"title": "PoolSense", "title": "PoolSense",
"description": "[%key:common::config_flow::description%]", "description": "[%key:common::config_flow::description::confirm_setup%]",
"data": { "data": {
"email": "[%key:common::config_flow::data::email%]", "email": "[%key:common::config_flow::data::email%]",
"password": "[%key:common::config_flow::data::password%]" "password": "[%key:common::config_flow::data::password%]"

View File

@ -137,7 +137,7 @@ EFFECTS_MAP = {
EFFECT_POLICE2: yee_transitions.police2, EFFECT_POLICE2: yee_transitions.police2,
EFFECT_CHRISTMAS: yee_transitions.christmas, EFFECT_CHRISTMAS: yee_transitions.christmas,
EFFECT_RGB: yee_transitions.rgb, EFFECT_RGB: yee_transitions.rgb,
EFFECT_RANDOM_LOOP: yee_transitions.randomloop, EFFECT_RANDOM_LOOP: yee_transitions.random_loop,
EFFECT_LSD: yee_transitions.lsd, EFFECT_LSD: yee_transitions.lsd,
EFFECT_SLOWDOWN: yee_transitions.slowdown, EFFECT_SLOWDOWN: yee_transitions.slowdown,
} }
@ -661,7 +661,7 @@ class YeelightGenericLight(YeelightEntity, LightEntity):
elif effect in EFFECTS_MAP: elif effect in EFFECTS_MAP:
flow = Flow(count=0, transitions=EFFECTS_MAP[effect]()) flow = Flow(count=0, transitions=EFFECTS_MAP[effect]())
elif effect == EFFECT_FAST_RANDOM_LOOP: 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: elif effect == EFFECT_WHATSAPP:
flow = Flow(count=2, transitions=yee_transitions.pulse(37, 211, 102)) flow = Flow(count=2, transitions=yee_transitions.pulse(37, 211, 102))
elif effect == EFFECT_FACEBOOK: elif effect == EFFECT_FACEBOOK:

View File

@ -3,7 +3,7 @@
"name": "Yeelight", "name": "Yeelight",
"documentation": "https://www.home-assistant.io/integrations/yeelight", "documentation": "https://www.home-assistant.io/integrations/yeelight",
"requirements": [ "requirements": [
"yeelight==0.5.3" "yeelight==0.5.4"
], ],
"codeowners": [ "codeowners": [
"@rytilahti", "@rytilahti",

View File

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

View File

@ -275,7 +275,7 @@ aqualogic==1.0
arcam-fmj==0.5.3 arcam-fmj==0.5.3
# homeassistant.components.arris_tg2492lg # homeassistant.components.arris_tg2492lg
arris-tg2492lg==1.0.0 arris-tg2492lg==1.1.0
# homeassistant.components.ampio # homeassistant.components.ampio
asmog==0.0.6 asmog==0.0.6
@ -2295,7 +2295,7 @@ xs1-api-client==3.0.0
yalesmartalarmclient==0.1.6 yalesmartalarmclient==0.1.6
# homeassistant.components.yeelight # homeassistant.components.yeelight
yeelight==0.5.3 yeelight==0.5.4
# homeassistant.components.yeelightsunflower # homeassistant.components.yeelightsunflower
yeelightsunflower==0.0.10 yeelightsunflower==0.0.10

View File

@ -1064,7 +1064,7 @@ wolf_smartset==0.1.6
xmltodict==0.12.0 xmltodict==0.12.0
# homeassistant.components.yeelight # homeassistant.components.yeelight
yeelight==0.5.3 yeelight==0.5.4
# homeassistant.components.zeroconf # homeassistant.components.zeroconf
zeroconf==0.28.5 zeroconf==0.28.5

View File

@ -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.covers").state == "closed"
assert hass.states.get("group.device_trackers").state == "home" assert hass.states.get("group.device_trackers").state == "home"
assert hass.states.get("group.grouped_group").state == "on" 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"