1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-27 21:23:48 +00:00

MQTT climate features (#913)

* mqtt_climate: add action support

* mqtt_climate: add fan and swing mode support

* mqtt_climate: reduce length of discovery payload by using abbreviations

https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/mqtt/abbreviations.py
This commit is contained in:
puuu
2020-02-09 21:20:56 +09:00
committed by GitHub
parent 7721049ed7
commit 1d136ab0df
2 changed files with 162 additions and 11 deletions

View File

@@ -30,6 +30,11 @@ class MQTTClimateComponent : public mqtt::MQTTComponent {
MQTT_COMPONENT_CUSTOM_TOPIC(target_temperature_high, command)
MQTT_COMPONENT_CUSTOM_TOPIC(away, state)
MQTT_COMPONENT_CUSTOM_TOPIC(away, command)
MQTT_COMPONENT_CUSTOM_TOPIC(action, state)
MQTT_COMPONENT_CUSTOM_TOPIC(fan_mode, state)
MQTT_COMPONENT_CUSTOM_TOPIC(fan_mode, command)
MQTT_COMPONENT_CUSTOM_TOPIC(swing_mode, state)
MQTT_COMPONENT_CUSTOM_TOPIC(swing_mode, command)
protected:
std::string friendly_name() const override;