dcnielsen90 / python-bravia-tv

MIT License
13 stars 6 forks source link

Get dvbs source list? #1

Closed GatoPharaoh closed 4 years ago

GatoPharaoh commented 4 years ago

Hi!

I'm currently running your new hass-component for bravia as a custom component. works like a charm so far.

one thing i noticed though is the component pulling channels from the dvbc(i guess?) source. whereas I'am using dvbs. is there any way to get home assistant to pull dvbs channels instead?

thank you for your work.

dcnielsen90 commented 4 years ago

Thanks for the feedback! For clarity, are you seeing dvbc sources and only want to see dvbs, or are just not seeing dvbs? I don't have dvbs at all (so I can't test this); however I am assuming that adding that to the selection is as as simple as the solution below.

-194             if result['source'] in ['tv:dvbc', 'tv:dvbt', 'tv:isdbt', 'tv:isdbbs', 'tv:isdbcs']:  # tv:dvbc = via cable, tv:dvbt = via DTT, tv:isdb* = via Japanese
+194             if result['source'] in ['tv:dvbc', 'tv:dvbs', 'tv:dvbt', tv:isdbt', 'tv:isdbbs', 'tv:isdbcs']:  # tv:dvbc = via cable, tv:dvbt = via DTT, tv:isdb* = via Japanese

I want to see if I can overall make this part more dynamic... It seems silly to me that we need to check against a hardcoded list for a source the TV tells us. I'll try and make some time this week to look into this.

GatoPharaoh commented 4 years ago

I'm only seeing dvbc sources - no dvbs sources are pulled. thank's for looking into it.

GatoPharaoh commented 4 years ago

replaced dvbc with dvbs by hand - worked!

dcnielsen90 commented 4 years ago

Great, I'm glad you got it working for you. I'm thinking that the best way to handle this is by making the list configurable. I plan on making a PR to HA with the next release so that the list can be configured in the yaml file.

dcnielsen90 commented 4 years ago

I added this to my next release. I removed the filtering of sources all together seeing as there is an active pull request for braviarc in Home Assistant to allow you to pick which sources you want to filter. I'm still testing for a couple of other issues; but I put the branch up for testing if you want to check it out here

GatoPharaoh commented 4 years ago

thank you very much - going to look into it

dcnielsen90 commented 4 years ago

This should now be resolved. If it's not please open up another issue.