v3.0.1 - Additional MQTT types.

This commit is contained in:
MickMake 2022-12-19 20:30:39 +11:00
parent 57c4a3e4dd
commit 6a4504f189
18 changed files with 2186 additions and 1 deletions

View File

@ -0,0 +1,141 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
code string (optional)
If defined, specifies a code to enable or disable the alarm in the frontend. Note that the code is validated locally and blocks sending MQTT messages to the remote device. For remote code validation, the code can be configured to either of the special values REMOTE_CODE (numeric code) or REMOTE_CODE_TEXT (text code). In this case, local code validation is bypassed but the frontend will still show a numeric or text code dialog. Use command_template to send the code to the remote device. Example configurations for remote code validation can be found here.
code_arm_required boolean (optional, default: true)
If true the code is required to arm the alarm. If false the code is not validated.
code_disarm_required boolean (optional, default: true)
If true the code is required to disarm the alarm. If false the code is not validated.
code_trigger_required boolean (optional, default: true)
If true the code is required to trigger the alarm. If false the code is not validated.
command_template string (optional, default: action)
The template used for the command payload. Available variables: action and code.
command_topic string REQUIRED
The MQTT topic to publish commands to change the alarm state.
device map (optional)
Information about the device this alarm panel is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Alarm)
The name of the alarm.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_arm_away string (optional, default: ARM_AWAY)
The payload to set armed-away mode on your Alarm Panel.
payload_arm_home string (optional, default: ARM_HOME)
The payload to set armed-home mode on your Alarm Panel.
payload_arm_night string (optional, default: ARM_NIGHT)
The payload to set armed-night mode on your Alarm Panel.
payload_arm_vacation string (optional, default: ARM_VACATION)
The payload to set armed-vacation mode on your Alarm Panel.
payload_arm_custom_bypass string (optional, default: ARM_CUSTOM_BYPASS)
The payload to set armed-custom-bypass mode on your Alarm Panel.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_disarm string (optional, default: DISARM)
The payload to disarm your Alarm Panel.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_trigger string (optional, default: TRIGGER)
The payload to trigger the alarm on your Alarm Panel.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
state_topic string REQUIRED
The MQTT topic subscribed to receive state updates.
unique_id string (optional)
An ID that uniquely identifies this alarm panel. If two alarm panels have the same unique ID, Home Assistant will raise an exception.
value_template template (optional)
Defines a template to extract the value.

117
mmHa/binary_sensor.txt Normal file
View File

@ -0,0 +1,117 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If availability is not defined, the binary sensor will always be considered available and its state will be on, off or unknown. If availability is defined, the binary sensor will be considered as unavailable by default and the sensors initial state will be unavailable. Must not be used together with availability.
device map (optional)
Information about the device this binary sensor is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list | map (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: 'connections': ['mac', '02:5b:26:a8:dc:12'].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class string (optional)
Sets the class of the device, changing the device state and icon that is displayed on the frontend.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
expire_after integer (optional)
If set, it defines the number of seconds after the sensors state expires, if its not updated. After expiry, the sensors state becomes unavailable. Default the sensors state never expires.
force_update boolean (optional, default: false)
Sends update events (which results in update of state objects last_changed) even if the sensors state hasnt changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on every incoming state message (not only when the sensors new state is different to the current one).
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Binary Sensor)
The name of the binary sensor.
object_id string (optional)
Used instead of name for automatic generation of entity_id
off_delay integer (optional)
For sensors that only send on state updates (like PIRs), this variable sets a delay in seconds after which the sensors state will be updated back to off.
payload_available string (optional, default: online)
The string that represents the online state.
payload_not_available string (optional, default: offline)
The string that represents the offline state.
payload_off string (optional, default: OFF)
The string that represents the off state. It will be compared to the message in the state_topic (see value_template for details)
payload_on string (optional, default: ON)
The string that represents the on state. It will be compared to the message in the state_topic (see value_template for details)
qos integer (optional, default: 0)
The maximum QoS level to be used when receiving messages.
state_topic string REQUIRED
The MQTT topic subscribed to receive sensors state.
unique_id string (optional)
An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception.
value_template string (optional)
Defines a template that returns a string to be compared to payload_on/payload_off or an empty string, in which case the MQTT message will be removed. Remove this option when payload_on and payload_off are sufficient to match your payloads (i.e no pre-processing of original message is required).

108
mmHa/button.txt Normal file
View File

