So does your REST code allow to control things or just report status?
Just off the top of my head:
Using the signaling in SIP you could do something like:
def notify_zone_change(name, **kw):
running = any(gv.srvals) # gv.srvals shows the state of the zones as a list with 1's for zones that are on an 0's for ones that are off.
loop()
def loop():
global running
while running:
your loop code
Just off the top of my head:
Using the signaling in SIP you could do something like:
def notify_zone_change(name, **kw):
running = any(gv.srvals) # gv.srvals shows the state of the zones as a list with 1's for zones that are on an 0's for ones that are off.
loop()
def loop():
global running
while running:
your loop code