Adding enigma2 media player#21271
Conversation
|
cc @cinzas @KavajNaruj (I know you guys previously worked on enigma2 PRs). |
|
Hi, I had my PR closed, maybe I will reopen it since I've now changed enigma2 to a platform that implements media_player and notify. Let me know if you PR gets accepted. With my component you have a little more features Nevertheless, great work :) |
|
cc @mihalski for review (if you have time!) |
|
@balloob I think all your comments should be addressed now. Let me know if there's anything else you need. Thanks. |
- support better recording playback integration
|
Wow, thank you. I hope it will be merged soon. |
rytilahti
left a comment
There was a problem hiding this comment.
After reading your comment wrt. adding API to the upstream lib, I added a couple of things that could be done nicer inside the lib to provide a cleaner interface for homeassistant.
|
Thank you @rytilahti for your review. I do agree with all your comments. Most of those things should be encapsulated inside the module and I’ll do that tomorrow. |
rytilahti
left a comment
There was a problem hiding this comment.
Thanks, looks good, I added a couple of nitpicks but I think this is ready to be merged!
- rename prefer_picon to use_channel_icon
|
Please fix the travis build, I'll do a quick review on the docs and I think this can be then merged! 🎉 |
also fix travis also move setup out of init
Thank you @rytilahti ! I was actually just doing some work there to move the setup of the device outside of the I did some testing on discovery and non-discovery and it all works well. Thanks again! |
|
Note: for auto-discovery to work for this platform, we will need a bump of the Netdisco library since this PR got merged. home-assistant-libs/netdisco#241 cc @balloob |
| SERVICE_HASSIO: ('hassio', None), | ||
| SERVICE_AXIS: ('axis', None), | ||
| SERVICE_APPLE_TV: ('apple_tv', None), | ||
| SERVICE_ENIGMA2: ('enigma2', None), |
There was a problem hiding this comment.
Inserting media_player platform as first item in the tuple would load that platform directly instead of loading the component and firing the event.
| """List of available input sources.""" | ||
| return self.e2_box.source_list | ||
|
|
||
| @asyncio.coroutine |
There was a problem hiding this comment.
Use async def instead of coroutine decorator.
| @asyncio.coroutine | ||
| def async_select_source(self, source): | ||
| """Select input source.""" | ||
| self.e2_box.select_source(self.e2_box.sources[source]) |
| attributes[ATTR_MEDIA_DESCRIPTION] = \ | ||
| self.e2_box.status_info['currservice_fulldescription'] | ||
| attributes[ATTR_MEDIA_START_TIME] = \ | ||
| self.e2_box.status_info['currservice_begin'] |
There was a problem hiding this comment.
Are these times absolute utc?
Description:
This PR adds support for Enigma2 based set top box receivers. Examples include devices from Vu (Duo, Duo2, Uno, etc) and lots of manufacturers who support the open sourced images based on Enigma2, such as OpenVix and Black Hole.
At present, the platform supports:
How does it work?
)
note: Component should be worded 'Platform' in the diagram
This PR contains a media_player platform named
enigma2for Home Assistant, which allows basic control of the unit and the TV via my 3rd party pip module, called openwebifpy.More details and example automations can be found here.
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8776
Discovery
Pull request in netdisco: home-assistant-libs/netdisco#241
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.