use uppercase ON/OFF when reading contact sensor type - it aligns with home assistant

This commit is contained in:
Nicu Hodos 2025-10-02 16:34:51 +02:00
parent f245443a4d
commit 82df106df1

View File

@ -24,7 +24,7 @@ bool buildSensorJson(unsigned long value, JsonDocument& jsonDoc) {
sensor["humidity"] = (float)GET_HUMIDITY(value) / 10;
break;
case SensorType::CONTACT:
sensor["state"] = GET_STATE(value) ? "on" : "off";
sensor["state"] = GET_STATE(value) ? "ON" : "OFF";
break;
default:
return false;