diff --git a/rest_lights.cpp b/rest_lights.cpp index 2d31e877ba..63c875e0d0 100644 --- a/rest_lights.cpp +++ b/rest_lights.cpp @@ -252,7 +252,15 @@ bool DeRestPluginPrivate::lightToMap(const ApiRequest &req, LightNode *lightNode const ApiAttribute a = rid.toApi(map, event); QVariantMap *p = a.map; - (*p)[a.key] = item->toVariant(); + if (rid.suffix == RAttrExtAddress) + { + const quint64 value = item->toNumber(); + (*p)[a.key] = value; + } + else + { + (*p)[a.key] = item->toVariant(); + } if (event && item->needPushChange()) { diff --git a/rest_sensors.cpp b/rest_sensors.cpp index bd3ab0ccf7..db146be853 100644 --- a/rest_sensors.cpp +++ b/rest_sensors.cpp @@ -2687,7 +2687,15 @@ bool DeRestPluginPrivate::sensorToMap(Sensor *sensor, QVariantMap &map, const Ap const ApiAttribute a = rid.toApi(map, event); QVariantMap *p = a.map; - (*p)[a.key] = item->toVariant(); + if (rid.suffix == RAttrExtAddress) + { + const quint64 value = item->toNumber(); + (*p)[a.key] = value; + } + else + { + (*p)[a.key] = item->toVariant(); + } if (event && item->needPushChange()) {