From 5f0604d71d616d049bf9663311be196a92e0b654 Mon Sep 17 00:00:00 2001 From: dhzl84 Date: Mon, 19 Nov 2018 13:04:07 +0100 Subject: [PATCH] add example for climate device (#7563) based on 0.81.6 current_temperature_template has no abbreviation according to the docs --- source/_docs/mqtt/discovery.markdown | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/source/_docs/mqtt/discovery.markdown b/source/_docs/mqtt/discovery.markdown index f4d390e7911..7fb5bd48885 100644 --- a/source/_docs/mqtt/discovery.markdown +++ b/source/_docs/mqtt/discovery.markdown @@ -244,3 +244,41 @@ Setting up a switch using topic prefix and abbreviated configuration variable na - Command topic: `homeassistant/switch/irrigation/set` - State topic: `homeassistant/switch/irrigation/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. + +- Configuration topic: `homeassistant/climate/livingroom/config` +- Configuration payload: + +```yaml +{ + "name":"Livingroom", + "dev_cla":"climate", + "mode_cmd_t":"homeassistant/climate/livingroom/thermostatModeCmd", + "mode_stat_t":"homeassistant/climate/livingroom/state", + "mode_stat_tpl":"{{value_json.mode}}", + "avty_t":"homeassistant/climate/livingroom/available", + "pl_avail":"online", + "pl_not_avail":"offline", + "temp_cmd_t":"homeassistant/climate/livingroom/targetTempCmd", + "temp_stat_t":"homeassistant/climate/livingroom/state", + "temp_stat_tpl":"{{value_json.target_temp}}", + "curr_temp_t":"homeassistant/climate/livingroom/state", + "current_temperature_template":"{{value_json.current_temp}}", + "min_temp":"15", + "max_temp":"25", + "temp_step":"0.5", + "modes":["off", "heat"] +} +``` + +- State topic: `homeassistant/climate/livingroom/state` +- State payload: + +```yaml +{ + "mode":"off", + "target_temp":"21.50", + "current_temp":"23.60", +} +```