Hmmm, I’d have to look and see if it is somehow seeing the box online before it is really available. Setting up the unique identifier for the box is handled slightly differently via the UI as opposed to via yaml, and I’m thinking that somehow it is ending up with a different identifier when the box wakes up and therefore generating a second entity.
See how you go with setting up via UI. If that doesn’t work, I might get you to dig further, but we’ll do that via private message.
Just to add to this, sometimes my entities disappear and are replaced by “_2” entities. It seems to happen when I restart HA but then go back to the normal entities on the next restart. Doesn’t happen often so have never really worried about it.
I also have the integration set up in .yaml as I’ve been using this since more or less when it was released.
Interesting. Let me pursue this with Kata and see if I can figure out what is going on. Do you reboot overnight by any chance? During the 2am-5am (ish) time slot?
Ok, it worked!
It seems that devices are not duplicated, with UI setup.
This morning i found the same entities, all of them available.
This is the log (3AM):
Logger: custom_components.skyq.media_player
Source: custom_components/skyq/media_player.py:185
Integration: Sky Q (documentation, issues)
First occurred: 3:00:57 (3 occurrences)
Last logged: 3:00:57
W0010M - Device is not available: Sky Q - Mini Taverna
W0010M - Device is not available: Sky Q - Mini Camera
W0010M - Device is not available: Sky Q - Platinum
then (5AM)
Logger: homeassistant.helpers.entity
Source: custom_components/skyq/media_player.py:447
First occurred: 5:02:15 (2 occurrences)
Last logged: 5:02:22
Update for media_player.sky_q_mini_taverna fails
Update for media_player.sky_q_mini_camera fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 292, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 490, in async_device_update
raise exc
File "/config/custom_components/skyq/media_player.py", line 353, in async_update
await self._async_updateState()
File "/config/custom_components/skyq/media_player.py", line 447, in _async_updateState
powerState = await self.hass.async_add_executor_job(self._remote.powerStatus)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 92, in powerStatus
self._setupRemote()
File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 486, in _setupRemote
self._channels = self._getChannels()
File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 466, in _getChannels
return channels["services"]
KeyError: 'services'
followed by
Logger: custom_components.skyq.media_player
Source: custom_components/skyq/media_player.py:586
Integration: Sky Q (documentation, issues)
First occurred: 5:02:21 (3 occurrences)
Last logged: 5:02:34
W0020M - Device is now available: Sky Q - Mini Taverna
W0020M - Device is now available: Sky Q - Mini Camera
W0020M - Device is now available: Sky Q - Platinum
The ‘id codes’ are different (w0010m - w0020M) but there are no ‘duplicates’ and they are available, both in the UI and in the status page.
I don’t reboot HA, router, any machine unless I have too. I will let you guys do what you need to do. As I said it doesn’t really cause me a problem with anything going offline overnight. If you need any info let me know.
You’ll get that error every night when the Sky Boxes go into deep sleep. More interested if you see the W0010/20 messages when you notice the entities have been duplicated.
I don’t see anymore the logo of the app running into SkyQ. The .png files are there but not anymore visible in UI. Did something changed about it?
This is what i have in the frontend:
I am sure I did not changed anything on my config since months… I only installed updates when notified.
I will test other apps and see if the behaviour will change.
EDIT: Other apps logos are displayed. Only Dazn not…
Are there any errors in the logs? Does SkyQ still appear in the list of integrations? What version of SkyQ is installed? Does it still show under HACS? Is the code still present in custom_components folder?
By the way I am using latest version of SkyQ on 2021.6.3 on two different sites, so I am not aware of any specific issue.