hi,
i modified my braviatv.py file to switch my tv inputs (HDMI1 2 3 etc.)
I know nothing about python but i just modified the ‘_refresh__channels’ whith this:
def _refresh_channels(self):
if len(self._source_list) == 0:
self._content_mapping = self._braviarc. \
load_source_list()
self._source_list = []
#MOD START
self._content_mapping['HDMI1'] = 'extInput:hdmi?port=1'
self._content_mapping['HDMI2'] = 'extInput:hdmi?port=2'
self._content_mapping['HDMI3'] = 'extInput:hdmi?port=3'
self._content_mapping['HDMI4'] = 'extInput:hdmi?port=4'
self._content_mapping['COMPOSITE'] = 'extInput:composite?port=1'
logging.basicConfig(level=logging.DEBUG)
_LOGGER.warning(self._content_mapping)
#MOD END
for key in self._content_mapping:
self._source_list.append(key)
Would it be possible to add this functionality to the bravia component (maybe in a more elegant way :P)