formatting

This commit is contained in:
proddy
2022-03-28 17:49:38 +02:00
parent b9e1c0ba56
commit 3f68c0001e
2 changed files with 4 additions and 4 deletions

View File

@@ -988,7 +988,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type,
// create the topic, depending on the type and whether the device entity is writable (a command) // create the topic, depending on the type and whether the device entity is writable (a command)
// https://developers.home-assistant.io/docs/core/entity // https://developers.home-assistant.io/docs/core/entity
char topic[MQTT_TOPIC_MAX_SIZE]; char topic[MQTT_TOPIC_MAX_SIZE];
// if it's a command then we can use Number, Switch. Otherwise stick to Sensor // if it's a command then we can use Number, Switch, Select. Otherwise stick to Sensor
if (has_cmd) { if (has_cmd) {
switch (type) { switch (type) {
case DeviceValueType::INT: case DeviceValueType::INT:
@@ -996,13 +996,13 @@ void Mqtt::publish_ha_sensor_config(uint8_t type,
case DeviceValueType::SHORT: case DeviceValueType::SHORT:
case DeviceValueType::USHORT: case DeviceValueType::USHORT:
case DeviceValueType::ULONG: case DeviceValueType::ULONG:
// number - https://www.home-assistant.io/integrations/number.mqtt/ // number - https://www.home-assistant.io/integrations/number.mqtt
// https://developers.home-assistant.io/docs/core/entity/number // https://developers.home-assistant.io/docs/core/entity/number
snprintf(topic, sizeof(topic), "number/%s/%s/config", mqtt_base_.c_str(), uniq); snprintf(topic, sizeof(topic), "number/%s/%s/config", mqtt_base_.c_str(), uniq);
break; break;
case DeviceValueType::BOOL: case DeviceValueType::BOOL:
// switch - https://www.home-assistant.io/integrations/switch.mqtt/ // switch - https://www.home-assistant.io/integrations/switch.mqtt
snprintf(topic, sizeof(topic), "switch/%s/%s/config", mqtt_base_.c_str(), uniq); snprintf(topic, sizeof(topic), "switch/%s/%s/config", mqtt_base_.c_str(), uniq);
break; break;
case DeviceValueType::ENUM: case DeviceValueType::ENUM:

View File

@@ -208,7 +208,7 @@ void WebCustomizationService::device_entities(AsyncWebServerRequest * request, J
request->send(response); request->send(response);
} }
// takes a list of masked ids send from the webUI // takes a list of masked ids sent from the webUI
// saves it in the customization service // saves it in the customization service
// and updates the entity list real-time // and updates the entity list real-time
void WebCustomizationService::masked_entities(AsyncWebServerRequest * request, JsonVariant & json) { void WebCustomizationService::masked_entities(AsyncWebServerRequest * request, JsonVariant & json) {