toggle fonction in binary switch child device

Hi,
i create a plugin that have binary switch as child device. Everything is going great except when i try to use the toggle function, is there some code that i need to put in my parent device file to make it work, normaly when i create a virtual switch i use the implement file and the toggle function work like a charm.

Thanks in advance
Mike

You’ll need to add this service / action to your implementation file. Have a look at the different plug-ins that implement the binary switch. They most likely have this function. If the virtual switch does it, look at the plug-in code.

  • Garrett

Thanks will take a look.