The log message suggests your Kitchen speaker is experiencing a Wi-Fi connection problem. It’s dropping off the network, Home Assistant’s Sonos integration has given up trying to connect to it and marked it as unavailable.
You’ll need to check your Wi-Fi network and determine why the speaker is losing connection.
Ok so it really looks like there was some problem with network (I can see it also in speedTest graphs). So now how to make it that HA will try to ping Sonos for longer or will recover after network issue?
If you look at the documentation for the Sonos integration, and the available configuration options displayed in the UI (Settings > Devices & services > Integrations > Sonos), there’s nothing available to control that aspect of its operation.
If my Wi-Fi network is turned off, my Sonos speakers are marked unavailable but moments after the network is re-established, the speakers are no longer unavailable (they automatically return to idle or paused).
Go to Settings > Devices & services > Integrations > Sonos > Configure and check your settings:
It implies that there may not be a general Wi-Fi network problem and your speaker is not disconnecting from the network, or at least not for very long and quickly re-connects.
The problem may be limited to your Home Assistant server’s ability to detect the speaker after a brief interruption in network connectivity.
If reloading the Sonos integration makes it detect the speaker again, it implies the integration is able to detect the speaker but only on reload. I suggest you report this as an Issue in Home Assistant’s Github Core repository. The author of the Sonos integration would probably be interested to learn about this particular behavior (and may be able to either shed light on the cause or modify the integration to mitigate the issue).
It appears to be a long-standing issue with no resolution.
You may wish to provide jjlawren with debug logs for the Sonos integration (when the disconnection occurs) to help shed more light on the cause of the problem.
I never done log debugging with HA. So if you have some time I would appreciate your help with it.
Where should I put config you shared above? To configuration.yaml? Should I put it there or after disconnect? Is restart of HA needed? If I put it now won’t my disk fill up with logs quickly?
To get log in my first message I went to Sonos integration and enable and disable “Enable debug logging” witch after disabling downloaded log file and I have there the occurrence of disconnecting, but it looks like there is also a lot different logs. Si not sure if I should attached it or filter it first only for Sonos.
I think I saw your comment on GitHub. But that is still not the solution. For example I am not able to get cable to my speaker. And I would expect it to work on WiFi as well. I mean it is good to know that this fix it for you but it is still just workaround for deeper issue, I believe
YMMV. The problem I was having was that when power was restored, it could take over an hour for a device to be visible, and hence controllable, in HA, even though it worked in the Sonos app within a few seconds and hence was clearly “on.” I had one amp hard-wired to the switch and the rest relying on Sonos’s wireless connections, which at a minimum creates interdependencies. BTW it wasn’t just HA – Ubiquiti also didn’t see the devices for the same amount of time, though Ubiquiti isn’t 100% reliable at reporting devices that have DHCP connections.
I gather wifi 7 is focused on increased reliability; perhaps it will fix such common problems, at least for devices made after 2025.