From 062f45440663b431d6213d2854c17027787c9269 Mon Sep 17 00:00:00 2001 From: Stefan Triller Date: Wed, 10 Nov 2021 17:06:45 +0100 Subject: [PATCH] [mqtt.homeassistant] Fix MQTT Vacuum serialization names (#11550) While integrating the review comments, I did not remember that some variable names are written as they are because they result from some deserialization. This small PR fixes this. Signed-off-by: Stefan Triller --- .../mqtt/homeassistant/internal/component/Vacuum.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Vacuum.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Vacuum.java index f84abc36cd..b999380fa5 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Vacuum.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/Vacuum.java @@ -24,6 +24,8 @@ import org.openhab.binding.mqtt.generic.values.NumberValue; import org.openhab.binding.mqtt.generic.values.TextValue; import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractChannelConfiguration; +import com.google.gson.annotations.SerializedName; + /** * A MQTT vacuum, following the https://www.home-assistant.io/components/vacuum.mqtt/ specification. * @@ -69,16 +71,24 @@ public class Vacuum extends AbstractComponent { super("MQTT Vacuum"); } + @SerializedName("command_topic") protected @Nullable String commandTopic; + @SerializedName("state_topic") protected String stateTopic = ""; + @SerializedName("send_command_topic") protected @Nullable String sendCommandTopic; // for custom_command // [start, pause, stop, return_home, battery, status, locate, clean_spot, fan_speed, send_command] + @SerializedName("supported_features") protected String[] supportedFeatures = new String[] {}; + @SerializedName("set_fan_speed_topic") protected @Nullable String setFanSpeedTopic; + @SerializedName("fan_speed_list") protected String[] fanSpeedList = new String[] {}; + @SerializedName("json_attributes_topic") protected @Nullable String jsonAttributesTopic; + @SerializedName("json_attributes_template") protected @Nullable String jsonAttributesTemplate; } -- 2.47.3