@ -0,0 +1,108 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
command_template template (optional)
Defines a template to generate the payload to send to command_topic.
command_topic string (optional)
The MQTT topic to publish commands to trigger the button.
device map (optional)
Information about the device this button is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class device_class (optional, default: None)
The type/class of the button to set the icon in the frontend.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the published messages.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Button)
The name to use when displaying this button.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_press string (optional, default: PRESS)
The payload To send to trigger the button.
qos integer (optional, default: 0)
The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
unique_id string (optional)
An ID that uniquely identifies this button entity. If two buttons have the same unique ID, Home Assistant will raise an exception.

90
mmHa/camera.txt Normal file
View File

@ -0,0 +1,90 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
device map (optional)
Information about the device this camera is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": ["mac", "02:5b:26:a8:dc:12"].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received. Set to "" to disable decoding of incoming payload. Use image_encoding to enable Base64 decoding on topic.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
image_encoding string (optional, default: None)
The encoding of the image payloads received. Set to "b64" to enable base64 decoding of image payload. If not set, the image payload must be raw binary data.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies force_update of the current sensor state when a message is received on this topic.
name string (optional)
The name of the camera.
object_id string (optional)
Used instead of name for automatic generation of entity_id
topic string REQUIRED
The MQTT topic to subscribe to.
unique_id string (optional)
An ID that uniquely identifies this camera. If two cameras have the same unique ID Home Assistant will raise an exception.

246
mmHa/climate.txt Normal file
View File

@ -0,0 +1,246 @@
action_template template (optional)
A template to render the value received on the action_topic with.
action_topic string (optional)
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. Valid values: off, heating, cooling, drying, idle, fan.
aux_command_topic string (optional)
The MQTT topic to publish commands to switch auxiliary heat.
aux_state_template template (optional)
A template to render the value received on the aux_state_topic with.
aux_state_topic string (optional)
The MQTT topic to subscribe for changes of the auxiliary heat mode. If this is not set, the auxiliary heat mode works in optimistic mode (see below).
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
current_temperature_template template (optional)
A template with which the value received on current_temperature_topic will be rendered.
current_temperature_topic string (optional)
The MQTT topic on which to listen for the current temperature.
device map (optional)
Information about the device this HVAC device is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
fan_mode_command_template template (optional)
A template to render the value sent to the fan_mode_command_topic with.
fan_mode_command_topic string (optional)
The MQTT topic to publish commands to change the fan mode.
fan_mode_state_template template (optional)
A template to render the value received on the fan_mode_state_topic with.
fan_mode_state_topic string (optional)
The MQTT topic to subscribe for changes of the HVAC fan mode. If this is not set, the fan mode works in optimistic mode (see below).
fan_modes list (optional)
A list of supported fan modes.
Default: [“auto”, “low”, “medium”, “high”]
initial integer (optional, default: 21)
Set the initial target temperature.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
max_temp float (optional)
Maximum set point available.
min_temp float (optional)
Minimum set point available.
mode_command_template template (optional)
A template to render the value sent to the mode_command_topic with.
mode_command_topic string (optional)
The MQTT topic to publish commands to change the HVAC operation mode.
mode_state_template template (optional)
A template to render the value received on the mode_state_topic with.
mode_state_topic string (optional)
The MQTT topic to subscribe for changes of the HVAC operation mode. If this is not set, the operation mode works in optimistic mode (see below).
modes list (optional)
A list of supported modes. Needs to be a subset of the default values.
Default: [“auto”, “off”, “cool”, “heat”, “dry”, “fan_only”]
name string (optional, default: MQTT HVAC)
The name of the HVAC.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_off string (optional, default: OFF)
The payload that represents disabled state.
payload_on string (optional, default: ON)
The payload that represents enabled state.
power_command_topic string (optional)
The MQTT topic to publish commands to change the power state. This is useful if your device has a separate power toggle in addition to mode.
precision float (optional)
The desired precision for this device. Can be used to match your actual thermostats precision. Supported values are 0.1, 0.5 and 1.0.
Default: 0.1 for Celsius and 1.0 for Fahrenheit.
preset_mode_command_template template (optional)
Defines a template to generate the payload to send to preset_mode_command_topic.
preset_mode_command_topic string (optional)
The MQTT topic to publish commands to change the preset mode.
preset_mode_state_topic string (optional)
The MQTT topic subscribed to receive climate speed based on presets. When preset none is received or None the preset_mode will be reset.
preset_mode_value_template string (optional)
Defines a template to extract the preset_mode value from the payload received on preset_mode_state_topic.
preset_modes list (optional, default: [])
List of preset modes this climate is supporting. Common examples include eco, away, boost, comfort, home, sleep and activity.
qos integer (optional, default: 0)
The maximum QoS level to be used when receiving and publishing messages.
retain boolean (optional, default: false)
Defines if published messages should have the retain flag set.
swing_mode_command_template template (optional)
A template to render the value sent to the swing_mode_command_topic with.
swing_mode_command_topic string (optional)
The MQTT topic to publish commands to change the swing mode.
swing_mode_state_template template (optional)
A template to render the value received on the swing_mode_state_topic with.
swing_mode_state_topic string (optional)
The MQTT topic to subscribe for changes of the HVAC swing mode. If this is not set, the swing mode works in optimistic mode (see below).
swing_modes list (optional, default: [“on”, “off”])
A list of supported swing modes.
temperature_command_template template (optional)
A template to render the value sent to the temperature_command_topic with.
temperature_command_topic string (optional)
The MQTT topic to publish commands to change the target temperature.
temperature_high_command_template template (optional)
A template to render the value sent to the temperature_high_command_topic with.
temperature_high_command_topic string (optional)
The MQTT topic to publish commands to change the high target temperature.
temperature_high_state_template template (optional)
A template to render the value received on the temperature_high_state_topic with.
temperature_high_state_topic string (optional)
The MQTT topic to subscribe for changes in the target high temperature. If this is not set, the target high temperature works in optimistic mode (see below).
temperature_low_command_template template (optional)
A template to render the value sent to the temperature_low_command_topic with.
temperature_low_command_topic string (optional)
The MQTT topic to publish commands to change the target low temperature.
temperature_low_state_template template (optional)
A template to render the value received on the temperature_low_state_topic with.
temperature_low_state_topic string (optional)
The MQTT topic to subscribe for changes in the target low temperature. If this is not set, the target low temperature works in optimistic mode (see below).
temperature_state_template template (optional)
A template to render the value received on the temperature_state_topic with.
temperature_state_topic string (optional)
The MQTT topic to subscribe for changes in the target temperature. If this is not set, the target temperature works in optimistic mode (see below).
temperature_unit string (optional)
Defines the temperature unit of the device, C or F. If this is not set, the temperature unit is set to the system temperature unit.
temp_step float (optional, default: 1)
Step size for temperature set point.
unique_id string (optional)
An ID that uniquely identifies this HVAC device. If two HVAC devices have the same unique ID, Home Assistant will raise an exception.
value_template template (optional)
Default template to render the payloads on all *_state_topics with.

