Fix warnings

This commit is contained in:
Theo Arends 2021-01-26 12:45:48 +01:00
parent bc3e9bedd9
commit adf05a5a3c
1 changed files with 24 additions and 22 deletions

View File

@ -2587,21 +2587,23 @@ void MI32ShowOneMISensor(){
///////////////////////////////////////////////
// starts a completely fresh MQTT message.
// sends ONE sensor's worth of HA discovery msg
#define MI_HA_DISCOVERY_TEMPLATE PSTR("{\"availability\":[],\"device\": \
{\"identifiers\":[\"BLE%s\"],\
\"name\":\"%s\",\
\"manufacturer\":\"tas\",\
\"model\":\"%s\",\
\"via_device\":\"%s\"\
}, \
\"dev_cla\":\"%s\",\
\"expire_after\":600,\
\"json_attr_t\":\"%s\",\
\"name\":\"%s_%s\",\
\"state_topic\":\"%s\",\
\"uniq_id\":\"%s_%s\",\
\"unit_of_meas\":\"%s\",\
\"val_tpl\":\"{{ value_json.%s }}\"}")
const char MI_HA_DISCOVERY_TEMPLATE[] PROGMEM =
"{\"availability\":[],\"device\":"
"{\"identifiers\":[\"BLE%s\"],"
"\"name\":\"%s\","
"\"manufacturer\":\"tas\","
"\"model\":\"%s\","
"\"via_device\":\"%s\""
"},"
"\"dev_cla\":\"%s\","
"\"expire_after\":600,"
"\"json_attr_t\":\"%s\","
"\"name\":\"%s_%s\","
"\"state_topic\":\"%s\","
"\"uniq_id\":\"%s_%s\","
"\"unit_of_meas\":\"%s\","
"\"val_tpl\":\"{{ value_json.%s }}\"}")
void MI32DiscoveryOneMISensor(){
// don't detect half-added ones here
int numsensors = MIBLEsensors.size();