mirror of https://github.com/arendst/Tasmota.git
skip shutter tilt discovery if tilting is unconfigured
This commit is contained in:
parent
fea4d3ec93
commit
17066e404c
|
@ -1042,8 +1042,10 @@ void HAssAnnounceShutters(void)
|
|||
GetTopic_P(stemp2, CMND, TasmotaGlobal.mqtt_topic, PSTR("ShutterPosition"));
|
||||
TryResponseAppend_P(HASS_DISCOVER_SHUTTER_POS, stemp1, i + 1, stemp2, i + 1);
|
||||
|
||||
GetTopic_P(stemp1, CMND, TasmotaGlobal.mqtt_topic, PSTR("ShutterTilt"));
|
||||
TryResponseAppend_P(HASS_DISCOVER_SHUTTER_TILT, stemp1, i + 1, Settings->shutter_tilt_config[3][i], Settings->shutter_tilt_config[4][i]);
|
||||
if (Settings->shutter_tilt_config[3][i] != Settings->shutter_tilt_config[4][i]) {
|
||||
GetTopic_P(stemp1, CMND, TasmotaGlobal.mqtt_topic, PSTR("ShutterTilt"));
|
||||
TryResponseAppend_P(HASS_DISCOVER_SHUTTER_TILT, stemp1, i + 1, Settings->shutter_tilt_config[3][i], Settings->shutter_tilt_config[4][i]);
|
||||
}
|
||||
|
||||
TryResponseAppend_P(HASS_DISCOVER_DEVICE_INFO_SHORT, unique_id, ESP_getChipId());
|
||||
TryResponseAppend_P(PSTR("}"));
|
||||
|
|
Loading…
Reference in New Issue