182
mmHa/cover.txt Normal file
View File

@ -0,0 +1,182 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to to receive birth and LWT messages from the MQTT cover device. If an availability topic is not defined, the cover availability state will always be available. If an availability topic is defined, the cover availability state will be unavailable by default. Must not be used together with availability.
command_topic string (optional)
The MQTT topic to publish commands to control the cover.
device map (optional)
Information about the device this cover is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": ["mac", "02:5b:26:a8:dc:12"].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class string (optional)
Sets the class of the device, changing the device state and icon that is displayed on the frontend.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Cover)
The name of the cover.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if switch works in optimistic mode.
Default: false if state or position topic defined, else true.
payload_available string (optional, default: online)
The payload that represents the online state.
payload_close string (optional, default: CLOSE)
The command payload that closes the cover.
payload_not_available string (optional, default: offline)
The payload that represents the offline state.
payload_open string (optional, default: OPEN)
The command payload that opens the cover.
payload_stop string (optional, default: STOP)
The command payload that stops the cover.
position_closed integer (optional, default: 0)
Number which represents closed position.
position_open integer (optional, default: 100)
Number which represents open position.
position_template string (optional)
Defines a template that can be used to extract the payload for the position_topic topic. Within the template the following variables are available: entity_id, position_open; position_closed; tilt_min; tilt_max. The entity_id can be used to reference the entitys attributes with help of the states template function;
position_topic string (optional)
The MQTT topic subscribed to receive cover position messages.
qos integer (optional, default: 0)
The maximum QoS level to be used when receiving and publishing messages.
retain boolean (optional, default: false)
Defines if published messages should have the retain flag set.
set_position_template string (optional)
Defines a template to define the position to be sent to the set_position_topic topic. Incoming position value is available for use in the template {{ position }}. Within the template the following variables are available: entity_id, position, the target position in percent; position_open; position_closed; tilt_min; tilt_max. The entity_id can be used to reference the entitys attributes with help of the states template function;
set_position_topic string (optional)
The MQTT topic to publish position commands to. You need to set position_topic as well if you want to use 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.
state_closed string (optional, default: closed)
The payload that represents the closed state.
state_closing string (optional, default: closing)
The payload that represents the closing state.
state_open string (optional, default: open)
The payload that represents the open state.
state_opening string (optional, default: opening)
The payload that represents the opening state.
state_stopped string (optional, default: stopped)
The payload that represents the stopped state (for covers that do not report open/closed state).
state_topic string (optional)
The MQTT topic subscribed to receive cover state messages. State topic can only read (open, opening, closed, closing or stopped) state.
tilt_closed_value integer (optional, default: 0)
The value that will be sent on a close_cover_tilt command.
tilt_command_template string (optional)
Defines a template that can be used to extract the payload for the tilt_command_topic topic. Within the template the following variables are available: entity_id, tilt_position, the target tilt position in percent; position_open; position_closed; tilt_min; tilt_max. The entity_id can be used to reference the entitys attributes with help of the states template function;
tilt_command_topic string (optional)
The MQTT topic to publish commands to control the cover tilt.
tilt_max integer (optional, default: 100)
The maximum tilt value.
tilt_min integer (optional, default: 0)
The minimum tilt value.
tilt_opened_value integer (optional, default: 100)
The value that will be sent on an open_cover_tilt command.
tilt_optimistic boolean (optional)
Flag that determines if tilt works in optimistic mode.
Default: true if tilt_status_topic is not defined, else false
tilt_status_template string (optional)
Defines a template that can be used to extract the payload for the tilt_status_topic topic. Within the template the following variables are available: entity_id, position_open; position_closed; tilt_min; tilt_max. The entity_id can be used to reference the entitys attributes with help of the states template function;
tilt_status_topic string (optional)
The MQTT topic subscribed to receive tilt status update values.
unique_id string (optional)
An ID that uniquely identifies this cover. If two covers have the same unique ID, Home Assistant will raise an exception.
value_template string (optional)
Defines a template that can be used to extract the payload for the state_topic topic.

