mirror of
https://github.com/home-assistant/core.git
synced 2025-10-13 05:39:37 +00:00
Compare commits
10 Commits
mqtt-urls
...
knx-sensor
Author | SHA1 | Date | |
---|---|---|---|
![]() |
06702eb454 | ||
![]() |
298c524858 | ||
![]() |
d3b519846b | ||
![]() |
36d952800b | ||
![]() |
b832561e53 | ||
![]() |
c59d295bf2 | ||
![]() |
6e28e3aed1 | ||
![]() |
6d8944d379 | ||
![]() |
762fd6d241 | ||
![]() |
4c6500e7a4 |
@@ -71,7 +71,14 @@ class AemetConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
}
|
||||
)
|
||||
|
||||
return self.async_show_form(step_id="user", data_schema=schema, errors=errors)
|
||||
return self.async_show_form(
|
||||
step_id="user",
|
||||
data_schema=schema,
|
||||
errors=errors,
|
||||
description_placeholders={
|
||||
"api_key_url": "https://opendata.aemet.es/centrodedescargas/altaUsuario"
|
||||
},
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
|
@@ -14,7 +14,7 @@
|
||||
"longitude": "[%key:common::config_flow::data::longitude%]",
|
||||
"name": "Name of the integration"
|
||||
},
|
||||
"description": "To generate API key go to https://opendata.aemet.es/centrodedescargas/altaUsuario"
|
||||
"description": "To generate API key go to {api_key_url}"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -18,6 +18,10 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
|
||||
from .const import CONF_USE_NEAREST, DOMAIN, NO_AIRLY_SENSORS
|
||||
|
||||
DESCRIPTION_PLACEHOLDERS = {
|
||||
"developer_registration_url": "https://developer.airly.eu/register",
|
||||
}
|
||||
|
||||
|
||||
class AirlyFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
"""Config flow for Airly."""
|
||||
@@ -85,6 +89,7 @@ class AirlyFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
}
|
||||
),
|
||||
errors=errors,
|
||||
description_placeholders=DESCRIPTION_PLACEHOLDERS,
|
||||
)
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"description": "To generate API key go to https://developer.airly.eu/register",
|
||||
"description": "To generate API key go to {developer_registration_url}",
|
||||
"data": {
|
||||
"name": "[%key:common::config_flow::data::name%]",
|
||||
"api_key": "[%key:common::config_flow::data::api_key%]",
|
||||
|
@@ -8,5 +8,5 @@
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["aioamazondevices"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["aioamazondevices==6.4.0"]
|
||||
"requirements": ["aioamazondevices==6.4.1"]
|
||||
}
|
||||
|
@@ -84,11 +84,11 @@ class _KnxBinarySensor(BinarySensorEntity, RestoreEntity):
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Restore last state."""
|
||||
await super().async_added_to_hass()
|
||||
if (
|
||||
last_state := await self.async_get_last_state()
|
||||
) and last_state.state not in (STATE_UNKNOWN, STATE_UNAVAILABLE):
|
||||
self._device.remote_value.update_value(last_state.state == STATE_ON)
|
||||
await super().async_added_to_hass()
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
@@ -6,15 +6,15 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from functools import partial
|
||||
from typing import Any
|
||||
|
||||
from xknx import XKNX
|
||||
from xknx.core.connection_state import XknxConnectionState, XknxConnectionType
|
||||
from xknx.devices import Sensor as XknxSensor
|
||||
from xknx.devices import Device as XknxDevice, Sensor as XknxSensor
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.sensor import (
|
||||
CONF_STATE_CLASS,
|
||||
RestoreSensor,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
@@ -25,6 +25,8 @@ from homeassistant.const import (
|
||||
CONF_ENTITY_CATEGORY,
|
||||
CONF_NAME,
|
||||
CONF_TYPE,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
EntityCategory,
|
||||
Platform,
|
||||
)
|
||||
@@ -141,7 +143,7 @@ def _create_sensor(xknx: XKNX, config: ConfigType) -> XknxSensor:
|
||||
)
|
||||
|
||||
|
||||
class KNXSensor(KnxYamlEntity, SensorEntity):
|
||||
class KNXSensor(KnxYamlEntity, RestoreSensor):
|
||||
"""Representation of a KNX sensor."""
|
||||
|
||||
_device: XknxSensor
|
||||
@@ -164,20 +166,30 @@ class KNXSensor(KnxYamlEntity, SensorEntity):
|
||||
self._attr_unique_id = str(self._device.sensor_value.group_address_state)
|
||||
self._attr_native_unit_of_measurement = self._device.unit_of_measurement()
|
||||
self._attr_state_class = config.get(CONF_STATE_CLASS)
|
||||
self._attr_extra_state_attributes = {}
|
||||
|
||||
@property
|
||||
def native_value(self) -> StateType:
|
||||
"""Return the state of the sensor."""
|
||||
return self._device.resolve_state()
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Restore last state."""
|
||||
if (
|
||||
(last_state := await self.async_get_last_state())
|
||||
and last_state.state not in (STATE_UNKNOWN, STATE_UNAVAILABLE)
|
||||
and (
|
||||
(last_sensor_data := await self.async_get_last_sensor_data())
|
||||
is not None
|
||||
)
|
||||
):
|
||||
self._attr_native_value = last_sensor_data.native_value
|
||||
self._attr_extra_state_attributes.update(last_state.attributes)
|
||||
await super().async_added_to_hass()
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self) -> dict[str, Any] | None:
|
||||
"""Return device specific state attributes."""
|
||||
attr: dict[str, Any] = {}
|
||||
|
||||
if self._device.last_telegram is not None:
|
||||
attr[ATTR_SOURCE] = str(self._device.last_telegram.source_address)
|
||||
return attr
|
||||
def after_update_callback(self, device: XknxDevice) -> None:
|
||||
"""Call after device was updated."""
|
||||
self._attr_native_value = self._device.resolve_state()
|
||||
if telegram := self._device.last_telegram:
|
||||
self._attr_extra_state_attributes[ATTR_SOURCE] = str(
|
||||
telegram.source_address
|
||||
)
|
||||
super().after_update_callback(device)
|
||||
|
||||
|
||||
class KNXSystemSensor(SensorEntity):
|
||||
|
@@ -134,4 +134,8 @@ class MastodonConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
data=user_input,
|
||||
)
|
||||
|
||||
return self.show_user_form(user_input, errors)
|
||||
return self.show_user_form(
|
||||
user_input,
|
||||
errors,
|
||||
description_placeholders={"example_url": "https://mastodon.social"},
|
||||
)
|
||||
|
@@ -9,7 +9,7 @@
|
||||
"access_token": "[%key:common::config_flow::data::access_token%]"
|
||||
},
|
||||
"data_description": {
|
||||
"base_url": "The URL of your Mastodon instance e.g. https://mastodon.social.",
|
||||
"base_url": "The URL of your Mastodon instance e.g. {example_url}.",
|
||||
"client_id": "The client key for the application created within your Mastodon account.",
|
||||
"client_secret": "The client secret for the application created within your Mastodon account.",
|
||||
"access_token": "The access token for the application created within your Mastodon account."
|
||||
|
@@ -150,7 +150,6 @@ from .const import (
|
||||
CONF_ACTION_TOPIC,
|
||||
CONF_AVAILABILITY_TEMPLATE,
|
||||
CONF_AVAILABILITY_TOPIC,
|
||||
CONF_AVAILABLE_TONES,
|
||||
CONF_BIRTH_MESSAGE,
|
||||
CONF_BLUE_TEMPLATE,
|
||||
CONF_BRIGHTNESS_COMMAND_TEMPLATE,
|
||||
@@ -308,8 +307,6 @@ from .const import (
|
||||
CONF_STATE_VALUE_TEMPLATE,
|
||||
CONF_STEP,
|
||||
CONF_SUGGESTED_DISPLAY_PRECISION,
|
||||
CONF_SUPPORT_DURATION,
|
||||
CONF_SUPPORT_VOLUME_SET,
|
||||
CONF_SUPPORTED_COLOR_MODES,
|
||||
CONF_SUPPORTED_FEATURES,
|
||||
CONF_SWING_HORIZONTAL_MODE_COMMAND_TEMPLATE,
|
||||
@@ -463,7 +460,6 @@ SUBENTRY_PLATFORMS = [
|
||||
Platform.NUMBER,
|
||||
Platform.SELECT,
|
||||
Platform.SENSOR,
|
||||
Platform.SIREN,
|
||||
Platform.SWITCH,
|
||||
]
|
||||
|
||||
@@ -474,26 +470,6 @@ _CODE_VALIDATION_MODE = {
|
||||
EXCLUDE_FROM_CONFIG_IF_NONE = {CONF_ENTITY_CATEGORY}
|
||||
PWD_NOT_CHANGED = "__**password_not_changed**__"
|
||||
|
||||
DEVELOPER_DOCUMENTATION_URL = "https://developers.home-assistant.io/"
|
||||
USER_DOCUMENTATION_URL = "https://www.home-assistant.io/"
|
||||
|
||||
INTEGRATION_URL = f"{USER_DOCUMENTATION_URL}integrations/{DOMAIN}/"
|
||||
TEMPLATING_URL = f"{USER_DOCUMENTATION_URL}docs/configuration/templating/"
|
||||
AVAILABLE_STATE_CLASSES_URL = (
|
||||
f"{DEVELOPER_DOCUMENTATION_URL}docs/core/entity/sensor/#available-state-classes"
|
||||
)
|
||||
NAMING_ENTITIES_URL = f"{INTEGRATION_URL}#naming-of-mqtt-entities"
|
||||
REGISTRY_PROPERTIES_URL = (
|
||||
f"{DEVELOPER_DOCUMENTATION_URL}docs/core/entity/#registry-properties"
|
||||
)
|
||||
|
||||
TRANSLATION_DESCRIPTION_PLACEHOLDERS = {
|
||||
"templating_url": TEMPLATING_URL,
|
||||
"available_state_classes_url": AVAILABLE_STATE_CLASSES_URL,
|
||||
"naming_entities_url": NAMING_ENTITIES_URL,
|
||||
"registry_properties_url": REGISTRY_PROPERTIES_URL,
|
||||
}
|
||||
|
||||
# Common selectors
|
||||
BOOLEAN_SELECTOR = BooleanSelector()
|
||||
TEMPLATE_SELECTOR = TemplateSelector(TemplateSelectorConfig())
|
||||
@@ -1167,7 +1143,6 @@ ENTITY_CONFIG_VALIDATOR: dict[
|
||||
Platform.NOTIFY.value: None,
|
||||
Platform.NUMBER.value: validate_number_platform_config,
|
||||
Platform.SELECT: None,
|
||||
Platform.SIREN: None,
|
||||
Platform.SENSOR.value: validate_sensor_platform_config,
|
||||
Platform.SWITCH.value: None,
|
||||
}
|
||||
@@ -1424,7 +1399,6 @@ PLATFORM_ENTITY_FIELDS: dict[str, dict[str, PlatformField]] = {
|
||||
default=None,
|
||||
),
|
||||
},
|
||||
Platform.SIREN: {},
|
||||
Platform.SWITCH.value: {
|
||||
CONF_DEVICE_CLASS: PlatformField(
|
||||
selector=SWITCH_DEVICE_CLASS_SELECTOR, required=False
|
||||
@@ -3187,71 +3161,6 @@ PLATFORM_MQTT_FIELDS: dict[str, dict[str, PlatformField]] = {
|
||||
section="advanced_settings",
|
||||
),
|
||||
},
|
||||
Platform.SIREN: {
|
||||
CONF_COMMAND_TOPIC: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=True,
|
||||
validator=valid_publish_topic,
|
||||
error="invalid_publish_topic",
|
||||
),
|
||||
CONF_COMMAND_TEMPLATE: PlatformField(
|
||||
selector=TEMPLATE_SELECTOR,
|
||||
required=False,
|
||||
validator=validate(cv.template),
|
||||
error="invalid_template",
|
||||
),
|
||||
CONF_STATE_TOPIC: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=False,
|
||||
validator=valid_subscribe_topic,
|
||||
error="invalid_subscribe_topic",
|
||||
),
|
||||
CONF_VALUE_TEMPLATE: PlatformField(
|
||||
selector=TEMPLATE_SELECTOR,
|
||||
required=False,
|
||||
validator=validate(cv.template),
|
||||
error="invalid_template",
|
||||
),
|
||||
CONF_PAYLOAD_OFF: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=False,
|
||||
default=DEFAULT_PAYLOAD_OFF,
|
||||
),
|
||||
CONF_PAYLOAD_ON: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=False,
|
||||
default=DEFAULT_PAYLOAD_ON,
|
||||
),
|
||||
CONF_STATE_OFF: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=False,
|
||||
),
|
||||
CONF_STATE_ON: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
required=False,
|
||||
),
|
||||
CONF_AVAILABLE_TONES: PlatformField(
|
||||
selector=OPTIONS_SELECTOR,
|
||||
required=False,
|
||||
),
|
||||
CONF_SUPPORT_DURATION: PlatformField(
|
||||
selector=BOOLEAN_SELECTOR,
|
||||
required=False,
|
||||
),
|
||||
CONF_SUPPORT_VOLUME_SET: PlatformField(
|
||||
selector=BOOLEAN_SELECTOR,
|
||||
required=False,
|
||||
),
|
||||
CONF_RETAIN: PlatformField(selector=BOOLEAN_SELECTOR, required=False),
|
||||
CONF_OPTIMISTIC: PlatformField(selector=BOOLEAN_SELECTOR, required=False),
|
||||
CONF_COMMAND_OFF_TEMPLATE: PlatformField(
|
||||
selector=TEMPLATE_SELECTOR,
|
||||
required=False,
|
||||
validator=validate(cv.template),
|
||||
error="invalid_template",
|
||||
section="siren_advanced_settings",
|
||||
),
|
||||
},
|
||||
Platform.SWITCH.value: {
|
||||
CONF_COMMAND_TOPIC: PlatformField(
|
||||
selector=TEXT_SELECTOR,
|
||||
@@ -4339,8 +4248,7 @@ class MQTTSubentryFlowHandler(ConfigSubentryFlow):
|
||||
return self.async_show_form(
|
||||
step_id="entity_platform_config",
|
||||
data_schema=data_schema,
|
||||
description_placeholders=TRANSLATION_DESCRIPTION_PLACEHOLDERS
|
||||
| {
|
||||
description_placeholders={
|
||||
"mqtt_device": device_name,
|
||||
CONF_PLATFORM: platform,
|
||||
"entity": full_entity_name,
|
||||
@@ -4393,8 +4301,7 @@ class MQTTSubentryFlowHandler(ConfigSubentryFlow):
|
||||
return self.async_show_form(
|
||||
step_id="mqtt_platform_config",
|
||||
data_schema=data_schema,
|
||||
description_placeholders=TRANSLATION_DESCRIPTION_PLACEHOLDERS
|
||||
| {
|
||||
description_placeholders={
|
||||
"mqtt_device": device_name,
|
||||
CONF_PLATFORM: platform,
|
||||
"entity": full_entity_name,
|
||||
@@ -4610,7 +4517,9 @@ class MQTTSubentryFlowHandler(ConfigSubentryFlow):
|
||||
step_id="export_yaml",
|
||||
last_step=False,
|
||||
data_schema=data_schema,
|
||||
description_placeholders={"url": INTEGRATION_URL},
|
||||
description_placeholders={
|
||||
"url": "https://www.home-assistant.io/integrations/mqtt/"
|
||||
},
|
||||
)
|
||||
|
||||
async def async_step_export_discovery(
|
||||
@@ -4662,7 +4571,9 @@ class MQTTSubentryFlowHandler(ConfigSubentryFlow):
|
||||
step_id="export_discovery",
|
||||
last_step=False,
|
||||
data_schema=data_schema,
|
||||
description_placeholders={"url": INTEGRATION_URL},
|
||||
description_placeholders={
|
||||
"url": "https://www.home-assistant.io/integrations/mqtt/"
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
@@ -30,7 +30,6 @@ CONF_AVAILABILITY = "availability"
|
||||
CONF_AVAILABILITY_MODE = "availability_mode"
|
||||
CONF_AVAILABILITY_TEMPLATE = "availability_template"
|
||||
CONF_AVAILABILITY_TOPIC = "availability_topic"
|
||||
CONF_AVAILABLE_TONES = "available_tones"
|
||||
CONF_BROKER = "broker"
|
||||
CONF_BIRTH_MESSAGE = "birth_message"
|
||||
CONF_CODE_ARM_REQUIRED = "code_arm_required"
|
||||
@@ -201,8 +200,6 @@ CONF_STATE_UNLOCKED = "state_unlocked"
|
||||
CONF_STATE_UNLOCKING = "state_unlocking"
|
||||
CONF_STEP = "step"
|
||||
CONF_SUGGESTED_DISPLAY_PRECISION = "suggested_display_precision"
|
||||
CONF_SUPPORT_DURATION = "support_duration"
|
||||
CONF_SUPPORT_VOLUME_SET = "support_volume_set"
|
||||
CONF_SUPPORTED_COLOR_MODES = "supported_color_modes"
|
||||
CONF_SWING_HORIZONTAL_MODE_COMMAND_TEMPLATE = "swing_horizontal_mode_command_template"
|
||||
CONF_SWING_HORIZONTAL_MODE_COMMAND_TOPIC = "swing_horizontal_mode_command_topic"
|
||||
@@ -305,7 +302,6 @@ DEFAULT_PAYLOAD_RESET = "None"
|
||||
DEFAULT_PAYLOAD_STOP = "STOP"
|
||||
DEFAULT_PAYLOAD_TRIGGER = "TRIGGER"
|
||||
DEFAULT_PAYLOAD_UNLOCK = "UNLOCK"
|
||||
DEFAULT_PORT = 1883
|
||||
DEFAULT_RETAIN = False
|
||||
DEFAULT_TILT_CLOSED_POSITION = 0
|
||||
DEFAULT_TILT_MAX = 100
|
||||
@@ -316,7 +312,6 @@ DEFAULT_WS_HEADERS: dict[str, str] = {}
|
||||
DEFAULT_WS_PATH = "/"
|
||||
DEFAULT_POSITION_CLOSED = 0
|
||||
DEFAULT_POSITION_OPEN = 100
|
||||
DEFAULT_RETAIN = False
|
||||
DEFAULT_SPEED_RANGE_MAX = 100
|
||||
DEFAULT_SPEED_RANGE_MIN = 1
|
||||
DEFAULT_STATE_LOCKED = "LOCKED"
|
||||
|
@@ -39,18 +39,10 @@ from homeassistant.util.json import JSON_DECODE_EXCEPTIONS, json_loads_object
|
||||
from . import subscription
|
||||
from .config import MQTT_RW_SCHEMA
|
||||
from .const import (
|
||||
CONF_AVAILABLE_TONES,
|
||||
CONF_COMMAND_OFF_TEMPLATE,
|
||||
CONF_COMMAND_TEMPLATE,
|
||||
CONF_COMMAND_TOPIC,
|
||||
CONF_STATE_OFF,
|
||||
CONF_STATE_ON,
|
||||
CONF_STATE_TOPIC,
|
||||
CONF_STATE_VALUE_TEMPLATE,
|
||||
CONF_SUPPORT_DURATION,
|
||||
CONF_SUPPORT_VOLUME_SET,
|
||||
DEFAULT_PAYLOAD_OFF,
|
||||
DEFAULT_PAYLOAD_ON,
|
||||
PAYLOAD_EMPTY_JSON,
|
||||
PAYLOAD_NONE,
|
||||
)
|
||||
@@ -66,9 +58,18 @@ from .schemas import MQTT_ENTITY_COMMON_SCHEMA
|
||||
PARALLEL_UPDATES = 0
|
||||
|
||||
DEFAULT_NAME = "MQTT Siren"
|
||||
DEFAULT_PAYLOAD_ON = "ON"
|
||||
DEFAULT_PAYLOAD_OFF = "OFF"
|
||||
|
||||
ENTITY_ID_FORMAT = siren.DOMAIN + ".{}"
|
||||
|
||||
CONF_AVAILABLE_TONES = "available_tones"
|
||||
CONF_COMMAND_OFF_TEMPLATE = "command_off_template"
|
||||
CONF_STATE_ON = "state_on"
|
||||
CONF_STATE_OFF = "state_off"
|
||||
CONF_SUPPORT_DURATION = "support_duration"
|
||||
CONF_SUPPORT_VOLUME_SET = "support_volume_set"
|
||||
|
||||
STATE = "state"
|
||||
|
||||
PLATFORM_SCHEMA_MODERN = MQTT_RW_SCHEMA.extend(
|
||||
|
@@ -153,7 +153,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"availability_topic": "Topic to receive the availability payload on",
|
||||
"availability_template": "A [template]({templating_url}#using-templates-with-the-mqtt-integration) to render the availability payload received on the availability topic",
|
||||
"availability_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to render the availability payload received on the availability topic",
|
||||
"payload_available": "The payload that indicates the device is available (defaults to 'online')",
|
||||
"payload_not_available": "The payload that indicates the device is not available (defaults to 'offline')"
|
||||
}
|
||||
@@ -221,7 +221,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"platform": "The type of the entity to configure.",
|
||||
"name": "The name of the entity. Leave empty to set it to `None` to [mark it as main feature of the MQTT device]({naming_entities_url).",
|
||||
"name": "The name of the entity. Leave empty to set it to `None` to [mark it as main feature of the MQTT device](https://www.home-assistant.io/integrations/mqtt/#naming-of-mqtt-entities).",
|
||||
"entity_picture": "An URL to a picture to be assigned."
|
||||
}
|
||||
},
|
||||
@@ -288,7 +288,7 @@
|
||||
"climate_feature_target_temperature": "The climate supports setting the target temperature.",
|
||||
"climate_feature_target_humidity": "The climate supports setting the target humidity.",
|
||||
"device_class": "The device class of the {platform} entity. [Learn more.]({url}#device_class)",
|
||||
"entity_category": "Allows marking an entity as device configuration or diagnostics. An entity with a category will not be exposed to cloud, Alexa, or Google Assistant components, nor included in indirect action calls to devices or areas. Sensor entities cannot be assigned a device configuration class. [Learn more.]({registry_properties_url)",
|
||||
"entity_category": "Allows marking an entity as device configuration or diagnostics. An entity with a category will not be exposed to cloud, Alexa, or Google Assistant components, nor included in indirect action calls to devices or areas. Sensor entities cannot be assigned a device configuration class. [Learn more.](https://developers.home-assistant.io/docs/core/entity/#registry-properties)",
|
||||
"fan_feature_speed": "The fan supports multiple speeds.",
|
||||
"fan_feature_preset_modes": "The fan supports preset modes.",
|
||||
"fan_feature_oscillation": "The fan supports oscillation.",
|
||||
@@ -296,7 +296,7 @@
|
||||
"image_processing_mode": "Select how the image data is received.",
|
||||
"options": "Options for allowed sensor state values. The sensor’s Device class must be set to Enumeration. The 'Options' setting cannot be used together with State class or Unit of measurement.",
|
||||
"schema": "The schema to use. [Learn more.]({url}#comparison-of-light-mqtt-schemas)",
|
||||
"state_class": "The [State class]({available_state_classes_url}) of the sensor. [Learn more.]({url}#state_class)",
|
||||
"state_class": "The [State class](https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes) of the sensor. [Learn more.]({url}#state_class)",
|
||||
"suggested_display_precision": "The number of decimals which should be used in the {platform} entity state after rounding. [Learn more.]({url}#suggested_display_precision)",
|
||||
"supported_features": "The features that the entity supports.",
|
||||
"temperature_unit": "This determines the native unit of measurement the MQTT climate device works with.",
|
||||
@@ -318,7 +318,6 @@
|
||||
"title": "Configure MQTT device \"{mqtt_device}\"",
|
||||
"description": "Please configure MQTT specific details for {platform} entity \"{entity}\":",
|
||||
"data": {
|
||||
"available_tones": "Available Tones",
|
||||
"blue_template": "Blue template",
|
||||
"brightness_template": "Brightness template",
|
||||
"code": "Alarm code",
|
||||
@@ -361,41 +360,38 @@
|
||||
"state_topic": "State topic",
|
||||
"state_value_template": "State value template",
|
||||
"step": "Step",
|
||||
"support_duration": "Duration support",
|
||||
"support_volume_set": "Set volume support",
|
||||
"supported_color_modes": "Supported color modes",
|
||||
"url_template": "URL template",
|
||||
"url_topic": "URL topic",
|
||||
"value_template": "Value template"
|
||||
},
|
||||
"data_description": {
|
||||
"available_tones": "The siren supports tones. The `tone` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#available_tones)",
|
||||
"blue_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract blue color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"brightness_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract brightness from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"blue_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract blue color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"brightness_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract brightness from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"code": "Specifies a code to enable or disable the alarm in the frontend. Note that this blocks sending MQTT message commands to the remote device if the code validation fails. [Learn more.]({url}#code)",
|
||||
"code_format": "A regular expression to validate a supplied code when it is set during the action to open, lock or unlock the MQTT lock. [Learn more.]({url}#code_format)",
|
||||
"code_arm_required": "If set, the code is required to arm the alarm. If not set, the code is not validated.",
|
||||
"code_disarm_required": "If set, the code is required to disarm the alarm. If not set, the code is not validated.",
|
||||
"code_trigger_required": "If set, the code is required to manually trigger the alarm. If not set, the code is not validated.",
|
||||
"color_temp_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract color temperature in Kelvin from the state payload value. Expected result of the template is an integer.",
|
||||
"command_off_template": "The [template]({templating_url}#using-command-templates-with-mqtt) for \"off\" state changes. Available variables are: `state` and `transition`.",
|
||||
"command_on_template": "The [template]({templating_url}#using-command-templates-with-mqtt) for \"on\" state changes. Available variables: `state`, `brightness`, `color_temp`, `red`, `green`, `blue`, `hue`, `sat`, `flash`, `transition` and `effect`. Values `red`, `green`, `blue` and `brightness` are provided as integers from range 0-255. Value of `hue` is provided as float from range 0-360. Value of `sat` is provided as float from range 0-100. Value of `color_temp` is provided as integer representing Kelvin units.",
|
||||
"command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to render the payload to be published at the command topic. [Learn more.]({url}#command_template)",
|
||||
"color_temp_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract color temperature in Kelvin from the state payload value. Expected result of the template is an integer.",
|
||||
"command_off_template": "The [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) for \"off\" state changes. Available variables are: `state` and `transition`.",
|
||||
"command_on_template": "The [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) for \"on\" state changes. Available variables: `state`, `brightness`, `color_temp`, `red`, `green`, `blue`, `hue`, `sat`, `flash`, `transition` and `effect`. Values `red`, `green`, `blue` and `brightness` are provided as integers from range 0-255. Value of `hue` is provided as float from range 0-360. Value of `sat` is provided as float from range 0-100. Value of `color_temp` is provided as integer representing Kelvin units.",
|
||||
"command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to render the payload to be published at the command topic. [Learn more.]({url}#command_template)",
|
||||
"command_topic": "The publishing topic that will be used to control the {platform} entity. [Learn more.]({url}#command_topic)",
|
||||
"content_type": "The content type or the image data that is received at the image topic.",
|
||||
"force_update": "Sends update events even if the value hasn’t changed. Useful if you want to have meaningful value graphs in history. [Learn more.]({url}#force_update)",
|
||||
"green_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract green color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"green_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract green color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"image_encoding": "Select the encoding of the received image data",
|
||||
"image_topic": "The MQTT topic subscribed to receive messages containing the image data. [Learn more.]({url}#image_topic)",
|
||||
"last_reset_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the last reset. When Last reset template is set, the State class option must be Total. [Learn more.]({url}#last_reset_value_template)",
|
||||
"last_reset_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the last reset. When Last reset template is set, the State class option must be Total. [Learn more.]({url}#last_reset_value_template)",
|
||||
"max": "Maximum value. [Learn more.]({url}#max)",
|
||||
"min": "Minimum value. [Learn more.]({url}#min)",
|
||||
"mode": "Control how the number should be displayed in the UI. [Learn more.]({url}#mode)",
|
||||
"modes": "A list of supported operation modes. [Learn more.]({url}#modes)",
|
||||
"mode_command_topic": "The MQTT topic to publish commands to change the climate operation mode. [Learn more.]({url}#mode_command_topic)",
|
||||
"mode_command_template": "[Template]({templating_url}#using-command-templates-with-mqtt) to define the operation mode to be sent to the operation mode command topic. [Learn more.]({url}#mode_command_template)",
|
||||
"mode_command_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to define the operation mode to be sent to the operation mode command topic. [Learn more.]({url}#mode_command_template)",
|
||||
"mode_state_topic": "The MQTT topic subscribed to receive operation mode state messages. [Learn more.]({url}#mode_state_topic)",
|
||||
"mode_state_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the operation mode state. [Learn more.]({url}#mode_state_template)",
|
||||
"mode_state_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the operation mode state. [Learn more.]({url}#mode_state_template)",
|
||||
"on_command_type": "Defines when the payload \"on\" is sent. Using \"Last\" (the default) will send any style (brightness, color, etc) topics first and then a payload \"on\" to the command topic. Using \"First\" will send the payload \"on\" and then any style topics. Using \"Brightness\" will only send brightness commands instead of the payload \"on\" to turn the light on.",
|
||||
"optimistic": "Flag that defines if the {platform} entity works in optimistic mode. [Learn more.]({url}#optimistic)",
|
||||
"options": "List of options that can be selected.",
|
||||
@@ -404,19 +400,17 @@
|
||||
"payload_press": "The payload to send when the button is triggered.",
|
||||
"payload_reset": "The payload received at the state topic that resets the entity to an unknown state.",
|
||||
"qos": "The QoS value a {platform} entity should use.",
|
||||
"red_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract red color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"red_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract red color from the state payload value. Expected result of the template is an integer from 0-255 range.",
|
||||
"retain": "Select if values published by the {platform} entity should be retained at the MQTT broker.",
|
||||
"state_off": "The incoming payload that represents the \"off\" state. Use only when the value that represents \"off\" state in the state topic is different from value that should be sent to the command topic to turn the device off.",
|
||||
"state_on": "The incoming payload that represents the \"on\" state. Use only when the value that represents \"on\" state in the state topic is different from value that should be sent to the command topic to turn the device on.",
|
||||
"state_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract state from the state payload value.",
|
||||
"state_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract state from the state payload value.",
|
||||
"state_topic": "The MQTT topic subscribed to receive {platform} state values. [Learn more.]({url}#state_topic)",
|
||||
"step": "Step value. Smallest value 0.001.",
|
||||
"support_duration": "The siren supports setting a duration in second. The `duration` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#support_duration)",
|
||||
"support_volume_set": "The siren supports setting a volume. The `tone` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#support_volume_set)",
|
||||
"supported_color_modes": "A list of color modes supported by the light. Possible color modes are On/Off, Brightness, Color temperature, HS, XY, RGB, RGBW, RGBWW, White. Note that if On/Off or Brightness are used, that must be the only value in the list. [Learn more.]({url}#supported_color_modes)",
|
||||
"url_template": "[Template]({templating_url}#using-value-templates-with-mqtt) to extract an URL from the received URL topic payload value. [Learn more.]({url}#url_template)",
|
||||
"url_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract an URL from the received URL topic payload value. [Learn more.]({url}#url_template)",
|
||||
"url_topic": "The MQTT topic subscribed to receive messages containing the image URL. [Learn more.]({url}#url_topic)",
|
||||
"value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the {platform} entity value. [Learn more.]({url}#value_template)"
|
||||
"value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the {platform} entity value. [Learn more.]({url}#value_template)"
|
||||
},
|
||||
"sections": {
|
||||
"advanced_settings": {
|
||||
@@ -470,7 +464,7 @@
|
||||
"action_topic": "Action topic"
|
||||
},
|
||||
"data_description": {
|
||||
"action_template": "A [template]({templating_url}#using-value-templates-with-mqtt) to render the value received on the action topic with.",
|
||||
"action_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to render the value received on the action topic with.",
|
||||
"action_topic": "The MQTT topic to subscribe for changes of the current action. If this is set, the climate graph uses the value received as data source. A \"None\" payload resets the current action state. An empty payload is ignored. Valid action values are: \"off\", \"heating\", \"cooling\", \"drying\", \"idle\" and \"fan\". [Learn more.]({url}#action_topic)"
|
||||
}
|
||||
},
|
||||
@@ -486,9 +480,9 @@
|
||||
"data_description": {
|
||||
"fan_modes": "List of fan modes this climate is capable of running at. Common fan modes that offer translations are `off`, `on`, `auto`, `low`, `medium`, `high`, `middle`, `focus` and `diffuse`.",
|
||||
"fan_mode_command_topic": "The MQTT topic to publish commands to change the climate fan mode. [Learn more.]({url}#fan_mode_command_topic)",
|
||||
"fan_mode_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the fan mode command topic.",
|
||||
"fan_mode_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the fan mode command topic.",
|
||||
"fan_mode_state_topic": "The MQTT topic subscribed to receive the climate fan mode. [Learn more.]({url}#fan_mode_state_topic)",
|
||||
"fan_mode_state_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the climate fan mode value."
|
||||
"fan_mode_state_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the climate fan mode value."
|
||||
}
|
||||
},
|
||||
"climate_power_settings": {
|
||||
@@ -502,7 +496,7 @@
|
||||
"data_description": {
|
||||
"payload_off": "[%key:component::mqtt::config_subentries::device::step::mqtt_platform_config::data_description::payload_off%]",
|
||||
"payload_on": "[%key:component::mqtt::config_subentries::device::step::mqtt_platform_config::data_description::payload_on%]",
|
||||
"power_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the power command topic. The `value` parameter is the payload set for payload \"on\" or payload \"off\".",
|
||||
"power_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the power command topic. The `value` parameter is the payload set for payload \"on\" or payload \"off\".",
|
||||
"power_command_topic": "The MQTT topic to publish commands to change the climate power state. Sends the payload configured with payload \"on\" or payload \"off\". [Learn more.]({url}#power_command_topic)"
|
||||
}
|
||||
},
|
||||
@@ -535,9 +529,9 @@
|
||||
"data_description": {
|
||||
"swing_horizontal_modes": "List of horizontal swing modes this climate is capable of running at. Common horizontal swing modes that offer translations are `off` and `on`.",
|
||||
"swing_horizontal_mode_command_topic": "The MQTT topic to publish commands to change the climate horizontal swing mode. [Learn more.]({url}#swing_horizontal_mode_command_topic)",
|
||||
"swing_horizontal_mode_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the horizontal swing mode command topic.",
|
||||
"swing_horizontal_mode_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the horizontal swing mode command topic.",
|
||||
"swing_horizontal_mode_state_topic": "The MQTT topic subscribed to receive the climate horizontal swing mode. [Learn more.]({url}#swing_horizontal_mode_state_topic)",
|
||||
"swing_horizontal_mode_state_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the climate horizontal swing mode value."
|
||||
"swing_horizontal_mode_state_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the climate horizontal swing mode value."
|
||||
}
|
||||
},
|
||||
"climate_swing_mode_settings": {
|
||||
@@ -552,9 +546,9 @@
|
||||
"data_description": {
|
||||
"swing_modes": "List of swing modes this climate is capable of running at. Common swing modes that offer translations are `off`, `on`, `vertical`, `horizontal` and `both`.",
|
||||
"swing_mode_command_topic": "The MQTT topic to publish commands to change the climate swing mode. [Learn more.]({url}#swing_mode_command_topic)",
|
||||
"swing_mode_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the swing mode command topic.",
|
||||
"swing_mode_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the swing mode command topic.",
|
||||
"swing_mode_state_topic": "The MQTT topic subscribed to receive the climate swing mode. [Learn more.]({url}#swing_mode_state_topic)",
|
||||
"swing_mode_state_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the climate swing mode value."
|
||||
"swing_mode_state_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the climate swing mode value."
|
||||
}
|
||||
},
|
||||
"cover_payload_settings": {
|
||||
@@ -595,9 +589,9 @@
|
||||
"data_description": {
|
||||
"position_closed": "Number which represents \"closed\" position.",
|
||||
"position_open": "Number which represents \"open\" position.",
|
||||
"position_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the payload for the position topic. Within the template the following variables are also available: `entity_id`, `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#position_template)",
|
||||
"position_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the payload for the position topic. Within the template the following variables are also available: `entity_id`, `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#position_template)",
|
||||
"position_topic": "The MQTT topic subscribed to receive cover position state messages. [Learn more.]({url}#position_topic)",
|
||||
"set_position_template": "[Template]({templating_url}#using-command-templates-with-mqtt) to define the position to be sent to the set position topic. Within the template the following variables are available: `value` (the scaled target position), `entity_id`, `position` (the target position percentage), `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#set_position_template)",
|
||||
"set_position_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to define the position to be sent to the set position topic. Within the template the following variables are available: `value` (the scaled target position), `entity_id`, `position` (the target position percentage), `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#set_position_template)",
|
||||
"set_position_topic": "The MQTT topic to publish position commands to. You need to use the set position topic as well if you want to use the position topic. Use template if position topic wants different values than within range \"position closed\" - \"position_open\". If template is not defined and position \"closed\" != 100 and position \"open\" != 0 then proper position value is calculated from percentage position. [Learn more.]({url}#set_position_topic)"
|
||||
}
|
||||
},
|
||||
@@ -616,12 +610,12 @@
|
||||
},
|
||||
"data_description": {
|
||||
"tilt_closed_value": "The value that will be sent to the \"tilt command topic\" when the cover tilt is closed.",
|
||||
"tilt_command_template": "[Template]({templating_url}#using-command-templates-with-mqtt) to define the position to be sent to the tilt command topic. Within the template the following variables are available: `entity_id`, `tilt_position` (the target tilt position percentage), `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#tilt_command_template)",
|
||||
"tilt_command_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to define the position to be sent to the tilt command topic. Within the template the following variables are available: `entity_id`, `tilt_position` (the target tilt position percentage), `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#tilt_command_template)",
|
||||
"tilt_command_topic": "The MQTT topic to publish commands to control the cover tilt. [Learn more.]({url}#tilt_command_topic)",
|
||||
"tilt_max": "The maximum tilt value.",
|
||||
"tilt_min": "The minimum tilt value.",
|
||||
"tilt_opened_value": "The value that will be sent to the \"tilt command topic\" when the cover tilt is opened.",
|
||||
"tilt_status_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the payload for the tilt status topic. Within the template the following variables are available: `entity_id`, `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#tilt_status_template)",
|
||||
"tilt_status_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the payload for the tilt status topic. Within the template the following variables are available: `entity_id`, `position_open`, `position_closed`, `tilt_min` and `tilt_max`. [Learn more.]({url}#tilt_status_template)",
|
||||
"tilt_status_topic": "The MQTT topic subscribed to receive tilt status update values. [Learn more.]({url}#tilt_status_topic)",
|
||||
"tilt_optimistic": "Flag that defines if tilt works in optimistic mode. If tilt status topic is not defined, tilt works in optimistic mode by default. [Learn more.]({url}#tilt_optimistic)"
|
||||
}
|
||||
@@ -633,7 +627,7 @@
|
||||
"current_humidity_topic": "Current humidity topic"
|
||||
},
|
||||
"data_description": {
|
||||
"current_humidity_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the current humidity value. [Learn more.]({url}#current_humidity_template)",
|
||||
"current_humidity_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the current humidity value. [Learn more.]({url}#current_humidity_template)",
|
||||
"current_humidity_topic": "The MQTT topic subscribed to receive current humidity update values. [Learn more.]({url}#current_humidity_topic)"
|
||||
}
|
||||
},
|
||||
@@ -644,7 +638,7 @@
|
||||
"current_temperature_topic": "Current temperature topic"
|
||||
},
|
||||
"data_description": {
|
||||
"current_temperature_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the current temperature value. [Learn more.]({url}#current_temperature_template)",
|
||||
"current_temperature_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the current temperature value. [Learn more.]({url}#current_temperature_template)",
|
||||
"current_temperature_topic": "The MQTT topic subscribed to receive current temperature update values. [Learn more.]({url}#current_temperature_topic)"
|
||||
}
|
||||
},
|
||||
@@ -660,11 +654,11 @@
|
||||
},
|
||||
"data_description": {
|
||||
"brightness": "Flag that defines if light supports brightness when the RGB, RGBW, or RGBWW color mode is supported.",
|
||||
"brightness_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the brightness command topic.",
|
||||
"brightness_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the brightness command topic.",
|
||||
"brightness_command_topic": "The publishing topic that will be used to control the brightness. [Learn more.]({url}#brightness_command_topic)",
|
||||
"brightness_scale": "Defines the maximum brightness value (i.e., 100%) of the maximum brightness.",
|
||||
"brightness_state_topic": "The MQTT topic subscribed to receive brightness state values. [Learn more.]({url}#brightness_state_topic)",
|
||||
"brightness_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the brightness value."
|
||||
"brightness_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the brightness value."
|
||||
}
|
||||
},
|
||||
"lock_payload_settings": {
|
||||
@@ -702,9 +696,9 @@
|
||||
},
|
||||
"data_description": {
|
||||
"direction_command_topic": "The MQTT topic to publish commands to change the fan direction. The payload will be either `forward` or `reverse` and can be customized using the direction command template. [Learn more.]({url}#direction_command_topic)",
|
||||
"direction_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the direction command topic. The template variable `value` will be either `forward` or `reverse`.",
|
||||
"direction_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the direction command topic. The template variable `value` will be either `forward` or `reverse`.",
|
||||
"direction_state_topic": "The MQTT topic subscribed to receive fan direction state. Accepted state payloads are `forward` or `reverse`. [Learn more.]({url}#direction_state_topic)",
|
||||
"direction_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract fan direction state value. The template should return either `forward` or `reverse`. When the template returns an empty string, the direction will be ignored."
|
||||
"direction_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract fan direction state value. The template should return either `forward` or `reverse`. When the template returns an empty string, the direction will be ignored."
|
||||
}
|
||||
},
|
||||
"fan_oscillation_settings": {
|
||||
@@ -719,9 +713,9 @@
|
||||
},
|
||||
"data_description": {
|
||||
"oscillation_command_topic": "The MQTT topic to publish commands to change the fan oscillation state. [Learn more.]({url}#oscillation_command_topic)",
|
||||
"oscillation_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the oscillation command topic.",
|
||||
"oscillation_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the oscillation command topic.",
|
||||
"oscillation_state_topic": "The MQTT topic subscribed to receive fan oscillation state. [Learn more.]({url}#oscillation_state_topic)",
|
||||
"oscillation_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract fan oscillation state value.",
|
||||
"oscillation_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract fan oscillation state value.",
|
||||
"payload_oscillation_off": "The payload that represents the oscillation \"off\" state.",
|
||||
"payload_oscillation_on": "The payload that represents the oscillation \"on\" state."
|
||||
}
|
||||
@@ -740,9 +734,9 @@
|
||||
"payload_reset_preset_mode": "A special payload that resets the fan preset mode state attribute to unknown when received at the preset mode state topic.",
|
||||
"preset_modes": "List of preset modes this fan is capable of running at. Common examples include auto, smart, whoosh, eco and breeze.",
|
||||
"preset_mode_command_topic": "The MQTT topic to publish commands to change the fan preset mode. [Learn more.]({url}#preset_mode_command_topic)",
|
||||
"preset_mode_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the preset mode command topic.",
|
||||
"preset_mode_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the preset mode command topic.",
|
||||
"preset_mode_state_topic": "The MQTT topic subscribed to receive fan preset mode. [Learn more.]({url}#preset_mode_state_topic)",
|
||||
"preset_mode_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract fan preset mode value."
|
||||
"preset_mode_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract fan preset mode value."
|
||||
}
|
||||
},
|
||||
"fan_speed_settings": {
|
||||
@@ -759,9 +753,9 @@
|
||||
"data_description": {
|
||||
"payload_reset_percentage": "A special payload that resets the fan speed percentage state attribute to unknown when received at the percentage state topic.",
|
||||
"percentage_command_topic": "The MQTT topic to publish commands to change the fan speed state based on a percentage. [Learn more.]({url}#percentage_command_topic)",
|
||||
"percentage_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the percentage command topic.",
|
||||
"percentage_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the percentage command topic.",
|
||||
"percentage_state_topic": "The MQTT topic subscribed to receive fan speed based on percentage. [Learn more.]({url}#percentage_state_topic)",
|
||||
"percentage_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the speed percentage value.",
|
||||
"percentage_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the speed percentage value.",
|
||||
"speed_range_min": "The minimum of numeric output range (off not included, so speed_range_min - 1 represents 0 %). The percentage step is 100 / the number of speeds within the \"speed range\".",
|
||||
"speed_range_max": "The maximum of numeric output range (representing 100 %). The percentage step is 100 / number of speeds within the \"speed range\"."
|
||||
}
|
||||
@@ -774,7 +768,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"color_mode_state_topic": "The MQTT topic subscribed to receive color mode updates. If this is not configured, the color mode will be automatically set according to the last received valid color or color temperature.",
|
||||
"color_mode_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the color mode value."
|
||||
"color_mode_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the color mode value."
|
||||
}
|
||||
},
|
||||
"light_color_temp_settings": {
|
||||
@@ -786,10 +780,10 @@
|
||||
"color_temp_value_template": "Color temperature value template"
|
||||
},
|
||||
"data_description": {
|
||||
"color_temp_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the color temperature command topic.",
|
||||
"color_temp_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the color temperature command topic.",
|
||||
"color_temp_command_topic": "The publishing topic that will be used to control the color temperature. [Learn more.]({url}#color_temp_command_topic)",
|
||||
"color_temp_state_topic": "The MQTT topic subscribed to receive color temperature state updates. [Learn more.]({url}#color_temp_state_topic)",
|
||||
"color_temp_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the color temperature value."
|
||||
"color_temp_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the color temperature value."
|
||||
}
|
||||
},
|
||||
"light_effect_settings": {
|
||||
@@ -805,7 +799,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"effect": "Flag that defines if the light supports effects.",
|
||||
"effect_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the effect command topic.",
|
||||
"effect_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the effect command topic.",
|
||||
"effect_command_topic": "The publishing topic that will be used to control the light's effect state. [Learn more.]({url}#effect_command_topic)",
|
||||
"effect_list": "The list of effects the light supports.",
|
||||
"effect_state_topic": "The MQTT topic subscribed to receive effect state updates. [Learn more.]({url}#effect_state_topic)"
|
||||
@@ -820,10 +814,10 @@
|
||||
"hs_value_template": "HS value template"
|
||||
},
|
||||
"data_description": {
|
||||
"hs_command_template": "Defines a [template]({templating_url}#using-command-templates-with-mqtt) to compose message which will be sent to HS command topic. Available variables: `hue` and `sat`.",
|
||||
"hs_command_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose message which will be sent to HS command topic. Available variables: `hue` and `sat`.",
|
||||
"hs_command_topic": "The MQTT topic to publish commands to change the light’s color state in HS format (Hue Saturation). Range for Hue: 0° .. 360°, Range of Saturation: 0..100. Note: Brightness is sent separately in the brightness command topic. [Learn more.]({url}#hs_command_topic)",
|
||||
"hs_state_topic": "The MQTT topic subscribed to receive color state updates in HS format. The expected payload is the hue and saturation values separated by commas, for example, `359.5,100.0`. Note: Brightness is received separately in the brightness state topic. [Learn more.]({url}#hs_state_topic)",
|
||||
"hs_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the HS value."
|
||||
"hs_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the HS value."
|
||||
}
|
||||
},
|
||||
"light_rgb_settings": {
|
||||
@@ -835,10 +829,10 @@
|
||||
"rgb_value_template": "RGB value template"
|
||||
},
|
||||
"data_description": {
|
||||
"rgb_command_template": "Defines a [template]({templating_url}#using-command-templates-with-mqtt) to compose message which will be sent to RGB command topic. Available variables: `red`, `green` and `blue`.",
|
||||
"rgb_command_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose message which will be sent to RGB command topic. Available variables: `red`, `green` and `blue`.",
|
||||
"rgb_command_topic": "The MQTT topic to publish commands to change the light’s RGB state. [Learn more.]({url}#rgb_command_topic)",
|
||||
"rgb_state_topic": "The MQTT topic subscribed to receive RGB state updates. The expected payload is the RGB values separated by commas, for example, `255,0,127`. [Learn more.]({url}#rgb_state_topic)",
|
||||
"rgb_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the RGB value."
|
||||
"rgb_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the RGB value."
|
||||
}
|
||||
},
|
||||
"light_rgbw_settings": {
|
||||
@@ -850,10 +844,10 @@
|
||||
"rgbw_value_template": "RGBW value template"
|
||||
},
|
||||
"data_description": {
|
||||
"rgbw_command_template": "Defines a [template]({templating_url}#using-command-templates-with-mqtt) to compose message which will be sent to RGBW command topic. Available variables: `red`, `green`, `blue` and `white`.",
|
||||
"rgbw_command_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose message which will be sent to RGBW command topic. Available variables: `red`, `green`, `blue` and `white`.",
|
||||
"rgbw_command_topic": "The MQTT topic to publish commands to change the light’s RGBW state. [Learn more.]({url}#rgbw_command_topic)",
|
||||
"rgbw_state_topic": "The MQTT topic subscribed to receive RGBW state updates. The expected payload is the RGBW values separated by commas, for example, `255,0,127,64`. [Learn more.]({url}#rgbw_state_topic)",
|
||||
"rgbw_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the RGBW value."
|
||||
"rgbw_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the RGBW value."
|
||||
}
|
||||
},
|
||||
"light_rgbww_settings": {
|
||||
@@ -865,10 +859,10 @@
|
||||
"rgbww_value_template": "RGBWW value template"
|
||||
},
|
||||
"data_description": {
|
||||
"rgbww_command_template": "Defines a [template]({templating_url}#using-command-templates-with-mqtt) to compose message which will be sent to RGBWW command topic. Available variables: `red`, `green`, `blue`, `cold_white` and `warm_white`.",
|
||||
"rgbww_command_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose message which will be sent to RGBWW command topic. Available variables: `red`, `green`, `blue`, `cold_white` and `warm_white`.",
|
||||
"rgbww_command_topic": "The MQTT topic to publish commands to change the light’s RGBWW state. [Learn more.]({url}#rgbww_command_topic)",
|
||||
"rgbww_state_topic": "The MQTT topic subscribed to receive RGBWW state updates. The expected payload is the RGBWW values separated by commas, for example, `255,0,127,64,32`. [Learn more.]({url}#rgbww_state_topic)",
|
||||
"rgbww_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the RGBWW value."
|
||||
"rgbww_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the RGBWW value."
|
||||
}
|
||||
},
|
||||
"light_white_settings": {
|
||||
@@ -891,10 +885,10 @@
|
||||
"xy_value_template": "XY value template"
|
||||
},
|
||||
"data_description": {
|
||||
"xy_command_template": "Defines a [template]({templating_url}#using-command-templates-with-mqtt) to compose message which will be sent to XY command topic. Available variables: `x` and `y`.",
|
||||
"xy_command_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose message which will be sent to XY command topic. Available variables: `x` and `y`.",
|
||||
"xy_command_topic": "The MQTT topic to publish commands to change the light’s XY state. [Learn more.]({url}#xy_command_topic)",
|
||||
"xy_state_topic": "The MQTT topic subscribed to receive XY state updates. The expected payload is the X and Y color values separated by commas, for example, `0.675,0.322`. [Learn more.]({url}#xy_state_topic)",
|
||||
"xy_value_template": "Defines a [template]({templating_url}#using-value-templates-with-mqtt) to extract the XY value."
|
||||
"xy_value_template": "Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the XY value."
|
||||
}
|
||||
},
|
||||
"target_humidity_settings": {
|
||||
@@ -910,21 +904,12 @@
|
||||
"data_description": {
|
||||
"max_humidity": "The maximum target humidity that can be set.",
|
||||
"min_humidity": "The minimum target humidity that can be set.",
|
||||
"target_humidity_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the target humidity command topic.",
|
||||
"target_humidity_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the target humidity command topic.",
|
||||
"target_humidity_command_topic": "The MQTT topic to publish commands to change the climate target humidity. [Learn more.]({url}#humidity_command_topic)",
|
||||
"target_humidity_state_template": "A [template]({templating_url}#using-value-templates-with-mqtt) to render the value received on the target humidity state topic with.",
|
||||
"target_humidity_state_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to render the value received on the target humidity state topic with.",
|
||||
"target_humidity_state_topic": "The MQTT topic to subscribe for changes of the target humidity. [Learn more.]({url}#humidity_state_topic)"
|
||||
}
|
||||
},
|
||||
"siren_advanced_settings": {
|
||||
"name": "Advanced siren settings",
|
||||
"data": {
|
||||
"command_off_template": "Command \"off\" template"
|
||||
},
|
||||
"data_description": {
|
||||
"command_off_template": "The [template]({templating_url}#using-command-templates-with-mqtt) for \"off\" state changes. By default the \"[Command template]({url}#command_template)\" will be used. [Learn more.]({url}#command_off_template)"
|
||||
}
|
||||
},
|
||||
"target_temperature_settings": {
|
||||
"name": "Target temperature settings",
|
||||
"data": {
|
||||
@@ -952,17 +937,17 @@
|
||||
"min_temp": "The minimum target temperature that can be set.",
|
||||
"precision": "The precision in degrees the thermostat is working at.",
|
||||
"temp_step": "The target temperature step in degrees Celsius or Fahrenheit.",
|
||||
"temperature_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the temperature command topic.",
|
||||
"temperature_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the temperature command topic.",
|
||||
"temperature_command_topic": "The MQTT topic to publish commands to change the climate target temperature. [Learn more.]({url}#temperature_command_topic)",
|
||||
"temperature_high_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the upper temperature command topic.",
|
||||
"temperature_high_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the upper temperature command topic.",
|
||||
"temperature_high_command_topic": "The MQTT topic to publish commands to change the climate upper target temperature. [Learn more.]({url}#temperature_high_command_topic)",
|
||||
"temperature_low_command_template": "A [template]({templating_url}#using-command-templates-with-mqtt) to compose the payload to be published at the lower temperature command topic.",
|
||||
"temperature_low_command_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) to compose the payload to be published at the lower temperature command topic.",
|
||||
"temperature_low_command_topic": "The MQTT topic to publish commands to change the climate lower target temperature. [Learn more.]({url}#temperature_low_command_topic)",
|
||||
"temperature_state_template": "A [template]({templating_url}#using-value-templates-with-mqtt) to render the value received on the temperature state topic with.",
|
||||
"temperature_state_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to render the value received on the temperature state topic with.",
|
||||
"temperature_state_topic": "The MQTT topic to subscribe for changes of the target temperature. [Learn more.]({url}#temperature_state_topic)",
|
||||
"temperature_high_state_template": "A [template]({templating_url}#using-value-templates-with-mqtt) to render the value received on the upper temperature state topic with.",
|
||||
"temperature_high_state_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to render the value received on the upper temperature state topic with.",
|
||||
"temperature_high_state_topic": "The MQTT topic to subscribe for changes of the upper target temperature. [Learn more.]({url}#temperature_high_state_topic)",
|
||||
"temperature_low_state_template": "A [template]({templating_url}#using-value-templates-with-mqtt) to render the value received on the lower temperature state topic with.",
|
||||
"temperature_low_state_template": "A [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to render the value received on the lower temperature state topic with.",
|
||||
"temperature_low_state_topic": "The MQTT topic to subscribe for changes of the lower target temperature. [Learn more.]({url}#temperature_low_state_topic)"
|
||||
}
|
||||
}
|
||||
@@ -1353,7 +1338,6 @@
|
||||
"number": "[%key:component::number::title%]",
|
||||
"select": "[%key:component::select::title%]",
|
||||
"sensor": "[%key:component::sensor::title%]",
|
||||
"siren": "[%key:component::siren::title%]",
|
||||
"switch": "[%key:component::switch::title%]"
|
||||
}
|
||||
},
|
||||
|
@@ -73,6 +73,13 @@ STEP_MODBUS_DATA_SCHEMA = vol.Schema(
|
||||
)
|
||||
|
||||
|
||||
STEP_MODBUS_PLACEHOLDERS = {
|
||||
"tcp": "tcp://[HOST]:[PORT]",
|
||||
"serial": "serial://[LOCAL DEVICE]",
|
||||
"rfc2217": "rfc2217://[HOST]:[PORT]",
|
||||
}
|
||||
|
||||
|
||||
class FieldError(Exception):
|
||||
"""Field with invalid data."""
|
||||
|
||||
@@ -183,7 +190,9 @@ class NibeHeatPumpConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle the modbus step."""
|
||||
if user_input is None:
|
||||
return self.async_show_form(
|
||||
step_id="modbus", data_schema=STEP_MODBUS_DATA_SCHEMA
|
||||
step_id="modbus",
|
||||
data_schema=STEP_MODBUS_DATA_SCHEMA,
|
||||
description_placeholders=STEP_MODBUS_PLACEHOLDERS,
|
||||
)
|
||||
|
||||
errors = {}
|
||||
@@ -200,7 +209,10 @@ class NibeHeatPumpConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
return self.async_create_entry(title=title, data=data)
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="modbus", data_schema=STEP_MODBUS_DATA_SCHEMA, errors=errors
|
||||
step_id="modbus",
|
||||
data_schema=STEP_MODBUS_DATA_SCHEMA,
|
||||
errors=errors,
|
||||
description_placeholders=STEP_MODBUS_PLACEHOLDERS,
|
||||
)
|
||||
|
||||
async def async_step_nibegw(
|
||||
|
@@ -15,7 +15,7 @@
|
||||
"modbus_unit": "Modbus unit identifier"
|
||||
},
|
||||
"data_description": {
|
||||
"modbus_url": "Modbus URL that describes the connection to your heat pump or MODBUS40 unit. It should be in the form:\n - `tcp://[HOST]:[PORT]` for Modbus TCP connection\n - `serial://[LOCAL DEVICE]` for a local Modbus RTU connection\n - `rfc2217://[HOST]:[PORT]` for a remote Telnet-based Modbus RTU connection.",
|
||||
"modbus_url": "Modbus URL that describes the connection to your heat pump or MODBUS40 unit. It should be in the form:\n - `{tcp}` for Modbus TCP connection\n - `{serial}` for a local Modbus RTU connection\n - `{rfc2217}` for a remote Telnet-based Modbus RTU connection.",
|
||||
"modbus_unit": "Unit identification for your heat pump. Can usually be left at 0."
|
||||
}
|
||||
},
|
||||
|
@@ -15,5 +15,5 @@
|
||||
"integration_type": "device",
|
||||
"iot_class": "local_push",
|
||||
"quality_scale": "bronze",
|
||||
"requirements": ["pyprobeplus==1.0.1"]
|
||||
"requirements": ["pyprobeplus==1.1.0"]
|
||||
}
|
||||
|
@@ -42,6 +42,7 @@ STEP_USER_DATA_SCHEMA = vol.Schema(
|
||||
}
|
||||
)
|
||||
STEP_REAUTH_DATA_SCHEMA = vol.Schema({vol.Optional(CONF_API_KEY, default=""): str})
|
||||
PLACEHOLDER = {"example_url": "https://uptime.example.com:3001"}
|
||||
|
||||
|
||||
async def validate_connection(
|
||||
@@ -100,6 +101,7 @@ class UptimeKumaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
data_schema=STEP_USER_DATA_SCHEMA, suggested_values=user_input
|
||||
),
|
||||
errors=errors,
|
||||
description_placeholders=PLACEHOLDER,
|
||||
)
|
||||
|
||||
async def async_step_reauth(
|
||||
@@ -170,6 +172,7 @@ class UptimeKumaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
suggested_values=user_input or entry.data,
|
||||
),
|
||||
errors=errors,
|
||||
description_placeholders=PLACEHOLDER,
|
||||
)
|
||||
|
||||
async def async_step_hassio(
|
||||
|
@@ -9,7 +9,7 @@
|
||||
"api_key": "[%key:common::config_flow::data::api_key%]"
|
||||
},
|
||||
"data_description": {
|
||||
"url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `https://uptime.example.com`",
|
||||
"url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `{example_url}`",
|
||||
"verify_ssl": "Enable SSL certificate verification for secure connections. Disable only if connecting to an Uptime Kuma instance using a self-signed certificate or via IP address",
|
||||
"api_key": "Enter an API key. To create a new API key navigate to **Settings → API Keys** and select **Add API Key**"
|
||||
}
|
||||
|
4
requirements_all.txt
generated
4
requirements_all.txt
generated
@@ -185,7 +185,7 @@ aioairzone-cloud==0.7.2
|
||||
aioairzone==1.0.1
|
||||
|
||||
# homeassistant.components.alexa_devices
|
||||
aioamazondevices==6.4.0
|
||||
aioamazondevices==6.4.1
|
||||
|
||||
# homeassistant.components.ambient_network
|
||||
# homeassistant.components.ambient_station
|
||||
@@ -2296,7 +2296,7 @@ pypoint==3.0.0
|
||||
pyportainer==1.0.3
|
||||
|
||||
# homeassistant.components.probe_plus
|
||||
pyprobeplus==1.0.1
|
||||
pyprobeplus==1.1.0
|
||||
|
||||
# homeassistant.components.profiler
|
||||
pyprof2calltree==1.4.5
|
||||
|
4
requirements_test_all.txt
generated
4
requirements_test_all.txt
generated
@@ -173,7 +173,7 @@ aioairzone-cloud==0.7.2
|
||||
aioairzone==1.0.1
|
||||
|
||||
# homeassistant.components.alexa_devices
|
||||
aioamazondevices==6.4.0
|
||||
aioamazondevices==6.4.1
|
||||
|
||||
# homeassistant.components.ambient_network
|
||||
# homeassistant.components.ambient_station
|
||||
@@ -1923,7 +1923,7 @@ pypoint==3.0.0
|
||||
pyportainer==1.0.3
|
||||
|
||||
# homeassistant.components.probe_plus
|
||||
pyprobeplus==1.0.1
|
||||
pyprobeplus==1.1.0
|
||||
|
||||
# homeassistant.components.profiler
|
||||
pyprof2calltree==1.4.5
|
||||
|
@@ -250,8 +250,8 @@ async def test_binary_sensor_reset(
|
||||
assert state.state is STATE_OFF
|
||||
|
||||
|
||||
async def test_binary_sensor_restore_and_respond(hass: HomeAssistant, knx) -> None:
|
||||
"""Test restoring KNX binary sensor state and respond to read."""
|
||||
async def test_binary_sensor_restore(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
"""Test restoring KNX binary sensor state."""
|
||||
_ADDRESS = "2/2/2"
|
||||
fake_state = State("binary_sensor.test", STATE_ON)
|
||||
mock_restore_cache(hass, (fake_state,))
|
||||
@@ -278,7 +278,9 @@ async def test_binary_sensor_restore_and_respond(hass: HomeAssistant, knx) -> No
|
||||
assert state.state is STATE_OFF
|
||||
|
||||
|
||||
async def test_binary_sensor_restore_invert(hass: HomeAssistant, knx) -> None:
|
||||
async def test_binary_sensor_restore_invert(
|
||||
hass: HomeAssistant, knx: KNXTestKit
|
||||
) -> None:
|
||||
"""Test restoring KNX binary sensor state with invert."""
|
||||
_ADDRESS = "2/2/2"
|
||||
fake_state = State("binary_sensor.test", STATE_ON)
|
||||
|
@@ -2,14 +2,22 @@
|
||||
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
|
||||
from homeassistant.components.knx.const import CONF_STATE_ADDRESS, CONF_SYNC_STATE
|
||||
from homeassistant.components.knx.const import (
|
||||
ATTR_SOURCE,
|
||||
CONF_STATE_ADDRESS,
|
||||
CONF_SYNC_STATE,
|
||||
)
|
||||
from homeassistant.components.knx.schema import SensorSchema
|
||||
from homeassistant.const import CONF_NAME, CONF_TYPE, STATE_UNKNOWN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.core import HomeAssistant, State
|
||||
|
||||
from .conftest import KNXTestKit
|
||||
|
||||
from tests.common import async_capture_events, async_fire_time_changed
|
||||
from tests.common import (
|
||||
async_capture_events,
|
||||
async_fire_time_changed,
|
||||
mock_restore_cache_with_extra_data,
|
||||
)
|
||||
|
||||
|
||||
async def test_sensor(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
@@ -43,6 +51,41 @@ async def test_sensor(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
await knx.assert_no_telegram()
|
||||
|
||||
|
||||
async def test_sensor_restore(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
"""Test restoring KNX sensor state."""
|
||||
ADDRESS = "2/2/2"
|
||||
RAW_FLOAT_21_0 = (0x0C, 0x1A)
|
||||
RESTORED_STATE = "21.0"
|
||||
RESTORED_STATE_ATTRIBUTES = {ATTR_SOURCE: knx.INDIVIDUAL_ADDRESS}
|
||||
fake_state = State(
|
||||
"sensor.test", "ignored in favour of native_value", RESTORED_STATE_ATTRIBUTES
|
||||
)
|
||||
extra_data = {"native_value": RESTORED_STATE, "native_unit_of_measurement": "°C"}
|
||||
mock_restore_cache_with_extra_data(hass, [(fake_state, extra_data)])
|
||||
|
||||
await knx.setup_integration(
|
||||
{
|
||||
SensorSchema.PLATFORM: [
|
||||
{
|
||||
CONF_NAME: "test",
|
||||
CONF_STATE_ADDRESS: ADDRESS,
|
||||
CONF_TYPE: "temperature", # 2 byte float
|
||||
CONF_SYNC_STATE: False,
|
||||
},
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
# restored state - no read-response due to sync_state False
|
||||
knx.assert_state("sensor.test", RESTORED_STATE, **RESTORED_STATE_ATTRIBUTES)
|
||||
await knx.assert_telegram_count(0)
|
||||
|
||||
# receiving the restored value from restored source does not trigger state_changed event
|
||||
events = async_capture_events(hass, "state_changed")
|
||||
await knx.receive_write(ADDRESS, RAW_FLOAT_21_0)
|
||||
assert not events
|
||||
|
||||
|
||||
async def test_last_reported(
|
||||
hass: HomeAssistant,
|
||||
knx: KNXTestKit,
|
||||
|
@@ -111,7 +111,7 @@ async def test_switch_state(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
await knx.assert_telegram_count(0)
|
||||
|
||||
|
||||
async def test_switch_restore_and_respond(hass: HomeAssistant, knx) -> None:
|
||||
async def test_switch_restore_and_respond(hass: HomeAssistant, knx: KNXTestKit) -> None:
|
||||
"""Test restoring KNX switch state and respond to read."""
|
||||
_ADDRESS = "1/1/1"
|
||||
fake_state = State("switch.test", "on")
|
||||
|
@@ -565,25 +565,6 @@ MOCK_SUBENTRY_SENSOR_COMPONENT_LAST_RESET = {
|
||||
"entity_picture": "https://example.com/e9261f6feed443e7b7d5f3fbe2a47412",
|
||||
},
|
||||
}
|
||||
MOCK_SUBENTRY_SIREN_COMPONENT = {
|
||||
"3faf1318023c46c5aea26707eeb6f12e": {
|
||||
"platform": "siren",
|
||||
"name": "Siren",
|
||||
"entity_category": None,
|
||||
"command_topic": "test-topic",
|
||||
"state_topic": "test-topic",
|
||||
"command_template": "{{ value }}",
|
||||
"command_off_template": "{{ value }}",
|
||||
"value_template": "{{ value_json.value }}",
|
||||
"payload_off": "OFF",
|
||||
"payload_on": "ON",
|
||||
"available_tones": ["Happy hour", "Cooling alarm"],
|
||||
"support_volume_set": True,
|
||||
"support_duration": True,
|
||||
"entity_picture": "https://example.com/3faf1318023c46c5aea26707eeb6f12e",
|
||||
"optimistic": True,
|
||||
},
|
||||
}
|
||||
MOCK_SUBENTRY_SWITCH_COMPONENT = {
|
||||
"3faf1318016c46c5aea26707eeb6f12e": {
|
||||
"platform": "switch",
|
||||
@@ -717,10 +698,6 @@ MOCK_SENSOR_SUBENTRY_DATA_LAST_RESET_TEMPLATE = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SENSOR_COMPONENT_LAST_RESET,
|
||||
}
|
||||
MOCK_SIREN_SUBENTRY_DATA = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SIREN_COMPONENT,
|
||||
}
|
||||
MOCK_SWITCH_SUBENTRY_DATA = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SWITCH_COMPONENT,
|
||||
|
@@ -17,10 +17,7 @@ import voluptuous as vol
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import mqtt
|
||||
from homeassistant.components.hassio import AddonError
|
||||
from homeassistant.components.mqtt.config_flow import (
|
||||
PWD_NOT_CHANGED,
|
||||
TRANSLATION_DESCRIPTION_PLACEHOLDERS,
|
||||
)
|
||||
from homeassistant.components.mqtt.config_flow import PWD_NOT_CHANGED
|
||||
from homeassistant.components.mqtt.util import learn_more_url
|
||||
from homeassistant.config_entries import ConfigSubentry, ConfigSubentryData
|
||||
from homeassistant.const import (
|
||||
@@ -60,7 +57,6 @@ from .common import (
|
||||
MOCK_SENSOR_SUBENTRY_DATA,
|
||||
MOCK_SENSOR_SUBENTRY_DATA_LAST_RESET_TEMPLATE,
|
||||
MOCK_SENSOR_SUBENTRY_DATA_STATE_CLASS,
|
||||
MOCK_SIREN_SUBENTRY_DATA,
|
||||
MOCK_SWITCH_SUBENTRY_DATA,
|
||||
)
|
||||
|
||||
@@ -3656,41 +3652,6 @@ async def test_migrate_of_incompatible_config_entry(
|
||||
"Milk notifier Energy",
|
||||
id="sensor_total",
|
||||
),
|
||||
pytest.param(
|
||||
MOCK_SIREN_SUBENTRY_DATA,
|
||||
{"name": "Milk notifier", "mqtt_settings": {"qos": 0}},
|
||||
{"name": "Siren"},
|
||||
{},
|
||||
(),
|
||||
{
|
||||
"command_topic": "test-topic",
|
||||
"command_template": "{{ value }}",
|
||||
"state_topic": "test-topic",
|
||||
"value_template": "{{ value_json.value }}",
|
||||
"optimistic": True,
|
||||
"available_tones": ["Happy hour", "Cooling alarm"],
|
||||
"support_duration": True,
|
||||
"support_volume_set": True,
|
||||
"siren_advanced_settings": {
|
||||
"command_off_template": "{{ value }}",
|
||||
},
|
||||
},
|
||||
(
|
||||
(
|
||||
{"command_topic": "test-topic#invalid"},
|
||||
{"command_topic": "invalid_publish_topic"},
|
||||
),
|
||||
(
|
||||
{
|
||||
"command_topic": "test-topic",
|
||||
"state_topic": "test-topic#invalid",
|
||||
},
|
||||
{"state_topic": "invalid_subscribe_topic"},
|
||||
),
|
||||
),
|
||||
"Milk notifier Siren",
|
||||
id="siren",
|
||||
),
|
||||
pytest.param(
|
||||
MOCK_SWITCH_SUBENTRY_DATA,
|
||||
{"name": "Milk notifier", "mqtt_settings": {"qos": 0}},
|
||||
@@ -3796,16 +3757,12 @@ async def test_subentry_configflow(
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["errors"] == {}
|
||||
assert (
|
||||
result["description_placeholders"]
|
||||
== {
|
||||
"mqtt_device": device_name,
|
||||
"platform": component["platform"],
|
||||
"entity": entity_name,
|
||||
"url": learn_more_url(component["platform"]),
|
||||
}
|
||||
| TRANSLATION_DESCRIPTION_PLACEHOLDERS
|
||||
)
|
||||
assert result["description_placeholders"] == {
|
||||
"mqtt_device": device_name,
|
||||
"platform": component["platform"],
|
||||
"entity": entity_name,
|
||||
"url": learn_more_url(component["platform"]),
|
||||
}
|
||||
|
||||
# Process entity details step
|
||||
assert result["step_id"] == "entity_platform_config"
|
||||
@@ -3827,16 +3784,12 @@ async def test_subentry_configflow(
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["errors"] == {}
|
||||
assert (
|
||||
result["description_placeholders"]
|
||||
== {
|
||||
"mqtt_device": device_name,
|
||||
"platform": component["platform"],
|
||||
"entity": entity_name,
|
||||
"url": learn_more_url(component["platform"]),
|
||||
}
|
||||
| TRANSLATION_DESCRIPTION_PLACEHOLDERS
|
||||
)
|
||||
assert result["description_placeholders"] == {
|
||||
"mqtt_device": device_name,
|
||||
"platform": component["platform"],
|
||||
"entity": entity_name,
|
||||
"url": learn_more_url(component["platform"]),
|
||||
}
|
||||
|
||||
# Process mqtt platform config flow
|
||||
# Test an invalid mqtt user input case
|
||||
@@ -5143,16 +5096,12 @@ async def test_subentry_configflow_section_feature(
|
||||
user_input={"platform": "fan"},
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert (
|
||||
result["description_placeholders"]
|
||||
== {
|
||||
"mqtt_device": "Bla",
|
||||
"platform": "fan",
|
||||
"entity": "Bla",
|
||||
"url": learn_more_url("fan"),
|
||||
}
|
||||
| TRANSLATION_DESCRIPTION_PLACEHOLDERS
|
||||
)
|
||||
assert result["description_placeholders"] == {
|
||||
"mqtt_device": "Bla",
|
||||
"platform": "fan",
|
||||
"entity": "Bla",
|
||||
"url": learn_more_url("fan"),
|
||||
}
|
||||
|
||||
# Process entity details step
|
||||
assert result["step_id"] == "entity_platform_config"
|
||||
|
Reference in New Issue
Block a user