mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 16:56:35 +00:00
usermods/sensors_to_mqtt: Fix char type
This commit is contained in:
parent
48372bcd91
commit
0233daeda2
@ -21,7 +21,7 @@ private:
|
|||||||
float SensorPressure = 0;
|
float SensorPressure = 0;
|
||||||
float SensorTemperature = 0;
|
float SensorTemperature = 0;
|
||||||
float SensorHumidity = 0;
|
float SensorHumidity = 0;
|
||||||
char *SensorIaq = "Unknown";
|
const char *SensorIaq = "Unknown";
|
||||||
String mqttTemperatureTopic = "";
|
String mqttTemperatureTopic = "";
|
||||||
String mqttHumidityTopic = "";
|
String mqttHumidityTopic = "";
|
||||||
String mqttPressureTopic = "";
|
String mqttPressureTopic = "";
|
||||||
@ -115,7 +115,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Credits: Bouke_Regnerus @ https://community.home-assistant.io/t/example-indoor-air-quality-text-sensor-using-ccs811-sensor/125854
|
* Credits: Bouke_Regnerus @ https://community.home-assistant.io/t/example-indoor-air-quality-text-sensor-using-ccs811-sensor/125854
|
||||||
*/
|
*/
|
||||||
char *_getIaqIndex(float humidity, int tvoc, int eco2)
|
const char *_getIaqIndex(float humidity, int tvoc, int eco2)
|
||||||
{
|
{
|
||||||
int iaq_index = 0;
|
int iaq_index = 0;
|
||||||
|
|
||||||
@ -214,6 +214,7 @@ private:
|
|||||||
{
|
{
|
||||||
return "Excellent";
|
return "Excellent";
|
||||||
}
|
}
|
||||||
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user