Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change input_func fail #216

Closed
JoCarBin opened this issue Jun 29, 2021 · 3 comments
Closed

Change input_func fail #216

JoCarBin opened this issue Jun 29, 2021 · 3 comments

Comments

@JoCarBin
Copy link

JoCarBin commented Jun 29, 2021

Hi, sorry my english is very bad.
i have a error when i want change the function of the receiver.
Why?
Thanks.


discovered_denon.input_func = "CD"
Exception has occurred: AttributeError
can't set attribute
File "/home/jcgarcia/Descargas/denon.X2000/denon.encender.MacSound.py", line 18, in
discovered_denon.input_func = "CD"


My code:
import denonavr
import time

discovered_devices = denonavr.discover()
discovered_denon = denonavr.DenonAVR(discovered_devices[0]['host'])

discovered_denon.update()
print(discovered_denon.name)

discovered_denon.power_on()

time.sleep(5)

print("Encendiendo ...")

discovered_denon.input_func
print(discovered_denon.input_func_list)

discovered_denon.update()
discovered_denon.input_func = "CD"

@prcutler
Copy link
Contributor

Hi,

Replace the last line with:

discovered_denon.set_input_func("CD")

Also, move discovered_denon.update() from above it to the line below it:

discovered_denon.set_input_func("CD")
discovered_denon.update()

Hope that helps.

@JoCarBin
Copy link
Author

Hello Paul,
Thank you very much for your help. I already have it working.

best regards

@prcutler
Copy link
Contributor

Great! If you can close the issue, that would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants