diff --git a/rest_sensors.cpp b/rest_sensors.cpp index 649306015e..aac4d24538 100644 --- a/rest_sensors.cpp +++ b/rest_sensors.cpp @@ -1484,6 +1484,13 @@ bool DeRestPluginPrivate::sensorToMap(const Sensor *sensor, QVariantMap &map, bo if (strncmp(rid.suffix, "state/", 6) == 0) { const char *key = item->descriptor().suffix + 6; + + if (rid.suffix == RStateLastUpdated && !item->lastSet().isValid()) + { + state[key] = QLatin1String("none"); + continue; + } + state[key] = item->toVariant(); } }