Closed GunterAv closed 3 months ago
Is there an entry in the Settings \ System \ Logs
for that error message? The System log entry will contain more details, and possibly a detailed exception trace for the error.
Hello,
Logger: homeassistant.helpers.script.bose_soundbar_300_dialogmodus Quelle: helpers/script.py:2030 Erstmals aufgetreten: 20:56:26 (6 Vorkommnisse) Zuletzt protokolliert: 22:51:58
Bose Soundbar 300 Dialogmodus: Error executing script. Error for call_service at pos 1: argument of type 'NoneType' is not iterable
Logger: homeassistant.helpers.script.bose_soundbar_300_dialogmodus Quelle: helpers/script.py:2030 Erstmals aufgetreten: 20:56:26 (5 Vorkommnisse) Zuletzt protokolliert: 22:50:39
Bose Soundbar 300 Dialogmodus: Error executing script. Error for call_service at pos 1: argument of type 'NoneType' is not iterable
Best regards Gunter
Thank you.
What do you have listed for your sound_mode_list
in the Developer Tools \ States
display? For example, for my ST-300 the sound_mode_list
is Dialog
and Normal
.
Do you have the same?
Hello,
for me too...
see: Best regards Gunter
Ok, I found the problem.
The Bose AudioDspControls update event does not contain the supported audio modes in some circumstances. This is causing the SupportedAudioModes
property to be set to None, which in turn raises the argument of type 'NoneType' is not iterable
.
I did not catch this in my testing, as it appears to only happen when the update event occurs which is driven by a change from the device (e.g. clicking the dialog mode button on the remote).
I should have a fix available within the hour.
Thanks for bringing this to my attention.
FYI - just released a new version of the SoundTouchPlus integration
Note - If you are using the SpotifyPlus integration, you will also need to update it as well since it uses the underlying Spotify Web API Python library.
[ 1.0.60 ] - 2024/08/20
_OnSoundTouchUpdateEvent_audiodspcontrols
event processing method. The Bose AudioDspControls update event does not contain the supported audio modes in some circumstances. This is causing the SupportedAudioModes property to be set to None, which in turn causes exceptions in the select_sound_mode
service. I did not catch this in my testing, as it appears to only happen when the update event occurs which is driven by a change from the device (e.g. by clicking the dialog mode button on the remote).spotifywebapiPython
package requirement to version 1.0.88.Give the v1.0.60 release a try, and let me know how it goes.
Thanks
Hello,
no more error messages. but unfortunately the dialogue mode cannot be queried if the dialogue mode was switched via the remote control:
- platform: template
switches:
soundtouchdialog:
friendly_name: "Bose Soundbar 300 Dialogmodus"
value_template: "{{ is_state_attr('media_player.soundtouch_300_3', 'soundtouchplus_sound_mode', 'AUDIO_MODE_DIALOG') }}"
turn_on:
- service: script.soundtouch300_dialog
turn_off:
- service: script.soundtouch300_normal
icon_template: >-
{% if is_state_attr('media_player.soundtouch_300_3', 'soundtouchplus_sound_mode', 'AUDIO_MODE_DIALOG') %}
ave:bose-soundbar-dialog
{% else %}
ave:bose-soundbar
{% endif %}
Thanks!
Best regards Gunter
The mode is switching correctly for me in my testing, using both the set_sound_mode
service and toggling via the remote. I can also verify this through the developer tools template tester. Note that you have to query the soundtouchplus_sound_mode
attribute and not the HA sound_mode
attribute.
I ran portions of your script (from the previous reply) via template tester, and the soundtouchplus_sound_mode
value changed appropriately ...
Normal mode, set via Bose remote control:
Dialog mode, set via Bose remote control:
Hello,
Thank you for your feedback!
Sometimes the button press of the Bose remote control is not returned to HA. The ST300 LED lights up green, but ‘Audio_Mode_Normal’ is returned in HA.
Never mind, I rarely use the Bose remote control.
Nice Work !!!
Best regards Gunter
Hi Gunter -
I found a small bug in the 1.0.60 release I just pushed out. I corrected that, as well as added the update of media_player.sound_mode
property to hold the same value as the soundtouchplus_sound_mode
attribute.
Give the v1.0.61 a try, and let me know if it fixes your script process or not.
Apologies for the frequent updates, but bugs like these are hard to track down and test. Thank you for your patience.
FYI - just released a new version of the SoundTouchPlus integration
Note - If you are using the SpotifyPlus integration, you will also need to update it as well since it uses the underlying Spotify Web API Python library.
[ 1.0.61 ] - 2024/08/21
media_player.sound_mode
property to hold the same value as the soundtouchplus_sound_mode
attribute.Hello,
perfekt! Thanks.
Best regards Gunter
Hello,
thats my Bose Dasboard with Bose SoundtouchPlus:
Thanks! Best Regards Gunter
Hi Gunter - Nice looking dashboard.
Did the v1.0.61 release fix your issue? If so, I will close the issue.
Hello,
yes. All ok.
Thanks! Gunter
System Health details
Core: 2024.8.2 Supervisor: 2024.08.0 Operating System: 13.0 Frontend: 20240809.0 Bose SoundTouchPlus: 1.0.59
Checklist
Describe the issue
Hello,
If I set the dialogue mode using the following script, switching to dialogue mode works:
Switching back to normal mode also works as expected.
However, once I have switched dialogue mode on or off with the original Bose Remote control, the script no longer works.
Error message: The action script/soundtouch300_dialog could not be executed. argument of type 'NoneType' is not iterable
I first have to restart the HA, then I can set the mode again via HA.
Thanks and best regards Gunter
Reproduction steps
Debug logs
Diagnostics dump
No response