Update izone services.yaml and remove entity_id from schema. (#47305)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Nick Adams 2021-03-03 20:51:40 +10:00 committed by GitHub
parent b147ba1377
commit cc72cf0c0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 18 deletions

View file

@ -26,14 +26,13 @@ from homeassistant.components.climate.const import (
)
from homeassistant.const import (
ATTR_TEMPERATURE,
CONF_ENTITY_ID,
CONF_EXCLUDE,
PRECISION_HALVES,
PRECISION_TENTHS,
TEMP_CELSIUS,
)
from homeassistant.core import callback
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers import entity_platform
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.temperature import display_temp as show_temp
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
@ -63,14 +62,11 @@ ATTR_AIRFLOW = "airflow"
IZONE_SERVICE_AIRFLOW_MIN = "airflow_min"
IZONE_SERVICE_AIRFLOW_MAX = "airflow_max"
IZONE_SERVICE_AIRFLOW_SCHEMA = vol.Schema(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(ATTR_AIRFLOW): vol.All(
vol.Coerce(int), vol.Range(min=0, max=100), msg="invalid airflow"
),
}
)
IZONE_SERVICE_AIRFLOW_SCHEMA = {
vol.Required(ATTR_AIRFLOW): vol.All(
vol.Coerce(int), vol.Range(min=0, max=100), msg="invalid airflow"
),
}
async def async_setup_entry(

View file

@ -1,18 +1,40 @@
airflow_min:
name: Set minimum airflow
description: Set the airflow minimum percent for a zone
target:
entity:
integration: izone
domain: climate
fields:
entity_id:
description: iZone Zone entity
example: "climate.bed_1"
airflow:
name: Percent
description: Airflow percent in 5% increments
example: "95"
required: true
example: 95
selector:
number:
min: 0
max: 100
step: 5
unit_of_measurement: "%"
mode: slider
airflow_max:
name: Set maximum airflow
description: Set the airflow maximum percent for a zone
target:
entity:
integration: izone
domain: climate
fields:
entity_id:
description: iZone Zone entity
example: "climate.bed_1"
airflow:
name: Percent
description: Airflow percent in 5% increments
example: "95"
required: true
example: 95
selector:
number:
min: 0
max: 100
step: 5
unit_of_measurement: "%"
mode: slider