This commit is contained in:
Koen Kanters 2020-09-30 20:06:47 +02:00
parent a0499af62d
commit 87a1fe62cb

View File

@ -875,6 +875,7 @@ const climate = (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_heati
// retVal.discovery_payload.away_mode_state_template =
// '{{ value_json.away_mode }}';
// }
/* istanbul ignore else */
if (holdModes.length > 0) { // || indexOfAway > -1) {
retVal.discovery_payload.hold_modes = holdModes;
retVal.discovery_payload.hold_command_topic = true;
@ -2387,13 +2388,13 @@ class HomeAssistant extends Extension {
payload.hold_state_topic = stateTopic;
}
if (payload.away_mode_state_topic) {
payload.away_mode_state_topic = stateTopic;
}
// if (payload.away_mode_state_topic) {
// payload.away_mode_state_topic = stateTopic;
// }
if (payload.away_mode_command_topic) {
payload.away_mode_command_topic = `${stateTopic}/set/away_mode`;
}
// if (payload.away_mode_command_topic) {
// payload.away_mode_command_topic = `${stateTopic}/set/away_mode`;
// }
if (payload.current_temperature_topic) {
payload.current_temperature_topic = stateTopic;