Want to add more Channel in a code

workatforce
Posts: 34
Joined: Wed Aug 30, 2023 2:56 pm

Post

Hello.

I am trying to add more channel or multiple channel selection. but stuck

Code: Select all

channel.setType(SUPLA_CHANNELTYPE_WEIGHTSENSOR);
 channel.setDefault(SUPLA_CHANNELFNC_WEIGHTSENSOR);
more channel.png
What properties to add here so i can extend, add more channel
You do not have the required permissions to view the files attached to this post.
User avatar
klew
Posts: 13911
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 135 times
Been thanked: 137 times

Post

You have to add more instances of classes that represent different channel type.
Channel type can't be changed. You can only change channel function (some channel types support one function, some more).
In examples you can find programs with multiple channels.
Najlepsze suple dla Twojego domu :mrgreen:
workatforce
Posts: 34
Joined: Wed Aug 30, 2023 2:56 pm

Post

klew wrote: Mon Nov 06, 2023 8:08 pm You have to add more instances of classes that represent different channel type.
Channel type can't be changed. You can only change channel function (some channel types support one function, some more).
In examples you can find programs with multiple channels.
Thankyou klew actually i interpreted wrong i wanted to add more function to channel and you made me correct, will try to add more function to channel. Let me see the examples

Return to “Help”