Add support sound mode boolean#50
Conversation
|
@scarface-4711 can you give feedback on this PR? The PR's for general sound mode support in the backend and frontend have already been merged and will be available in the next HomeAssistant version. |
|
I got conformation that the HomeAssistant PR can be merged as soon as this PR is finisched. |
|
@scarface-4711 could you please have a look at this PR? |
|
@starkillerOG Could you please include the check to _update_avr method in a way that there will be no error messages during update if sound mode tags are not in the XML? |
|
I did not have too much time to check this during Football World Cup so far 😉 |
|
|
||
| # Sound mode information only available in main zone | ||
| if self._zone == "Main": | ||
| if (self._zone == "Main" and self._support_sound_mode == True): |
There was a problem hiding this comment.
comparison to True should be 'if cond is True:' or 'if cond:'
| self._get_zone_name() | ||
| else: | ||
| self._get_receiver_name() | ||
| # Determine if sound mode is supported |
|
I implemented the check (_get_support_sound_mode()) at initialization, and subsecently prevented the sound mode tags to be added to relevant tags in the _update_avr() method if the initial _get_support_sound_mode() resulted in a False value. This schould prevent errors in the _update_avr() method. |
|
@scarface-4711 Could you check why the Travis check failed? |
|
@scarface-4711 is their something wrong with my code or with the Travis check? |
|
Probably a new version of pytest-timeout, which is not compatible to the pytest version. Please go to https://github.com/scarface-4711/denonavr/blob/master/test-requirements.txt , replace pytest-timeout>=1.2.1 with pytest-timeout==1.2.1 and try again |
|
@starkillerOG just did it by myself and published version 0.7.4 |
|
Thank you @scarface-4711 for all your help! |
|
@scarface-4711 The sound mode support is merged in HomeAssistant, so with the next release in two weeks everyone schould have sound mode support in HomeAssistant (frontend and backend). |
|
great, I'll test it then 👍 |
Add a function and property to check if the receiver supports sound modes. (check if the status XML contains information about the sound mode).
This is required for HomeAssistant, see home-assistant/core#14910