Not sure how you do this. I want to toggle power on my Onkyo with one button. I figure I would need to use a python script:
if indigo.devices[OnkyoReceiver].states['isPoweredOn'] is True:
indigo.devices[OnkyoReceiver].setpoweredmode['Off']
else:
indigo.devices[OnkyoReceiver].setpoweredmode['On']
This obviously doesn't work. How would I do something like this? Is there a Python guide for the plugin?