mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 21:55:43 +00:00
new hass discovery case fix
This commit is contained in:
@ -219,6 +219,9 @@ HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, char* payload
|
||||
case VOLTAGE_SENSOR:
|
||||
sprintf(g_hassBuffer, "%s Voltage", CFG_GetShortDeviceName());
|
||||
break;
|
||||
default:
|
||||
sprintf(g_hassBuffer, "%s %i", CFG_GetShortDeviceName(), index);
|
||||
break;
|
||||
}
|
||||
cJSON_AddStringToObject(info->root, "name", g_hassBuffer);
|
||||
cJSON_AddStringToObject(info->root, "~", CFG_GetMQTTClientId()); //base topic
|
||||
|
||||
Reference in New Issue
Block a user