-
-
Notifications
You must be signed in to change notification settings - Fork 558
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
Add radio stop/play/channels/select_channel/info #698
base: master
Are you sure you want to change the base?
Conversation
@bskaplou I would use the radio class to add this functionality |
If we put subdevice code into classes like GatewayRadio we can't call them with CLI.
If we put all subdevice methods into Gateway it will be too fat....
What you think about implementing subdevices as mixins for gateway? Is this approach ok? |
Thanks for the PR! The proper way is to fix the cli here instead of moving the methods out to the main class. I think it's also broken for other "subdevices" like the gatewayalarm :-( edit: about the mixins; I'm welcoming to any solution for this, the only concern I had in my mind is that the services offered by the gateway device should be accessible for anyone acting on an object of Gateway. I'm not sure if those subdevices should even be exposed as themselves to the cli (that is, whether they should inherit Device class at all), but rather be accessed underneath the gateway as sub-commands ( |
I am currently working on properly discovering and intializing subdevices (zigbee connected devices) using the base subdeviceclass and extendig that with device specific methods and properties. A PR will be coming in a few days |
@bskaplou how did you figure out which properties are accesible for a device? |
@starkillerOG sure! will check it in a hour! Meanwhile may I ask your opinion on this #699? |
@starkillerOG yes sure I can sniff anything on devices around... |
Dear colleagues, let me in :) With current PR we are on step 1.... |
@bskaplou would it work for you if we wait until the refactoring PR is done, and then rebase these improvements over that? Also, I'm not sure what do you mean by letting you in? I'm really happy that you want to contribute and we will be reviewing the PRs as they come! :-) edit: if you want to discuss in a more informal and synchronous manner, feel free to join the matrix room linked in the readme! |
@rytilahti yes sure :) Waiting for #700 About letting me in ... I'm just a bit frustrated with a bunch of pending PRs all around ... Some other are too sloooowwwww this one, kennedyshead/aioasuswrt#39 home-assistant/core#35778 By the way if you are mac user might give a look https://github.com/bskaplou/home-assistant-electron/ |
Okay, let's get 700 first done and then extend the radio support! Btw, those are completely different projects, so there isn't much we can do here now, can we? :-) I know that the review cycles on homeassistant can take a while, as there are only so many reviewers and plenty of PRs to review, so hang in tight there! |
@bskaplou the restructuring PR is now merged, feel free to rebase this on top of it. |
@bskaplou now that version 0.5.1 of Python-miio is released work can begin to add support for sub devices in HomeAssistant. Do you want to create a PR, or shall I start working to integrate sub devices into HomeAssistant? |
This will not work because "play_specify_fm" requires a json object of the channel to play def radio_select_channel(self, id):
return self.send("play_specify_fm", [int(id)]) id should be json e.g json.loads('{"id": 764, "type": 0,"url": "http://live.xmcdn.com/live/764/64.m3u8"}') def play_specify_fm(self, id):
return self._gateway.send("play_specify_fm", id) |
No description provided.