51
mmHa/create.sh Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/perl -n
if (m/^(\w+) (\w+) (\(.*?\))/) {
$n=$j=$1;
$t=$2;
$o=$d=$3;
$n=~s/_/ /g;
$n=~s/\b(\w)/\U$1/g;
$n=~s/ //g;
if ($t eq "map") {
$t = "device";
} elsif ($t eq "device_class") {
$t = "DeviceClass";
}
$t = ucfirst($t);
$d=~s/^.*?default:\s*(\w+).*/ default:"$1"/;
if ($d eq "(optional)") {
$d = "";
}
if ($o eq "(optional)") {
$o = "";
}
$p = sprintf("$n $t \x60json:\"$j,omitempty\"$d\x60\n");
# printf("$n $t \x60json:\"$j,omitempty\"$d\x60\t// $o\n// $j $t $o\n");
} elsif (m/^(\w+) (\w+) (REQUIRED)/) {
$n=$j=$1;
$t=$2;
$o=$3;
$n=~s/_/ /g;
$n=~s/\b(\w)/\U$1/g;
$n=~s/ //g;
$t = ucfirst($t);
$p = sprintf("$n $t \x60json:\"$j,omitempty\" required:\"true\"\x60\n");
# printf("$n $t \x60json:\"$j,omitempty\" required:\"true\"\x60\n// $j $t $o\n");
} elsif (/^\s+$/) {
printf("\n");
} else {
printf("// $_$p");
$p = "";
}

View File

@ -1 +0,0 @@
package mmHa

99
mmHa/device_tracker.txt Normal file
View File

