Set generic read and parse function to RStateOn
@@ -405,7 +405,16 @@ void LightNode::setHaEndpoint(const deCONZ::SimpleDescriptor &endpoint)
for (; i != end; ++i)
{
- if (i->id() == LEVEL_CLUSTER_ID)
+ if (i->id() == ONOFF_CLUSTER_ID)
+ {
+ auto *it = item(RStateOn);
+ if (it)
+ {
+ it->setParseParameters({QLatin1String("parseGenericAttribute/4"), endpoint.endpoint(), ONOFF_CLUSTER_ID, 0x0000, QLatin1String("$raw")});
+ it->setReadParameters({QLatin1String("readGenericAttribute/4"), endpoint.endpoint(), ONOFF_CLUSTER_ID, 0x0000, 0x0000});
+ }
+ }
+ else if (i->id() == LEVEL_CLUSTER_ID)
{
if ((manufacturerCode() == VENDOR_IKEA && endpoint.deviceId() == DEV_ID_Z30_ONOFF_PLUGIN_UNIT) || // IKEA Tradfri control outlet
(manufacturerCode() == VENDOR_INNR && endpoint.deviceId() == DEV_ID_ZLL_ONOFF_PLUGIN_UNIT) || // innr SP120 smart plug
