mirror of https://github.com/arendst/Tasmota.git
Fix HomeAssistant Temp Sensor AutoDiscovery
https://github.com/arendst/Sonoff-Tasmota/issues/4627
This commit is contained in:
parent
5f560bae13
commit
3795667f36
|
@ -458,7 +458,7 @@ void HAssAnnounceSensor(const char* sensorname, const char* subsensortype)
|
|||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), Settings.flag3.hass_short_discovery_msg?HASS_DISCOVER_SENSOR_SHORT:HASS_DISCOVER_SENSOR,
|
||||
name, state_topic, availability_topic);
|
||||
if (!strcmp_P(subsensortype, PSTR(D_JSON_HUMIDITY))) {
|
||||
if (!strcmp_P(subsensortype, PSTR(D_JSON_TEMPERATURE))) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), Settings.flag3.hass_short_discovery_msg?HASS_DISCOVER_SENSOR_TEMP_SHORT:HASS_DISCOVER_SENSOR_TEMP,
|
||||
mqtt_data, TempUnit(), sensorname);
|
||||
} else if (!strcmp_P(subsensortype, PSTR(D_JSON_HUMIDITY))) {
|
||||
|
|
Loading…
Reference in New Issue