add is_system to analog sensor so internal sensors cannot be removed

This commit is contained in:
proddy
2025-11-08 16:30:40 +01:00
parent 3fd05c8eb7
commit dc838639b2
7 changed files with 62 additions and 43 deletions

View File

@@ -143,6 +143,7 @@ void WebDataService::sensor_data(AsyncWebServerRequest * request) {
obj["o"] = sensor.offset();
obj["f"] = sensor.factor();
obj["t"] = sensor.type();
obj["s"] = sensor.is_system();
if (sensor.type() != AnalogSensor::AnalogType::NOTUSED) {
obj["v"] = Helpers::transformNumFloat(sensor.value()); // is optional and is a float