Skip to content

Commit

Permalink
Merge pull request #4629 from ascillato/patch-1
Browse files Browse the repository at this point in the history
Fix HomeAssistant Temp Sensor AutoDiscovery
  • Loading branch information
ascillato2 authored Dec 15, 2018
2 parents 5f560ba + 3795667 commit 6d56509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonoff/xdrv_12_home_assistant.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit 6d56509

Please sign in to comment.