Add uptime to system sensors for home assistant

Uptime is already part of the MQTT messages, but not sensors indicated to home assistant. Useful for troubleshooting purposes.
This commit is contained in:
Arthur van Dorp
2024-03-01 18:41:38 +01:00
committed by GitHub
parent aa6283de5b
commit 73ed4f87e4

View File

@@ -107,10 +107,11 @@ const HomeAssistantSensor PriceSensors[PriceSensorCount] PROGMEM = {
const HomeAssistantSensor PriceSensor PROGMEM = {"Price in %02d %s", "/prices", "prices['%d']", 4000, "", "monetary", ""};
const uint8_t SystemSensorCount PROGMEM = 2;
const uint8_t SystemSensorCount PROGMEM = 3;
const HomeAssistantSensor SystemSensors[SystemSensorCount] PROGMEM = {
{"Status", "/state", "rssi", 180, "dBm", "signal_strength", "measurement"},
{"Supply volt", "/state", "vcc", 180, "V", "voltage", "measurement"}
{"Supply volt", "/state", "vcc", 180, "V", "voltage", "measurement"},
{"Uptime", "/state", "up", 180, "s", "uptime", "measurement"}
};
const HomeAssistantSensor TemperatureSensor PROGMEM = {"Temperature sensor %s", "/temperatures", "temperatures['%s']", 900, "°C", "temperature", "measurement"};