Skip to content

Commit

Permalink
Hide attr/extaddress from API.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaauw committed Dec 21, 2024
1 parent 19652d6 commit c6b836f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ Device::Device(DeviceKey key, deCONZ::ApsController *apsCtrl, QObject *parent) :

addItem(DataTypeBool, RStateReachable);
addItem(DataTypeBool, RCapSleeper);
addItem(DataTypeUInt64, RAttrExtAddress);
addItem(DataTypeUInt64, RAttrExtAddress)->setIsPublic(false);
addItem(DataTypeUInt16, RAttrNwkAddress);
addItem(DataTypeString, RAttrUniqueId)->setValue(generateUniqueId(key, 0, 0));
addItem(DataTypeString, RAttrManufacturerName);
Expand Down
10 changes: 1 addition & 9 deletions rest_lights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,7 @@ bool DeRestPluginPrivate::lightToMap(const ApiRequest &req, LightNode *lightNode

const ApiAttribute a = rid.toApi(map, event);
QVariantMap *p = a.map;
if (rid.suffix == RAttrExtAddress)
{
const quint64 value = item->toNumber();
(*p)[a.key] = value;
}
else
{
(*p)[a.key] = item->toVariant();
}
(*p)[a.key] = item->toVariant();

if (event && item->needPushChange())
{
Expand Down
10 changes: 1 addition & 9 deletions rest_sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2687,15 +2687,7 @@ bool DeRestPluginPrivate::sensorToMap(Sensor *sensor, QVariantMap &map, const Ap

const ApiAttribute a = rid.toApi(map, event);
QVariantMap *p = a.map;
if (rid.suffix == RAttrExtAddress)
{
const quint64 value = item->toNumber();
(*p)[a.key] = value;
}
else
{
(*p)[a.key] = item->toVariant();
}
(*p)[a.key] = item->toVariant();

if (event && item->needPushChange())
{
Expand Down

0 comments on commit c6b836f

Please sign in to comment.