mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Small corretions (#8813)
Found error in examples for: - Setting up a sensor with multiple measurement values - Setting up a switch using topic prefix and abbreviated configuration variable names
This commit is contained in:
parent
ea5ed13255
commit
7b01a746b5
@ -264,9 +264,9 @@ $ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/set" -m
|
||||
Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions.
|
||||
|
||||
- Configuration topic no1: `homeassistant/sensor/sensorBedroomT/config`
|
||||
- Configuration payload no1: `{"device_class": "sensor", "name": "Temperature", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "°C", "value_template": "{% raw %}{{ value_json.temperature}}{% endraw %}" }`
|
||||
- Configuration payload no1: `{"device_class": "temperature", "name": "Temperature", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "°C", "value_template": "{% raw %}{{ value_json.temperature}}{% endraw %}" }`
|
||||
- Configuration topic no2: `homeassistant/sensor/sensorBedroomH/config`
|
||||
- Configuration payload no2: `{"device_class": "sensor", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }`
|
||||
- Configuration payload no2: `{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }`
|
||||
- Common state payload: `{ "temperature": 23.20, "humidity": 43.70 }`
|
||||
|
||||
Setting up a switch using topic prefix and abbreviated configuration variable names to reduce payload length.
|
||||
@ -274,7 +274,7 @@ Setting up a switch using topic prefix and abbreviated configuration variable na
|
||||
- Configuration topic: `homeassistant/switch/irrigation/config`
|
||||
- Command topic: `homeassistant/switch/irrigation/set`
|
||||
- State topic: `homeassistant/switch/irrigation/state`
|
||||
- Payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", , "stat_t": "~/state"}`
|
||||
- Payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", "stat_t": "~/state"}`
|
||||
|
||||
Setting up a climate component (heat only) with abbreviated configuration variable names to reduce payload length.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user