Suggestion to multi endpoint DTHs (Solution to only child switches being offline)

hi iquix
can you help me to make a switch handler i have found a working version to hubitat
here is the link

i will donate about your help and i hope someone else donate too