Update MQTT Home Assistant discovery to use preset mode instead of deprecated hold mode

This commit is contained in:
Ryan Wagoner 2022-04-04 18:12:50 -04:00
parent 5cd6048dd5
commit 3b86dd6a3a
2 changed files with 5 additions and 5 deletions

View file

@ -24,8 +24,8 @@ namespace OmniLinkBridge.MQTT
public string fan_mode_command_topic { get; set; } public string fan_mode_command_topic { get; set; }
public List<string> fan_modes { get; set; } = new List<string>(new string[] { "auto", "on", "cycle" }); public List<string> fan_modes { get; set; } = new List<string>(new string[] { "auto", "on", "cycle" });
public string hold_state_topic { get; set; } public string preset_mode_state_topic { get; set; }
public string hold_command_topic { get; set; } public string preset_mode_command_topic { get; set; }
public List<string> hold_modes { get; set; } = new List<string>(new string[] { "on", "vacation" }); public List<string> preset_modes { get; set; } = new List<string>(new string[] { "off", "on", "vacation" });
} }
} }

View file

@ -510,8 +510,8 @@ namespace OmniLinkBridge.MQTT
ret.fan_mode_state_topic = thermostat.ToTopic(Topic.fan_mode_state); ret.fan_mode_state_topic = thermostat.ToTopic(Topic.fan_mode_state);
ret.fan_mode_command_topic = thermostat.ToTopic(Topic.fan_mode_command); ret.fan_mode_command_topic = thermostat.ToTopic(Topic.fan_mode_command);
ret.hold_state_topic = thermostat.ToTopic(Topic.hold_state); ret.preset_mode_state_topic = thermostat.ToTopic(Topic.hold_state);
ret.hold_command_topic = thermostat.ToTopic(Topic.hold_command); ret.preset_mode_command_topic = thermostat.ToTopic(Topic.hold_command);
return ret; return ret;
} }