This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.

25 lines
1.1 KiB
Python
Raw Normal View History

2018-02-02 00:21:59 +01:00
import denonavr
##---------------------------------------------------------------------------------------##
class Denon(object):
##---------------------------------------------------------------------------------------##
##-----------------------------------------------------------------------------------##
def __init__(self, device):
##-----------------------------------------------------------------------------------##
self.device = denonavr.DenonAVR(device['ip'])
##-----------------------------------------------------------------------------------##
def power(self, state=None):
##-----------------------------------------------------------------------------------##
if(state==None):
return -1
if(state=="on"):
self.device.power_on()
else:
self.device.power_off()
##-----------------------------------------------------------------------------------##
def setInput(self, input):
##-----------------------------------------------------------------------------------##
self.device.input_func = input