@ -0,0 +1,99 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
device map (optional)
Information about the device this device tracker is a part of that ties it into the device registry. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list | map (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: 'connections': ['mac', '02:5b:26:a8:dc:12'].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as device_tracker attributes. Usage example can be found in MQTT sensor documentation.
name string (optional)
The name of the MQTT device_tracker.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_available string (optional, default: online)
The payload that represents the available state.
payload_home string (optional, default: home)
The payload value that represents the home state for the device.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_not_home string (optional, default: not_home)
The payload value that represents the not_home state for the device.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
source_type string (optional)
Attribute of a device tracker that affects state when being used to track a person. Valid options are gps, router, bluetooth, or bluetooth_le.
state_topic string REQUIRED
The MQTT topic subscribed to receive device tracker state changes.
unique_id string (optional)
An ID that uniquely identifies this device_tracker. If two device_trackers have the same unique ID, Home Assistant will raise an exception.
value_template template (optional)
Defines a template that returns a device tracker state.

51
mmHa/device_trigger.txt Normal file
View File

@ -0,0 +1,51 @@
automation_type string REQUIRED
The type of automation, must be trigger.
payload string (optional)
Optional payload to match the payload being sent over the topic.
qos integer (optional, default: 0)
The maximum QoS level to be used when receiving messages.
topic string REQUIRED
The MQTT topic subscribed to receive trigger events.
type string REQUIRED
The type of the trigger, e.g. button_short_press. Entries supported by the frontend: button_short_press, button_short_release, button_long_press, button_long_release, button_double_press, button_triple_press, button_quadruple_press, button_quintuple_press. If set to an unsupported value, will render as subtype type, e.g. button_1 spammed with type set to spammed and subtype set to button_1
subtype string REQUIRED
The subtype of the trigger, e.g. button_1. Entries supported by the frontend: turn_on, turn_off, button_1, button_2, button_3, button_4, button_5, button_6. If set to an unsupported value, will render as subtype type, e.g. left_button pressed with type set to button_short_press and subtype set to left_button
device map REQUIRED
Information about the device this device trigger is a part of to tie it into the device registry. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list | map (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: 'connections': ['mac', '02:5b:26:a8:dc:12'].
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
value_template template (optional)
Defines a template to extract the value.

175
mmHa/fan.txt Normal file
View File

@ -0,0 +1,175 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
command_template template (optional)
Defines a template to generate the payload to send to command_topic.
command_topic string REQUIRED
The MQTT topic to publish commands to change the fan state.
device map (optional)
Information about the device this fan is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list | map (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Fan)
The name of the fan.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if fan works in optimistic mode
Default: true if no state topic defined, else false.
oscillation_command_template template (optional)
Defines a template to generate the payload to send to oscillation_command_topic.
oscillation_command_topic string (optional)
The MQTT topic to publish commands to change the oscillation state.
oscillation_state_topic string (optional)
The MQTT topic subscribed to receive oscillation state updates.
oscillation_value_template string (optional)
Defines a template to extract a value from the oscillation.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_off string (optional, default: OFF)
The payload that represents the stop state.
payload_on string (optional, default: ON)
The payload that represents the running state.
payload_oscillation_off string (optional, default: oscillate_off)
The payload that represents the oscillation off state.
payload_oscillation_on string (optional, default: oscillate_on)
The payload that represents the oscillation on state.
payload_reset_percentage string (optional, default: None)
A special payload that resets the percentage state attribute to None when received at the percentage_state_topic.
payload_reset_preset_mode string (optional, default: None)
A special payload that resets the preset_mode state attribute to None when received at the preset_mode_state_topic.
percentage_command_template template (optional)
Defines a template to generate the payload to send to percentage_command_topic.
percentage_command_topic string (optional)
The MQTT topic to publish commands to change the fan speed state based on a percentage.
percentage_state_topic string (optional)
The MQTT topic subscribed to receive fan speed based on percentage.
percentage_value_template string (optional)
Defines a template to extract the percentage value from the payload received on percentage_state_topic.
preset_mode_command_template template (optional)
Defines a template to generate the payload to send to preset_mode_command_topic.
preset_mode_command_topic string (optional)
The MQTT topic to publish commands to change the preset mode.
preset_mode_state_topic string (optional)
The MQTT topic subscribed to receive fan speed based on presets.
preset_mode_value_template string (optional)
Defines a template to extract the preset_mode value from the payload received on preset_mode_state_topic.
preset_modes list (optional, default: [])
List of preset modes this fan is capable of running at. Common examples include auto, smart, whoosh, eco and breeze.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
retain boolean (optional, default: true)
If the published message should have the retain flag on or not.
speed_range_max integer (optional, default: 100)
The maximum of numeric output range (representing 100 %). The number of speeds within the speed_range / 100 will determine the percentage_step.
speed_range_min integer (optional, default: 1)
The minimum of numeric output range (off not included, so speed_range_min - 1 represents 0 %). The number of speeds within the speed_range / 100 will determine the percentage_step.
state_topic string (optional)
The MQTT topic subscribed to receive state updates.
state_value_template string (optional)
Defines a template to extract a value from the state.
unique_id string (optional)
An ID that uniquely identifies this fan. If two fans have the same unique ID, Home Assistant will raise an exception.

160
mmHa/humidifier.txt Normal file
View File

@ -0,0 +1,160 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
command_template template (optional)
Defines a template to generate the payload to send to command_topic.
command_topic string REQUIRED
The MQTT topic to publish commands to change the humidifier state.
device map (optional)
Information about the device this humidifier is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list | map (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class string (optional, default: humidifier)
The device class of the MQTT device. Must be either humidifier or dehumidifier.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
max_humidity integer (optional, default: 100)
The minimum target humidity percentage that can be set.
min_humidity integer (optional, default: 0)
The maximum target humidity percentage that can be set.
name string (optional, default: MQTT humidifier)
The name of the humidifier.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if humidifier works in optimistic mode
Default: true if no state topic defined, else false.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_off string (optional, default: OFF)
The payload that represents the stop state.
payload_on string (optional, default: ON)
The payload that represents the running state.
payload_reset_humidity string (optional, default: None)
A special payload that resets the target_humidity state attribute to None when received at the target_humidity_state_topic.
payload_reset_mode string (optional, default: None)
A special payload that resets the mode state attribute to None when received at the mode_state_topic.
target_humidity_command_template template (optional)
Defines a template to generate the payload to send to target_humidity_command_topic.
target_humidity_command_topic string REQUIRED
The MQTT topic to publish commands to change the humidifier target humidity state based on a percentage.
target_humidity_state_topic string (optional)
The MQTT topic subscribed to receive humidifier target humidity.
target_humidity_state_template string (optional)
Defines a template to extract a value for the humidifier target_humidity state.
mode_command_template template (optional)
Defines a template to generate the payload to send to mode_command_topic.
mode_command_topic string (optional)
The MQTT topic to publish commands to change the mode on the humidifier. This attribute ust be configured together with the modes attribute.
mode_state_topic string (optional)
The MQTT topic subscribed to receive the humidifier mode.
mode_state_template string (optional)
Defines a template to extract a value for the humidifier mode state.
modes list (optional, default: [])
List of available modes this humidifier is capable of running at. Common examples include normal, eco, away, boost, comfort, home, sleep, auto and baby. These examples offer built-in translations but other custom modes are allowed as well. This attribute ust be configured together with the mode_command_topic attribute.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
retain boolean (optional, default: true)
If the published message should have the retain flag on or not.
state_topic string (optional)
The MQTT topic subscribed to receive state updates.
state_value_template string (optional)
Defines a template to extract a value from the state.
unique_id string (optional)
An ID that uniquely identifies this humidifier. If two humidifiers have the same unique ID, Home Assistant will raise an exception.

235
mmHa/light.txt Normal file
View File

@ -0,0 +1,235 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
brightness_command_topic string (optional)
The MQTT topic to publish commands to change the lights brightness.
brightness_command_template string (optional)
Defines a template to compose message which will be sent to brightness_command_topic. Available variables: value.
brightness_scale integer (optional, default: 255)
Defines the maximum brightness value (i.e., 100%) of the MQTT device.
brightness_state_topic string (optional)
The MQTT topic subscribed to receive brightness state updates.
brightness_value_template string (optional)
Defines a template to extract the brightness value.
color_mode_state_topic string (optional)
The MQTT topic subscribed to receive color mode updates. If this is not configured, color_mode will be automatically set according to the last received valid color or color temperature
color_mode_value_template string (optional)
Defines a template to extract the color mode.
color_temp_command_template string (optional)
Defines a template to compose message which will be sent to color_temp_command_topic. Available variables: value.
color_temp_command_topic string (optional)
The MQTT topic to publish commands to change the lights color temperature state. The color temperature command slider has a range of 153 to 500 mireds (micro reciprocal degrees).
color_temp_state_topic string (optional)
The MQTT topic subscribed to receive color temperature state updates.
color_temp_value_template string (optional)
Defines a template to extract the color temperature value.
command_topic string REQUIRED
The MQTT topic to publish commands to change the switch state.
device map (optional)
Information about the device this light is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
effect_command_topic string (optional)
The MQTT topic to publish commands to change the lights effect state.
effect_command_template string (optional)
Defines a template to compose message which will be sent to effect_command_topic. Available variables: value.
effect_list string | list (optional)
The list of effects the light supports.
effect_state_topic string (optional)
The MQTT topic subscribed to receive effect state updates.
effect_value_template string (optional)
Defines a template to extract the effect value.
hs_command_topic string (optional)
The MQTT topic to publish commands to change the lights 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.
hs_state_topic string (optional)
The MQTT topic subscribed to receive color state updates in HS format. Note: Brightness is received separately in the brightness_state_topic.
hs_value_template string (optional)
Defines a template to extract the HS value.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
max_mireds integer (optional)
The maximum color temperature in mireds.
min_mireds integer (optional)
The minimum color temperature in mireds.
name string (optional, default: MQTT Light)
The name of the light.
object_id string (optional)
Used instead of name for automatic generation of entity_id
on_command_type string (optional)
Defines when on 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 boolean (optional)
Flag that defines if switch works in optimistic mode.
Default: true if no state topic defined, else false.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_off string (optional, default: OFF)
The payload that represents disabled state.
payload_on string (optional, default: ON)
The payload that represents enabled state.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
rgb_command_template string (optional)
Defines a template to compose message which will be sent to rgb_command_topic. Available variables: red, green and blue.
rgb_command_topic string (optional)
The MQTT topic to publish commands to change the lights RGB state.
rgb_state_topic string (optional)
The MQTT topic subscribed to receive RGB state updates. The expected payload is the RGB values separated by commas, for example, 255,0,127.
rgb_value_template string (optional)
Defines a template to extract the RGB value.
rgbw_command_template string (optional)
Defines a template to compose message which will be sent to rgbw_command_topic. Available variables: red, green, blue and white.
rgbw_command_topic string (optional)
The MQTT topic to publish commands to change the lights RGBW state.
rgbw_state_topic string (optional)
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.
rgbw_value_template string (optional)
Defines a template to extract the RGBW value.
rgbww_command_template string (optional)
Defines a template to compose message which will be sent to rgbww_command_topic. Available variables: red, green, blue, cold_white and warm_white.
rgbww_command_topic string (optional)
The MQTT topic to publish commands to change the lights RGBWW state.
rgbww_state_topic string (optional)
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.
rgbww_value_template string (optional)
Defines a template to extract the RGBWW value.
schema string (optional, default: default)
The schema to use. Must be default or omitted to select the default schema.
state_topic string (optional)
The MQTT topic subscribed to receive state updates.
state_value_template string (optional)
Defines a template to extract the state value. The template should match the payload on and off values, so if your light uses power on to turn on, your state_value_template string should return power on when the switch is on. For example if the message is just on, your state_value_template should be power .
unique_id string (optional)
An ID that uniquely identifies this light. If two lights have the same unique ID, Home Assistant will raise an exception.
white_command_topic string (optional)
The MQTT topic to publish commands to change the light to white mode with a given brightness.
white_scale integer (optional, default: 255)
Defines the maximum white level (i.e., 100%) of the MQTT device.
xy_command_topic string (optional)
The MQTT topic to publish commands to change the lights XY state.
xy_state_topic string (optional)
The MQTT topic subscribed to receive XY state updates.
xy_value_template string (optional)
Defines a template to extract the XY value.

124
mmHa/lock.txt Normal file
View File

@ -0,0 +1,124 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
command_topic string REQUIRED
The MQTT topic to publish commands to change the lock state.
device map (optional)
Information about the device this lock is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic. Usage example can be found in MQTT sensor documentation.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in MQTT sensor documentation.
name string (optional, default: MQTT Lock)
The name of the lock.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if lock works in optimistic mode.
Default: true if no state_topic defined, else false.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_lock string (optional, default: LOCK)
The payload sent to the lock to lock it.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_unlock string (optional, default: UNLOCK)
The payload sent to the lock to unlock it.
payload_open string (optional, default: OPEN)
The payload sent to the lock to open it.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
state_locked string (optional, default: LOCKED)
The payload sent to by the lock when its locked.
state_topic string (optional)
The MQTT topic subscribed to receive state updates.
state_unlocked string (optional, default: UNLOCKED)
The payload sent to by the lock when its unlocked.
unique_id string (optional)
An ID that uniquely identifies this lock. If two locks have the same unique ID, Home Assistant will raise an exception.
value_template string (optional)
Defines a template to extract a value from the payload.

121
mmHa/number.txt Normal file
View File

@ -0,0 +1,121 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
command_template template (optional)
Defines a template to generate the payload to send to command_topic.
command_topic string REQUIRED
The MQTT topic to publish commands to change the number.
device map (optional)
Information about the device this Number is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": ["mac", "02:5b:26:a8:dc:12"].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class device_class (optional, default: None)
The type/class of the number.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as number attributes. Implies force_update of the current number state when a message is received on this topic.
min float (optional, default: 1)
Minimum value.
max float (optional, default: 100)
Maximum value.
mode string (optional, default: “auto”)
Control how the number should be displayed in the UI. Can be set to box or slider to force a display mode.
name string (optional)
The name of the Number.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if number works in optimistic mode.
Default: true if no state_topic defined, else false.
payload_reset string (optional, default: “None”)
A special payload that resets the state to None when received on the state_topic.
qos integer (optional, default: 0)
The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
state_topic string (optional)
The MQTT topic subscribed to receive number values.
step float (optional, default: 1)
Step value. Smallest value 0.001.
unique_id string (optional)
An ID that uniquely identifies this Number. If two Numbers have the same unique ID Home Assistant will raise an exception.
unit_of_measurement string (optional)
Defines the unit of measurement of the sensor, if any.
value_template template (optional)
Defines a template to extract the value.

60
mmHa/scene.txt Normal file
View File

@ -0,0 +1,60 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
command_topic string (optional)
The MQTT topic to publish payload_on to activate the scene.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the scene.
name string (optional, default: MQTT Scene)
The name to use when displaying this scene.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
payload_on string (optional, default: ON)
The payload that will be sent to command_topic when activating the MQTT scene.
qos integer (optional, default: 0)
The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
unique_id string (optional)
An ID that uniquely identifies this scene entity. If two scenes have the same unique ID, Home Assistant will raise an exception.

109
mmHa/select.txt Normal file
View File

@ -0,0 +1,109 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with availability.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
command_template template (optional)
Defines a template to generate the payload to send to command_topic.
command_topic string REQUIRED
The MQTT topic to publish commands to change the selected option.
device map (optional)
Information about the device this Select is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": ["mac", "02:5b:26:a8:dc:12"].
hw_version string (optional)
The hardware version of the device.
identifiers list | string (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received and published messages. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as entity attributes. Implies force_update of the current select state when a message is received on this topic.
name string (optional)
The name of the Select.
object_id string (optional)
Used instead of name for automatic generation of entity_id
optimistic boolean (optional)
Flag that defines if the select works in optimistic mode.
Default: true if no state_topic defined, else false.
options list REQUIRED
List of options that can be selected. An empty list or a list with a single item is allowed.
qos integer (optional, default: 0)
The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
retain boolean (optional, default: false)
If the published message should have the retain flag on or not.
state_topic string (optional)
The MQTT topic subscribed to receive update of the selected option.
unique_id string (optional)
An ID that uniquely identifies this Select. If two Selects have the same unique ID Home Assistant will raise an exception.
value_template template (optional)
Defines a template to extract the value.

117
mmHa/sensor.txt Normal file
View File

@ -0,0 +1,117 @@
availability list (optional)
A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with availability_topic.
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
topic string REQUIRED
An MQTT topic subscribed to receive availability (online/offline) updates.
value_template template (optional)
Defines a template to extract devices availability from the topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_mode string (optional, default: latest)
When availability is configured, this controls the conditions needed to set the entity to available. Valid entries are all, any, and latest. If set to all, payload_available must be received on all configured availability topics before the entity is marked as online. If set to any, payload_available must be received on at least one configured availability topic before the entity is marked as online. If set to latest, the last payload_available or payload_not_available received on any configured availability topic controls the availability.
availability_template template (optional)
Defines a template to extract devices availability from the availability_topic. To determine the devicess availability result of this template will be compared to payload_available and payload_not_available.
availability_topic string (optional)
The MQTT topic subscribed to receive availability (online/offline) updates.
device map (optional)
Information about the device this sensor is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set. At least one of identifiers or connections must be present to identify the device.
configuration_url string (optional)
A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link.
connections list (optional)
A list of connections of the device to the outside world as a list of tuples [connection_type, connection_identifier]. For example the MAC address of a network interface: "connections": [["mac", "02:5b:26:a8:dc:12"]].
hw_version string (optional)
The hardware version of the device.
identifiers string | list (optional)
A list of IDs that uniquely identify the device. For example a serial number.
manufacturer string (optional)
The manufacturer of the device.
model string (optional)
The model of the device.
name string (optional)
The name of the device.
suggested_area string (optional)
Suggest an area if the device isnt in one yet.
sw_version string (optional)
The firmware version of the device.
via_device string (optional)
Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant.
device_class device_class (optional, default: None)
The type/class of the sensor to set the icon in the frontend.
enabled_by_default boolean (optional, default: true)
Flag which defines if the entity should be enabled when first added.
encoding string (optional, default: utf-8)
The encoding of the payloads received. Set to "" to disable decoding of incoming payload.
entity_category string (optional, default: None)
The category of the entity.
expire_after integer (optional, default: 0)
If set, it defines the number of seconds after the sensors state expires, if its not updated. After expiry, the sensors state becomes unavailable. Default the sensors state never expires.
force_update boolean (optional, default: false)
Sends update events even if the value hasnt changed. Useful if you want to have meaningful value graphs in history.
icon icon (optional)
Icon for the entity.
json_attributes_template template (optional)
Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic.
json_attributes_topic string (optional)
The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies force_update of the current sensor state when a message is received on this topic.
last_reset_value_template string (optional)
Defines a template to extract the last_reset. Available variables: entity_id. The entity_id can be used to reference the entitys attributes.
name string (optional, default: MQTT Sensor)
The name of the MQTT sensor.
object_id string (optional)
Used instead of name for automatic generation of entity_id
payload_available string (optional, default: online)
The payload that represents the available state.
payload_not_available string (optional, default: offline)
The payload that represents the unavailable state.
qos integer (optional, default: 0)
The maximum QoS level of the state topic.
state_class string (optional, default: None)
The state_class of the sensor.
state_topic string REQUIRED
The MQTT topic subscribed to receive sensor values.
unique_id string (optional)
An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception.
unit_of_measurement string (optional)
Defines the units of measurement of the sensor, if any.
value_template template (optional)
Defines a template to extract the value. If the template throws an error, the current state will be used instead.