You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue I run into, is that if a single channel LED driver is connected to the device, it only supports "Brightness" and if a dual channel LED driver is connected, it additionally supports "Color temp" as well.
I am struggling to find out how to implement this behaviour with modern extends.
I know that the configure function of the definition provides the parameter device with which I can access endpoints/clusters, but I couldn't find a way to push to the extend array from there.
Is there a way to do what I'm trying to do with modern extends? Do I maybe need to use non-modern extends?
One more note: The generated_external_definition button in the Webinterface does detect this correctly and generates either philips.m.light() or philips.m.light({ colorTemp: { range: [153, 367] } }), depending on what's connected to the device. Maybe there's a way to leverage this detection mechanism inside my device definition?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently working on integrating support for the Philips EasyAir SNS212/w MC and functionally similar devices.
Here's my current code for this, it generally works fine:
The issue I run into, is that if a single channel LED driver is connected to the device, it only supports "Brightness" and if a dual channel LED driver is connected, it additionally supports "Color temp" as well.
I am struggling to find out how to implement this behaviour with modern extends.
It would work like the following pseudo code:
I know that the
configure
function of the definition provides the parameterdevice
with which I can access endpoints/clusters, but I couldn't find a way to push to theextend
array from there.Is there a way to do what I'm trying to do with modern extends? Do I maybe need to use non-modern extends?
One more note: The
generated_external_definition
button in the Webinterface does detect this correctly and generates eitherphilips.m.light()
orphilips.m.light({ colorTemp: { range: [153, 367] } })
, depending on what's connected to the device. Maybe there's a way to leverage this detection mechanism inside my device definition?Beta Was this translation helpful? Give feedback.
All reactions