Giter VIP home page Giter VIP logo

home_assistant_skyq_mediaplayer's Introduction

Validate with hassfest HACS Validate CodeFactor Downloads for latest release

GitHub release maintained maintainer hacs_badge Community Forum

Sky Q component for Home Assistant

The skyq platform allows you to control a Sky Q set top box.

Note: This integration does not support Sky Glass, Sky Stream or the internet only devices that are currently being sold outside the UK.

Note: The integration supports Sky Q in the UK (and Ireland using the same EPG), Germany and Italy.

There is currently support for the following device types within Home Assistant:

  • Media Player
  • Sensor - Storage (UI config only)
  • Sensor - Schedule (UI config only)

I work on this integration because I like things to work well for myself and others, and for it to deliver as much as is achievable with the API. Please don't feel you are obligated to donate, but of course it is appreciated.

Buy Me A Coffee Donate with PayPal

Documentation

The full documentation is available here - Sky Q Documentation

Screenshots

Component showing current TV with default media control

Component showing application with default media control

Component showing recording with Mini Media Player

Media Browser

home_assistant_skyq_mediaplayer's People

Contributors

4n0nd3v3l0p3r avatar actions-user avatar dependabot-preview[bot] avatar dependabot[bot] avatar madmanmonty avatar ollo69 avatar rogerselwyn avatar tombrien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

home_assistant_skyq_mediaplayer's Issues

Media Player unavailable and wrong state change to off

Describe the bug
The media player entity is often not available (even outside the night stand by) and I have recorded some wrong state changes from playing to off.
I have automations with an off state that obviously start for no reason (the decoder was not really turned off)

To Reproduce
N/A

Screenshots
Schermata 2021-09-22 alle 23 05 27

Component versions

  1. What version of SkyQ component are you using?
    v. 2.6.4
  2. What was the last version where the problem was not shown?
    v. 2.6.4

Your configuration
How have you setup your devices, by UI or YAML?
by UI

Your configuration from the options dialogue
Schermata 2021-09-23 alle 11 32 00

Output of HA logs
Schermata 2021-09-23 alle 11 32 41

Option not load[BUG]

Yesterday I have install a update from Hacs but after the installation it's impossible to load the option.
The screen remain on "Wait, Install the integration"
Schermata 2020-07-27 alle 12 24 50

[BUG] Lot of error in te log for missing attribute Episode

Describe the bug
With some channel I receive a lot of error in the log as described below

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ? Seeing the TV
  2. What channel were you on? Sky Cinema Sci-Fi
  3. What time did the problem occur? during vision, error repeated for 164 times (until I change the channel)
  4. Where are you (bear in mind component supports GBR/ITA at the moment)? ITA

Expected behavior
A clear and concise description of what you expected to happen.

Catch the exception, simply do not provide info if not available

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. What version of SkyQ component are you using? v2.2.1
  2. What was the last version where the problem was not shown? n/a

Your configuration
How have you setup your devices, by UI or YAML?

UI

Your configuration from the options dialogue

image

Output of HA logs
Paste the relavant output of the HA log here.

Logger: custom_components.skyq.media_player
Source: custom_components/skyq/media_player.py:421
Integration: Sky Q (documentation, issues)
First occurred: 2:00:11 (164 occurrences)
Last logged: 2:29:58

X0010M - Current Media retrieval failed: Media(channel='Sky Cinema Sci-Fi HD', imageUrl='https://ethaneurope.it.imageservice.sky.com/pd-logo/skychb_204skycinemascifihd/600/600', sid=204, pvrId=None, live=True) : 'str' object has no attribute 'episode'
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/skyq/media_player.py", line 421, in _async_getCurrentMedia
    self._episode = currentProgramme.episode
AttributeError: 'str' object has no attribute 'episode'

Error repeated in log for SkyQ Mini

Describe the bug

Hi,

first of all thanks for this fantastic component, very useful for me.
Today I found a lot of error in the log related to the SkyQ mini connected to a SkyQ platinum (italian version)
Both SkyQ Platinum and SkyQ Mini was turned-on.
Error log start about at 9.00am and continue until I reboot Home Assistant (see log below).

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ? Live TV
  2. What channel were you on? I think Sky TG24
  3. What time did the problem occur? see log
  4. Where are you (bear in mind component supports GBR/ITA at the moment)? ITA

Your config.yaml

media_player:
 - platform:  skyq
   name: SkyQ Mini Letto
   host: x.x.x.x
   live_tv: True
   country: "IT"

Output of HA logs

Paste the relavant output of the HA log here.

Update for media_player.skyq_mini_letto fails
12:32:08 – custom_components/skyq/media_player.py (ERROR) - il messaggio si è verificato per la prima volta alle 8:57:21 e compare 1176 volte
 
Dettagli registro (ERROR)
Logger: homeassistant.helpers.entity
Source: custom_components/skyq/media_player.py:388
First occurred: 8:57:21 (1176 occurrences)
Last logged: 12:32:08

Update for media_player.skyq_mini_letto fails
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/skyq/media_player.py", line 357, in _async_getCurrentMedia
    self._remote.getCurrentMedia
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 169, in getCurrentMedia
    channel = self._getChannelNode(sid)["channel"]
  File "/srv/homeassistant/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 471, in _getChannelNode
    s for s in self._channels["services"] if s["sid"] == str(sid)
KeyError: 'services'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 470, in async_device_update
    await self.async_update()
  File "/home/homeassistant/.homeassistant/custom_components/skyq/media_player.py", line 268, in async_update
    await self._async_updateCurrentProgramme()
  File "/home/homeassistant/.homeassistant/custom_components/skyq/media_player.py", line 342, in _async_updateCurrentProgramme
    await self._async_getCurrentMedia()
  File "/home/homeassistant/.homeassistant/custom_components/skyq/media_player.py", line 388, in _async_getCurrentMedia
    f"X0020M - Current Media retrieval failed: {currentMedia} : {err}"
UnboundLocalError: local variable 'currentMedia' referenced before assignment
Connessione persa. Riconnessione…

[BUG] Q STB lock-up

Describe the bug
I have been using this custom component for quite some time now and have experienced no stability issues until the 2.5.7 release. Since updating, the STB becomes unresponsive after some time and is recoverable only by power-cycling.

To Reproduce
Steps to reproduce the behavior:

The issue occurs arbitrarily with 2.5.7. I'm in GBR.

Expected behavior
STB is always usable

Screenshots
N/A

Component versions

  1. What version of SkyQ component are you using?
  2. What was the last version where the problem was not shown?
    2.5.7 seems to have introduced the issue, earlier strains of 2.5.x didn't. I have now rolled back via HACs to 2.5.6 and so far so good but as the issue occurs arbitrarily, only time will tell!

Your configuration
UI config flow, installed via HACs.

Additional context
The component itself seems to be behaving itself. It simply sees that the STB is unavailable.

[Feature Request] Additional Attributes - Recording State

Is your feature request related to a problem? Please describe.
Is it possible to see an attribute if the current channel is being recorded. Option could be that the media_type could switch from live to pvr

Describe the solution you'd like
If watching a live channel and you have selected record, can an attribute display this. Currently if you enable recording whilst watching a live channel, the media_type remains live and does not changed to pvr.

Describe alternatives you've considered
Don't currently have a workaround for this.

Additional context
I have an automation whereby I can walk into the kitchen and continue watching the content from the living room. I do some analysis to understand what it was in the living room and therefore do the following in the kitchen
if living room media_type = live and previous state was not paused, then kitchen change channel
if living room media_type = live and previous state was paused, then living room pause, record, kitchen navigate to most recent recording.
if living room media_type = pvr then living room pause, kitchen navigate to most recent recording.
if living room media_type = apps then living room identify app, kitchen navigate to app.

The current issue I face is that if i was recording the channel in the living room and want to continue in the kitchen I can't tell if it currently being recorded or not. therefore when it attempt to continue in the kitchen based on the above parameters it will either change channel (meaning i continue watching from a possible different point then if i had paused and recorded in the living room) or it could cancel the recording which and not continue correctly.

I have the workaround above that if it sees that the previous state was paused, it safe to assume i paused something whilst watching and would want to continue from that point in the next room, so enabling recording works. But what if in the same instance of watching i have paused, recorded, continued to watch and then paused again. the above routine would cancel the recording.

I hope the below makes sense. Please let me know if i can explain anything any further.

thanks again for all the work you have done on this.

[BUG] If Switch name contains a "+" or "." symbol, HA returns errors / invalid config

Describe the bug
If switch name contains a "." HA returns error

To Reproduce
Steps to reproduce the behavior:

  1. Enable Channel Switches creation

Expected behavior
Channels Switches should be created without errors in the naming scheme.

Screenshots
-

Component versions

  1. What version of SkyQ component are you using?
    2.5.2
  2. What was the last version where the problem was not shown?
    unknown

Your configuration
How have you setup your devices, by UI or YAML?
UI

Your configuration from the options dialogue
or
Your configuration.yaml

switch skyq:
- platform: template
  switches: !include skyqSala.yaml

skyqSala.yaml (auto-generated by SkyQ integration UI enabling switch generation)

(...)
    skyq_foxcrimehdsala:
      value_template: '{{"off"}}'
      friendly_name: 'Fox Crime HD in the Sala'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky_q
          source: 'Fox Crime HD'
      turn_off:
        service: script.placeholder
    skyq_crime+inv.hdsala:
      value_template: '{{"off"}}'
      friendly_name: 'Crime + Inv. HD in the Sala'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky_q
          source: 'Crime + Inv. HD'
      turn_off:
        service: script.placeholder
    skyq_discovery+1sala:
      value_template: '{{"off"}}'
      friendly_name: 'Discovery +1 in the Sala'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky_q
          source: 'Discovery +1'
      turn_off:
        service: script.placeholder
    skyq_skyuno+1hdsala:
      value_template: '{{"off"}}'
      friendly_name: 'Sky Uno +1 HD in the Sala'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky_q
          source: 'Sky Uno +1 HD'
      turn_off:
        service: script.placeholder
    skyq_fox+1sala:
      value_template: '{{"off"}}'
      friendly_name: 'Fox +1 in the Sala'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky_q
          source: 'Fox +1'
      turn_off:
        service: script.placeholder
(...)

Output of HA logs

Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:420
Integration: Hass.io (documentation, issues)
First occurred: 14:20:38 (1 occurrences)
Last logged: 14:20:38

Invalid config for [switch.template]: invalid slug skyq_crime+inv.hdsala (try skyq_crime_inv_hdsala) for dictionary value @ data['switches']. Got OrderedDict([('skyq_pausesala', OrderedDict([('value_template', '{{"off"}}'), ('friendly_name', 'pause in the Sala'), ('turn_on', OrderedDict([('service', 'media_player.media_pause'), ('data', OrderedDict([('entity_id', 'media_player.sky_q')]))])), ('turn_off', OrderedDict([('service', 'script.placeholder')]))])), ('skyq_playsala', OrderedDict([('value_template', '{{"off"}}'), ('friendly_name', 'play in the Sala'), ('turn_on', OrderedDict([('service', 'media_player.media_play'), ('data', Orde.... (See ?, line ?).

Additional context
Entity names for channel switches that contains a "+" or "." symbol makes HA returns errors in home assistant. Substituting the symbols with "_" in the config files solves the issue.

[BUG] media browser doesn’t populate

Restart home assistant.
Watch a recording in sky q.
Open media browser.

It doesn’t populate.

Stop recording.
Re-open.
Populates ok.

Play recording.
Open browser.
It now works ok from cached info.

Country IRL no longer working in 2.1.6beta6 (worked up to 2.1.5)

Updated Custom Component no longer working as was in 2.1.5.
Looking at logs (below) I believe this is down to "new" feature around removing the need for Country parameter. IRL (Ireland) as a country has worked 100% perfectly up to now but no longer works in this beta. Understand this is (and never was) technically "supported" but have found it to work pretty much perfectly up to this version.
"Buttons" (change channel, etc) work as expected but the boxes (1x Q 2TB and 2 x Mini) are not correctly detected by the component (and report as off despite being on (and controllable too))

To Reproduce
No steps to reproduce per se, once upgraded this was noticed.
Notwithstanding support for GBR/ITA this has worked fine for IRL up to 2.1.6
Media Player(s) are detected but functionality is reduced.

config.yaml extract

media_player:
  - platform: skyq
    host: 192.168.10.241
    name: SkyQ Sitting Room
    room: Sitting Room
    config_directory: '/config/'
    generate_switches_for_channels: true
    sources:
      DisneyJnr: '6,0,7'                                                        
      DisneyJnr+1: '6,0,8'                                                      
      CHup: 'channelup'
      CHdn: 'channeldown'
      Select: 'select'                                                          
      Up: 'up'                                                                  
      Down: 'down'                                                              
      Left: 'left'                                                              
      Right: 'right'                                                            
      I: 'i'                                                                    
      Dismiss: 'dismiss'                                                        
      Sidebar: 'Sidebar'                                                        
      Home: 'home'                                                              
      TVGuide: 'tvguide'                                                        
      Sky: 'sky'                                                                
      Record: 'record'      
**Output of HA logs**
Paste the relavant output of the HA log here.

Think this is the relevant errors from the log........
2020-05-05 22:43:40 ERROR (SyncWorker_16) [pyskyqremote.skyq_remote] E0040 - Invalid country: 192.168.10.241 : IRL : No module named 'pyskyqremote.country.remote_ie'
2020-05-05 22:43:40 ERROR (SyncWorker_10) [pyskyqremote.skyq_remote] E0040 - Invalid country: 192.168.10.242 : IRL : No module named 'pyskyqremote.country.remote_ie'
2020-05-05 22:43:40 ERROR (SyncWorker_7) [pyskyqremote.skyq_remote] E0040 - Invalid country: 192.168.10.243 : IRL : No module named 'pyskyqremote.country.remote_ie'
2

[BUG] media.player changes name

I updated to the last version, the problem is that:
about each a day the media_player changes the name: sometimes works with media_player.skyq_living_room, sometimes with media_player.sky.
And in my config folder I have the skyqDefaultRoom.yaml file.

This is my configuration.yaml:

media_player:
 - platform: skyq
   name: sky
   host: 192.168.0.12
   sources:
      SkyTG: '1,0,0'
      SkySport: '2,0,0'
      SkyMotori: '4,1,8'
   generate_switches_for_channels: true

image
For example now is working with the name: media_player.skyq_living_room but, as you can see the name inside configurationyaml is sky.

In development tools I see only media_player.skyq_living_room
image

[Feature Request] order of channels / sources

Is your feature request related to a problem? Please describe.
Can you control the order that sources appear.
My channels appear alphabetically.
I would prefer they appear numerically.
Or ideally in the order I enter them.

Is it possible ?

Failed to call service media_player - fixed. Thanks.

I’m getting an error 👍
Failed to call service media_player/play_media. Async_play_media() got an unexpected keyword argument ‘extra’

I’m not sure if it came with the latest home assistant core install or your latest beta (which I have rolled back and it didn’t fix it )

Any thoughts on cause ?

Thanks.

[Feature Request]

Is your feature request related to a problem? Please describe.
From harry1 - Community Forum

Would it be possible to add a volume_up and volume_down service to the skyq media players like the universal media player does for use with homekit?

In a similar config as this:

  volume_up:
     service: switch.turn_on
     data:
       entity_id: switch.living_room_volume_up
   volume_down:
     service: switch.turn_on
     data:
       entity_id: switch.living_room_volume_down

Additional context
https://github.com/home-assistant/core/blob/c994904e755431c0101e6d49855c8822f033cf8b/homeassistant/components/universal/media_player.py

[Help Required] SkyQ Mini unconfigurable

Hi
I have installed the SKY Q component using HACS. Everytjhing seems file but I cannot configure. When I press configure I get:
Error
Config flow could not be loaded
Many thanks

[Feature Request] Attributes Return Channel Numbers

Could the Channel Number be included in the attributes captured so that this can be used in automation's.

Example automation - Continue Watching

Capture channel playing in living room, then using this to change the channel of another box in another room for continued watching.

Thank you

Add support for channel alias for friendly_name entries in switches.YAML [Feature Request]

I have, in the past month or so, started to integrate with Alexa. The underlying integration seems to be working fine. I wonder if you have considered adding an alias for some of the friendly channel names entries in the switch.yaml that is created. You see, at the moment, I can ask Alexa to ‘switch on BBC One HD in the Lounge’ and that is fine, however, attempting to ‘switch on Sky Sports Premier League HD’ does not work (mostly), as the friendly name is ‘SkySp PL HD in the Lounge’ . I know this is replicating the channel name from the SkyQ box, so its not a criticism of the plugin. Am currently ‘fixing up’ the yaml after the file has been created. This is currently calling a BASH script via a service entry in HA that is triggered manually (although I could create an ‘on HA startup event’ that could automate that phase. But I was wondering if that is do-able with the integration?

Unknow error in media library

In the media library i receive a unknow error.
In the registry have this errors:
X0010U - Image file check failed: http://my_ip_address:8123/local/community/skyq/rai 3.png : Server disconnected
X0010U - Image file check failed: http://my_ip_address:8123/local/community/skyq/class tv moda.png : Server disconnected
X0010U - Image file check failed: http://my_ip_address:8123/local/community/skyq/sky sport serie a.png : Server disconnected
X0010U - Image file check failed: http://my_ip_address:8123/local/community/skyq/sky sport info.png : Server disconnected
X0010U - Image file check failed: http://my_ip_addess:8123/local/community/skyq/dazn2.png : Server disconnected

The change channel is working fine. How to solve???
I have already copied a png image like rai 3.png in the path without succcess.

[BUG] Device failed to connect

Describe the bug
I have three Sky Q boxes and all three were linked and working until a recent update and now none of them connect.
I tried deleting one of the boxes and readding - through the integration manager - and get a "Failed to connect, invalid host" message.
It's definitely the correct IP address and it loads a for while before displaying the message, whereas, display the message promptly when an incorrect IP address.
I tried downgrading, but can only go to v2.4.9, but still did not connect to devices.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Component versions

  1. What version of SkyQ component are you using? v2.5.0
  2. What was the last version where the problem was not shown? v2.4.9

Your configuration
UI config

Your configuration from the options dialogue
Not available as can't connect to devices.

**Output of HA logs**  
2021-02-09 11:17:20 WARNING (MainThread) [custom_components.skyq.media_player] W0010M - Device is not available: SkyQ Master Bedroom
2021-02-09 11:17:20 WARNING (MainThread) [custom_components.skyq.media_player] W0010M - Device is not available: SkyQ Lounge

Programme Details Value

Hi

On the media player card it shows the channel and programme title.

I’m wondering if it’s possible to reference the programme title in a template?

Basically I’m looking to identify when the programme contains a specific string I want to trigger an automation.

I don’t know though if I can reference that in a template. If it’s possible can you tell me please what the variable is that I reference.

Thanks

[BUG] - Error adding SkyQ Mini

Describe the bug
I have now also SkyQ Mini (ITA), but I cannot add

To Reproduce
Steps to reproduce the behavior:

  1. Adding new SkyQ mini decoder
  2. ITA

Expected behavior
Able to add

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

Your configuration
UI, but also with YAML there is the same issue

Output of HA logs
2020-10-25 17:39:33 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/home/homeassistant/.homeassistant/custom_components/skyq/config_flow.py", line 75, in async_step_user
await self._async_setUniqueID(host)
File "/home/homeassistant/.homeassistant/custom_components/skyq/config_flow.py", line 88, in _async_setUniqueID
remote = await self.hass.async_add_executor_job(SkyQRemote, host)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 97, in init
deviceInfo = self.getDeviceInformation()
File "/srv/homeassistant/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 349, in getDeviceInformation
hardwareModel = systemInfo["hardwareModel"]
KeyError: 'hardwareModel'

[Help Wanted] Also Bug(?) problem report

I've just installed SkyQ with your code in Home Assistant (Everything latest versions) and it was a clean smooth process for the main sky box. But using the HACS approach I struggled to find how to add an extra SkyQ box. Now done via my configuration.yaml file.

`media_player:

  • platform: skyq
    name: SkyQ Rear Utility
    host: 192.168 1.31
    live_tv: true
  • platform: skyq
    name: SkyQ Our Bedroom
    host: 192.168.1.32
    live_tv: true
    `

One of my extra boxes integrated cleanly (the 2nd one) with no issues but the other one has a problem which I have no idea how to resolve. Perhaps it needs me to re-install.

"This entity ("media_player.skyq_rear_utility") does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.

You can overwrite some attributes in the entity customizations section."

I've tried renaming the entity, rebooting ... with no success.

If so, a button on the options to add a new skyQ box or remove one would be a great extra feature. I currently have two entities Identified as being SkyQ the main box and one other, the integration says it knows 1 device and 1 entity even though there are now 2 of each?

Some way to re-configure without a delete all and insert would also be great. I'm currently getting for my 3rd SkyQ box which won't link. It is loaded as an unavailable media_player not a SkyQ, its spec is identical to the box that works excepting its name and IP address:

Any help resolving this would be gratefully had.

Enhancement request: Media Browser functionality

Have you considered using the new media browser functionality to allow channel selection through the media player with this SkyQ integration?

If you wanted to go crazy, could it even browse recordings on the box.

Just dreaming I guess !

Thanks

Probably user error! (new to this)

Describe the bug
I'm trying to turn the TV (as a learning exercise) on at 9.58pm and set it to BBCEast. I've messed about trying various things, e.g. adding select, reinstalling the latest updates, rebooting, but whilst the TV turns on at 9.58p, and the sky box also powers on, I'm let with the menu screen and the last TV station (not the one I've selected) playing in a quarter preview. So I don't think my select source is work. I not sure if I'm mixing YAML and UI - see below - but have also tried altering this.

Config....

Sky Q

media_player:

  • platform: skyq
    host: 192.168.0.21
    name: Bedroom SkyQ
    generate_switches_for_channels: true
    sources:
    BBCEast: '1,0,1,select'
    BBC1HD: '1,1,5,select'
    SkyOne: '1,0,6,select'
    SkyNews: '5,0,1,select'
  • platform: skyq
    host: 192.168.0.14
    name: Lounge SkyQ
    generate_switches_for_channels: true
    sources:
    BBCEast: '1,0,1,select'
    BBC1HD: '1,1,5,select'
    SkyOne: '1,0,6,select'
    SkyNews: '5,0,1,select'
  • platform: skyq
    host: 192.168.0.84
    name: Snug SkyQ
    generate_switches_for_channels: true
    sources:
    BBCEast: '1,0,1,select'
    BBC1HD: '1,1,5,select'
    SkyOne: '1,0,6,select'
    SkyNews: '5,0,1,select'
  • platform: skyq
    host: 192.168.0.32
    name: Log Cabin SkyQ
    generate_switches_for_channels: true
    sources:
    BBCEast: '1,0,1,select'
    BBC1HD: '1,1,5,select'
    SkyOne: '1,0,6,select'
    SkyNews: '5,0,1,select'

Screenshot 2021-03-01 at 17 21 20

Screenshot 2021-03-01 at 17 19 55

[BUG] Certificate error with application image

Describe the bug
Hi folks, I’m loving the Sky component, but I’m getting an SSL cert error in my logs.
I tried finding it elsewhere in the forums, but couldn’t see it.

Copy to clipboard
X0020M - Image file check failed: https://192.168.1.150:8123/local/community/skyq/epg.png : Cannot connect to host 192.168.1.150:8123 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.1.150'. (_ssl.c:1108)")]
When I follow that URL in my web browser it also gets a certificate error - it seems that the SSL cert for my ***.duckdns.org is presented, where as it appears instead to be looking for a cert for my local IP.

When I change the URL from …
https://192.168.1.150:8123/local/community/skyq/epg.png 2
… to …
https://***.duckdns.org/local/community/skyq/epg.png …
… I don’t get the certificate error, and interestingly both URLs give me a 404.

Is there any information I could get to help troubleshoot this - please let me know?

Thanks in advance 🙏

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ?
  2. What channel were you on?
  3. What time did the problem occur?
  4. Where are you (bear in mind component supports GBR/ITA at the moment)?

Expected behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. What version of SkyQ component are you using? Prior to 2.3.7
  2. What was the last version where the problem was not shown? n/a

Your configuration
How have you setup your devices, by UI or YAML? n/a

Your configuration from the options dialogue
or
Your configuration.yaml

Output of HA logs
X0020M - Image file check failed: https://192.168.1.150:8123/local/community/skyq/epg.png : Cannot connect to host 192.168.1.150:8123 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.1.150'. (_ssl.c:1108)")]

Additional context
Add any other context about the problem here.

websocket-client library conflict

Describe the bug
This component require websocket-client==0.57.0 but HA use internally websocket-client==0.56.0 for some integration (e.g. Samsung TV).
This is creating library conflict, infact during HA version update this error is showed:

pyskyqremote 0.2.23 has requirement websocket-client==0.57.0, but you'll have websocket-client 0.56.0 which is incompatible.

Do you really need websocket-client==0.57.0 ?

Error on Button Press - 2.2.0 Alpha 2

Describe the bug
Error msg thrown when button pressed via mini-media-player card

To Reproduce
Box configured via yaml.
Integration shows SkyQ box no prob and displays what's on, etc so all working there I think.
Press any of the "buttons" on the card (eg Home) and error message thrown - see log below

Component versions

  1. What version of SkyQ component are you using? 2.2.0 Alpha 2
  2. What was the last version where the problem was not shown? 2.1.8

Your config.yaml

  - platform: skyq
    host: 192.168.10.242
    name: SkyQ Office
    room: Office
    #config_directory: '/config/'
    generate_switches_for_channels: true
    country: GBR
    sources:
      CHup: 'channelup'
      CHdn: 'channeldown'
      Select: 'select'                                                          
      Up: 'up'                                                                  
      Down: 'down'                                                              
      Left: 'left'                                                              
      Right: 'right'                                                            
      I: 'i'                                                                    
      Dismiss: 'dismiss'                                                        
      Sidebar: 'Sidebar'                                                        
      Home: 'home'                                                              
      TVGuide: 'tvguide'                                                        
      Sky: 'sky'                                                                
      Record: 'record'  

Output of HA logs

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2799407504] local variable 'channel' referenced before assignment
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
  connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in async_call
  task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1288, in _execute_service
  await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
  self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 453, in entity_service_call
  future.result()  # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
  await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 484, in _handle_entity_call
  await result
File "/config/custom_components/skyq/media_player.py", line 405, in async_select_source
  if channel:
UnboundLocalError: local variable 'channel' referenced before assignment

[BUG] Device becomes duplicated at night

Reported by Kata - https://community.home-assistant.io/t/custom-component-skyq-media-player/140306/739
Describe the bug
My device becomes unavailable at night (because of stand by i suppose), but it remains no longer available unless i restart ha (it happens every morning)…
What am i missing?

To Reproduce
Steps to reproduce the behavior:

  1. Overnight running

Expected behavior
All HASS instances should be running

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. Latest
  2. n/a

Your configuration
YAML.

Your configuration from the options dialogue
or
Your configuration.yaml

platform: skyq
name: ‘SkyQ Platinum’
host: 192.168.1.100
room: ‘Soggiorno’
live_tv: True

platform: skyq
name: ‘SkyQ Mini Camera’
host: 192.168.1.102
room: ‘Camera’
live_tv: True

platform: skyq
name: ‘SkyQ Mini Taverna’
host: 192.168.1.101
room: ‘Taverna’
live_tv: True

Output of HA logs

This is what i found in the log :

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: SkyQ Mini Taverna
W0010M - Device is not available: SkyQ Platinum
W0010M - Device is not available: SkyQ Mini Camera

Then, at 5.00 :

Logger: homeassistant.helpers.entity
Source: custom_components/skyq/media_player.py:447 
First occurred: 5:01:42 (2 occurrences) 
Last logged: 5:02:32

Update for media_player.skyq_mini_taverna_2 fails
Update for media_player.skyq_mini_camera_2 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'

immediately 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:22 (3 occurrences) 
Last logged: 5:02:42

W0020M - Device is now available: SkyQ Mini Taverna
W0020M - Device is now available: SkyQ Platinum
W0020M - Device is now available: SkyQ Mini Camera

Additional context
eb2c4f952e7b5e7605b7cca78f3eae5c2571e10c_2_1380x522

Config flow fails

Not sure if I was supposed to do anything special, but....
Removed existing yaml setup.
Restarted.
Installed new version.

New integration..
Error.....
Error occurred loading configuration flow for integration skyq: cannot import name 'CONF_CHANNEL_SOURCES' from 'custom_components.skyq.const' (/config/custom_components/skyq/const.py

After a reboot, it was more sucessful, but I’m guessing it should work without a reboot ?

Config Flow not installing/working with 2.2.0

Describe the bug
I’ve upgraded to the 2.2.0 Alpha 2 (from Alpha 1) and the component works fine as usual but config flow will not work at all.
If I go to Integrations and look to add it I get the “installing component” message but then just back to Integrations without it installing…the yaml configured entities work fine.
Have installed from HACS and tested (without reboot as it didn't ask) and also after rebooting with no changes.

To Reproduce
Go to Integrations, click +, select SkyQ and wait.......

Component versions

  1. 2.2.0 Alpha 2
  2. What was the last version where the problem was not shown? 2.1.8

Your config.yaml
Not sure it's relevant given the issue is config flow related...yaml configured the component all working fine but let me know if you need it

Output of HA logs
Only reference to SkyQ component apart from the standard "custom" warning is

WARNING (MainThread) [custom_components.skyq.media_player] Use of 'config_directory' is deprecated since it is no longer required. You set it to /config/.

[BUG] Pause not working with apps

Describe the bug
When watching Netflix or Prime pausing does not work. If paused by the Sky remote pressing play does work in home assistant. Appears just pausing from home assistant is not working.

To Reproduce
Steps to reproduce the behavior:

  1. Watching Netflix/Prime, press pause button on defult media card in HA.
  2. Netflix/Prime
  3. Consistently, tried many time throughout the evening
  4. UK

Expected behavior
Streaming video should pause.

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. 2.5.0 lastest stable

Your configuration
UI, three boxes

Your configuration from the options dialogue
program image, show live tv details, few channels select, not using switches, no custom entries

**Output of HA logs**  
nothing found


[BUG] Hi guys - I’m seeing a new error in my logs for the SkyQ custom components. 2020-07-25 14:26:51 ERROR (SyncWorker_2) [pyskyqremote.skyq_remote] E0020 - Invalid command: 192.168.1.14 : Sky 2020-07-25 14:27:10 ERROR (SyncWorker_1) [pyskyqremote.skyq_remote] E0020 - Invalid command: 192.168.1.14 : Home 2020-07-25 14:27:17 ERROR (SyncWorker_5) [pyskyqremote.skyq_remote] E0020 - Invalid command: 192.168.1.14 : Home Pressing any of the buttons on my Lovelace card except the power button and pause/fast forwards/back have no effect except to generate this error. Thanks for any help

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ?
  2. What channel were you on?
  3. What time did the problem occur?
  4. Where are you (bear in mind component supports GBR/ITA at the moment)?

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. What version of SkyQ component are you using?
  2. What was the last version where the problem was not shown?

Your configuration
How have you setup your devices, by UI or YAML?

Your configuration from the options dialogue
or
Your configuration.yaml

media_player:
 - platform:  skyq
   name: SkyQ Living Room
   host: 192.168.0.10
   live_tv: True
   country: "UK"
   sources:
      SkyOne: '1,0,6'
      SkyNews: '5,0,1'

Output of HA logs
Paste the relavant output of the HA log here.

Additional context
Add any other context about the problem here.

[BUG] Generate Switches doesn't use entity_id for switch names

Describe the bug
I’ve finally migrated my old yaml configuration of the original custom componet, to the UI one of @RogTP
I’ve correctly generated the switches that i need and correctly exposed to google assistant as was with the older integration. The problem now is that i can’t use this switches even in home assistant, if i toggle one to change source i receive this error in log:

Error handling message {‘inputs’: [{‘context’: {‘locale_country’: ‘US’, ‘locale_language’: ‘en’}, ‘intent’: ‘action.devices.EXECUTE’, ‘payload’: {‘commands’: [{‘devices’: [{‘id’: ‘switch.skyq_rai1mansarda’}], ‘execution’: [{‘command’: ‘action.devices.commands.OnOff’, ‘params’: {‘on’: False}}]}]}}], ‘requestId’: ‘9466402553022980684’}: {‘errorCode’: ‘unknownError’}

I’ve used the auto generated switches by UI

Maybe i’ve found the problem, the entity id in the yaml is media_player.sky_q_mansarda
in home assistant i see media_player.skyq_mansarda i think the switch generated are referring to the wrong entity, why?

To Reproduce
Steps to reproduce the behavior:

  1. Install Sky Q and add an Sky Q box with generate switches option on
  2. Rename entity ID or change Friendly Name (which are valid things to do in HA)
  3. Reboot to re-generate switches
  4. The switches are generated with the incorrect entity id, because a conversion of the friendly name is used

Expected behaviour
Switches are generated using the correct entity_id

Screenshots
n/a

Component versions

  1. What version of SkyQ component are you using? v2.4.9
  2. What was the last version where the problem was not shown? n/a

Your configuration
How have you setup your devices, by UI or YAML? Either, both fail

Your configuration from the options dialogue
n/a
Your configuration.yaml
n/a
Output of HA logs
See above

Additional context
https://community.home-assistant.io/t/custom-component-skyq-media-player/140306/681

[BUG] Sky Sports Football Auto Switch Generation

Describe the bug
So just for info, when using switch auto generation with Sky Sports Football in the UK, it has the channel list as SkySp F'ball HD

The ' as added to the switch name and causes the config to fail to load. The same issue then occurs in friendly name and source, and you need to put full "" marks on it.

Currently it deploys like:

    skyq_skyspf'ballhdlivingroom:
      value_template: '{{"off"}}'
      friendly_name: 'SkySp F'ball HD in the Living Room'
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky
          source: 'SkySp F'ball HD'
      turn_off:
        service: script.placeholder

I had to edit it like:

    skyq_skyspfballhdlivingroom:
      value_template: '{{"off"}}'
      friendly_name: "SkySp F'ball HD in the Living Room"
      turn_on:
        service: media_player.select_source
        data:
          entity_id: media_player.sky
          source: "SkySp F'ball HD"
      turn_off:
        service: script.placeholder

Also, if you then edit and leave auto generation on, this re-writes the file and causes config failure on each startup, so once edited you need to disable the auto switch generation feature.

To Reproduce
Steps to reproduce the behavior:

  1. Select Sky Sports F'Ball HD as a channel
  2. enable auto switch generation for channels

Expected behavior
N/A

Screenshots
N/A

Component versions

  1. What version of SkyQ component are you using? 2.2.3
  2. What was the last version where the problem was not shown? Unsure, only started using auto generation with this version

Your configuration
How have you setup your devices, by UI or YAML? UI

Output of HA logs
N/A (apologies, I haven't saved them since I manually edited config)

Additional context
N/A

HomeKit Pairing Fails when device class set to TV

Pairing with HomeKit (as an accessory, not a bridge) works when device class is left as default and Sky Q is added to the home app as a series of switches, however when it is set to "tv" in order to enable the control centre remote control, HomeKit pairing fails with the message "Accessory is out of compliance".

Error on 0.115.5

Can't access to integration option pannel anymore since upgrade.
This is the system log:

Logger: aiohttp.server
Source: data_entry_flow.py:204
First occurred: 10:49:57 (1 occurrences)
Last logged: 10:49:57

Error handling request
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/skyq/config_flow.py", line 153, in async_step_init
    c for c in self._channel_list if c.channelname == channel
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py", line 210, in post
    return await super().post(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py", line 73, in post
    "show_advanced_options": data["show_advanced_options"],
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 132, in async_init
    flow, flow.init_step, data, init_done
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
RuntimeError: coroutine raised StopIteration

[BUG] - Too many error messages if SkyQ is not powered on HA start

Describe the bug
A lot of error on messages if skyq is not reachable when HA starts
When I start HA with latest 2.3.5 version and skyq is not connected, on HA log there are a lot of errors repeated about 20 times before it stops to log.
HA start finishes only when your component stops logging.

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ? nothing
  2. What channel were you on? nothing
  3. What time did the problem occur? every time HA starts using 2.3.5 version
  4. Where are you (bear in mind component supports GBR/ITA at the moment)? ITA

Expected behavior
Just few checks on skyq availability to start HA quickly and reduced log errors

Screenshots
If applicable, add screenshots to help explain your problem.

Component versions

  1. What version of SkyQ component are you using? 2.3.5
  2. What was the last version where the problem was not shown? 2.3.4

Your configuration
How have you setup your devices, by UI or YAML? YAML

Your configuration from the options dialogue
or
Your configuration.yaml

media_player:
- platform:  skyq
  name: Sky
  host: 192.168.1.15
  #output_programme_image: False
  live_tv: False
  country: "ITA"
  #generate_switches_for_channels: true
  sources:
    SkyTG24HD_100: '1,0,0'
    Rai1_101: '1,0,1'
    Rai2_102: '1,0,2'
    Rai3_103: '1,0,3'
    ...

Output of HA logs

2020-08-15 12:04:51 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for skyq which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-15 12:05:10 WARNING (SyncWorker_28) [pyskyqremote.skyq_remote] W0010 - Control URL not accessible: 192.168.1.15 : http://192.168.1.15:49153/description0.xml
2020-08-15 12:05:11 ERROR (SyncWorker_28) [pyskyqremote.skyq_remote] X0060 - Connection error: 192.168.1.15 : HTTPConnectionPool(host='192.168.1.15', port=49153): Max retries exceeded with url: /description1.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x4f5d66f0>: Failed to establish a new connection: [Errno 113] No route to host'))
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/srv/homeassistant/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x4f5d66f0>: Failed to establish a new connection: [Errno 113] No route to host

Additional context
Add any other context about the problem here.

[BUG] unable to add "Generated Switches" to configuration.yaml

Describe the bug
When i add the "Generated Switches" to my configuration.yaml i get errors

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time ?
    Add:
switch:
- platform: template
   switches: !include  skyqWohnzimmer.yaml

To configuration.yaml

  1. Error Message (check configuration)

Invalid config for [switch.template]: invalid slug skyq_skyserien&showshdwohnzimmer (try skyq_skyserien_showshdwohnzimmer) for dictionary value @ data['switches']. Got OrderedDict([('skyq_pausewohnzimmer', OrderedDict([('value_template', '{{"off"}}'), ('friendly_name', 'pause in the Wohnzimmer'), ('turn_on', OrderedDict([('service', 'media_player.media_pause'), ('data', OrderedDict([('entity_id', 'media_player.sky_q')]))])), ('turn_off', OrderedDict([('service', 'script.placeholder')]))])), ('skyq_playwohnzimmer', OrderedDict([('value_template', '{{"off"}}'), ('friendly_name', 'play in the Wohnzimmer'), ('turn_on', OrderedDict([('service', 'media_player.med.... (See ?, line ?).

  1. my genarted swiches file
skyq_pausewohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'pause in the Wohnzimmer'
  turn_on:
    service: media_player.media_pause
    data:
      entity_id: media_player.sky_q
  turn_off:
    service: script.placeholder
skyq_playwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'play in the Wohnzimmer'
  turn_on:
    service: media_player.media_play
    data:
      entity_id: media_player.sky_q
  turn_off:
    service: script.placeholder
skyq_ffwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'fastforward in the Wohnzimmer'
  turn_on:
    service: media_player.media_next_track
    data:
      entity_id: media_player.sky_q
  turn_off:
    service: script.placeholder
skyq_rwwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'rewind in the Wohnzimmer'
  turn_on:
    service: media_player.media_previous_track
    data:
      entity_id: media_player.sky_q
  turn_off:
    service: script.placeholder
skyq_skyonehdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky One HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky One HD'
  turn_off:
    service: script.placeholder
skyq_skyatlantichdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Atlantic HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Atlantic HD'
  turn_off:
    service: script.placeholder
skyq_foxhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Fox HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Fox HD'
  turn_off:
    service: script.placeholder
skyq_tntseriehdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'TNT Serie HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'TNT Serie HD'
  turn_off:
    service: script.placeholder
skyq_syfyhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'SYFY HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'SYFY HD'
  turn_off:
    service: script.placeholder
skyq_13thstreethdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: '13th Street HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: '13th Street HD'
  turn_off:
    service: script.placeholder
skyq_universaltvhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Universal TV HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Universal TV HD'
  turn_off:
    service: script.placeholder
skyq_daserstehdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Das Erste HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Das Erste HD'
  turn_off:
    service: script.placeholder
skyq_zdfhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'ZDF HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'ZDF HD'
  turn_off:
    service: script.placeholder
skyq_rtltelevisionwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'RTL Television in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'RTL Television'
  turn_off:
    service: script.placeholder
skyq_sat1wohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'SAT.1 in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'SAT.1'
  turn_off:
    service: script.placeholder
skyq_prosiebenwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'ProSieben in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'ProSieben'
  turn_off:
    service: script.placeholder
skyq_voxwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'VOX in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'VOX'
  turn_off:
    service: script.placeholder
skyq_rtl2wohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'RTL2 in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'RTL2'
  turn_off:
    service: script.placeholder
skyq_kabeleinswohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'kabel eins in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'kabel eins'
  turn_off:
    service: script.placeholder
skyq_pro7maxxwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Pro7 MAXX in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Pro7 MAXX'
  turn_off:
    service: script.placeholder
skyq_rtlpluswohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'RTLplus in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'RTLplus'
  turn_off:
    service: script.placeholder
skyq_nitrowohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'NITRO in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'NITRO'
  turn_off:
    service: script.placeholder
skyq_voxupwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'VOXup in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'VOXup'
  turn_off:
    service: script.placeholder
skyq_tntfilmhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'TNT Film HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'TNT Film HD'
  turn_off:
    service: script.placeholder
skyq_heimatkanalwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Heimatkanal in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Heimatkanal'
  turn_off:
    service: script.placeholder
skyq_anixehdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'ANIXE HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'ANIXE HD'
  turn_off:
    service: script.placeholder
skyq_kikahdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'KiKA HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'KiKA HD'
  turn_off:
    service: script.placeholder
skyq_superrtlhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'SUPER RTL HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'SUPER RTL HD'
  turn_off:
    service: script.placeholder
skyq_kikawohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'KiKA in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'KiKA'
  turn_off:
    service: script.placeholder
skyq_disneychannelwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Disney Channel in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Disney Channel'
  turn_off:
    service: script.placeholder
skyq_toggopluswohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'TOGGO plus in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'TOGGO plus'
  turn_off:
    service: script.placeholder
skyq_deluxemusicwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'DELUXE MUSIC in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'DELUXE MUSIC'
  turn_off:
    service: script.placeholder
skyq_dmaxwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'DMAX in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'DMAX'
  turn_off:
    service: script.placeholder
skyq_3satwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: '3sat in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: '3sat'
  turn_off:
    service: script.placeholder
skyq_skycinemapremierenhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Premieren HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Premieren HD'
  turn_off:
    service: script.placeholder
skyq_skycinemapremieren_24hdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Premieren +24 HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Premieren +24 HD'
  turn_off:
    service: script.placeholder
skyq_skycinemabestofhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Best Of HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Best Of HD'
  turn_off:
    service: script.placeholder
skyq_skycinemathrillerhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Thriller HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Thriller HD'
  turn_off:
    service: script.placeholder
skyq_skycinemaactionhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Action HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Action HD'
  turn_off:
    service: script.placeholder
skyq_skycinemafamilyhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Family HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Family HD'
  turn_off:
    service: script.placeholder
skyq_skyserien&showshdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Serien & Shows HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Serien & Shows HD'
  turn_off:
    service: script.placeholder
skyq_skykrimihdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Krimi HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Krimi HD'
  turn_off:
    service: script.placeholder
skyq_tntcomedyhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'TNT Comedy HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'TNT Comedy HD'
  turn_off:
    service: script.placeholder
skyq_eentertainmhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'E! Entertainm. HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'E! Entertainm. HD'
  turn_off:
    service: script.placeholder
skyq_romancetvwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Romance TV in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Romance TV'
  turn_off:
    service: script.placeholder
skyq_skycinemaclassicswohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Classics in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Classics'
  turn_off:
    service: script.placeholder
skyq_skycinemafunwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Sky Cinema Fun in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Sky Cinema Fun'
  turn_off:
    service: script.placeholder
skyq_tele5wohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'TELE 5 in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'TELE 5'
  turn_off:
    service: script.placeholder
skyq_anixe_wohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'ANIXE+ in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'ANIXE+'
  turn_off:
    service: script.placeholder
skyq_wdrhdbielefeldwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'WDR HD Bielefeld in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'WDR HD Bielefeld'
  turn_off:
    service: script.placeholder
skyq_ndrfshhhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'NDR FS HH HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'NDR FS HH HD'
  turn_off:
    service: script.placeholder
skyq_hr-fernsehenhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'hr-fernsehen HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'hr-fernsehen HD'
  turn_off:
    service: script.placeholder
skyq_mdrs-anhalthdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'MDR S-Anhalt HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'MDR S-Anhalt HD'
  turn_off:
    service: script.placeholder
skyq_rbbberlinhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'rbb Berlin HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'rbb Berlin HD'
  turn_off:
    service: script.placeholder
skyq_juniorwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Junior in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Junior'
  turn_off:
    service: script.placeholder
skyq_disneychannelhdwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'Disney Channel HD in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'Disney Channel HD'
  turn_off:
    service: script.placeholder
skyq_superrtlwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'SUPER RTL in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'SUPER RTL'
  turn_off:
    service: script.placeholder
skyq_mtvwohnzimmer:
  value_template: '{{"off"}}'
  friendly_name: 'MTV in the Wohnzimmer'
  turn_on:
    service: media_player.select_source
    data:
      entity_id: media_player.sky_q
      source: 'MTV'
  turn_off:
    service: script.placeholder

(this is generated by your integaration)

[BUG] SkyQ Media Player is not correctly exposed to Google Assistant

Describe the bug
I don't know if this is a bug of this custom component.
Media player entities created using other integrations (eg. Xbox) is exposed to Google Assistant correctly and works fine
SkyQ Media player entity on Google Assistant is not exposed correctly and it doesn't work.

To Reproduce
Expose skyq media player to Google using Google Assistant Integration

Expected behavior
I expect to control (on/off) correctly my SkyQ

Screenshots
SkyQ media player
image

Working media player
image

Component versions

  1. What version of SkyQ component are you using? 2.6.1
  2. What was the last version where the problem was not shown? I don't know

Your configuration
How have you setup your devices, by UI or YAML? YAML

Your configuration from the options dialogue
or
Your configuration.yaml

media_player:
- platform:  skyq
  name: Sky
  host: 192.168.1.15
  #output_programme_image: False
  live_tv: False
  country: ITA
  #generate_switches_for_channels: true
  sources:
    SkyTG24HD_100: '1,0,0'
    Rai1_101: '1,0,1'
    Rai2_102: '1,0,2'
    Rai3_103: '1,0,3'
    Rete4HD_104: '1,0,4'
    ...
    ...
    many other channels

and this is how I expose media players...

project_id: xxxxxxxxxxxxxx
service_account: !include Google_HomeAssistant-xxxxxxxx.json
report_state: true
expose_by_default: true
exposed_domains:
  - light
  - switch
  - cover
  - scene
entity_config:
  media_player.xbox:
    name: Xbox
    expose: true
  media_player.sky:
    name: Sky
    expose: true

Output of HA logs

Additional context

generate_switches_for_channels problem - the file skyq<room>.yaml in the /config path created empty

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: homeassistant.helpers.entity
Source: custom_components/skyq/classes/switchmaker.py:48
Integration: Sky Q (documentation, issues)
First occurred: 00:44:54 (1 occurrences)
Last logged: 00:44:54

Update for media_player.skyq fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, in async_device_update
raise exc
File "/config/custom_components/skyq/media_player.py", line 362, in async_update
Switch_Maker(
File "/config/custom_components/skyq/classes/switchmaker.py", line 34, in init
self._addSwitch("pause", "pause", "media_pause")
File "/config/custom_components/skyq/classes/switchmaker.py", line 48, in _addSwitch
if len(self._alias) > 0:
TypeError: object of type 'NoneType' has no len()

Allow Channel Change when Sky Box is on Home Menu

Firstly this has saved me a load of work. Very nice addition to Home Assistant. Thank You.

When the Sky Q Box is initially turned on or if someone has navigated to the main menu the "browse media" or "Select Source" will not allow the channel to be changed.
This can be fixed by adding "backup" to the channel description. E.G
sources:
BBC 1: 'backup,1,1,5'
Unfortunately this breaks the image displayed in the Library list (default grey TV is shown instead)
Would it be possible to filter out "backup," when parsing the list?
I'm Python is not good, but will try if your time is limited.

[BUG] homeassistant.helpers.network.NoURLAvailableError

Describe the bug
When use an automation to turn on the media player or change the source, in the log of Home Assistant we see the error:

Update for media_player.skyq_salotto fails

and the source not change

To Reproduce
Steps to reproduce the behavior:

  1. Create an automation with an action that change the source
    action:
    • service: media_player.turn_on
      entity_id: media_player.skyq_salotto
    • delay: 00:00:25
    • service: media_player.select_source
      entity_id: media_player.skyq_salotto
      data:
      source: Sky_TG_24
  2. run the automation
  3. look in the logs of Home Assistant
  4. there will be several error of type:
    Home Assistant WebSocket API
    Update for media_player.skyq_salotto fails

If use the Services tools on the Development Tools, the source change work without error

Expected behavior
Change source with automation without error

Screenshots
Schermata 2020-10-28 alle 16 29 38
Schermata 2020-10-28 alle 16 30 51

Component versions

  1. SkyQ 2.4.4
  2. I think 2.4.3

Your configuration
YAML

Your configuration from the options dialogue
or
Your configuration.yaml
media_player:

  • platform: skyq
    name: SkyQ Salotto
    host: 192.xxx.xxx.xxx
    room: salotto
    live_tv: True
    generate_switches_for_channels: true
    sources:
    SkyAtlantic: '1,1,0'
    RAI_1: '1,0,1'
    RAI_2: '1,0,2'
    Sky_TG_24: '1,0,0'
    RAI_3: '1,0,3'
    Sky_Uno: '1,0,8'
    FOX: '1,1,2'
    SkySport_24: '2.0.0'
    SkySport_Uno: '2,0,1'
    SkySport_SerieA: '2,0,2'
    DAZN: '2,0,9'
    Canale_5: '1,0,5'
    Italia_1: '1,0,6'
    Accendi: 'power'
    Output of HA logs

Logger: homeassistant.components.websocket_api.http.connection.1591156944
Source: helpers/network.py:113
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 16:13:47 (1 occurrences)
Last logged: 16:13:47

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 138, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1370, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 470, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 655, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 507, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/homeassistant/scene.py", line 311, in async_activate
await async_reproduce_state(
File "/usr/src/homeassistant/homeassistant/helpers/state.py", line 106, in async_reproduce_state
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/helpers/state.py", line 100, in worker
await platform.async_reproduce_states( # type: ignore
File "/usr/src/homeassistant/homeassistant/components/media_player/reproduce_state.py", line 111, in async_reproduce_states
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/media_player/reproduce_state.py", line 70, in _async_reproduce_states
await call_service(SERVICE_TURN_ON, [])
File "/usr/src/homeassistant/homeassistant/components/media_player/reproduce_state.py", line 55, in call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1370, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 470, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 655, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 507, in _handle_entity_call
await result
File "/config/custom_components/skyq/media_player.py", line 369, in async_turn_on
await self.async_update()
File "/config/custom_components/skyq/media_player.py", line 352, in async_update
await self._async_updateCurrentProgramme()
File "/config/custom_components/skyq/media_player.py", line 468, in _async_updateCurrentProgramme
appImageUrl = await self._appImageUrl.async_getAppImageUrl(
File "/config/custom_components/skyq/utils.py", line 93, in async_getAppImageUrl
base_url = get_url(hass, allow_internal=False)
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 113, in get_url
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Logger: homeassistant.helpers.entity
Source: helpers/network.py:120
First occurred: 14:01:15 (4 occurrences)
Last logged: 16:13:45
Update for media_player.skyq_salotto fails

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/config/custom_components/skyq/media_player.py", line 352, in async_update
await self._async_updateCurrentProgramme()
File "/config/custom_components/skyq/media_player.py", line 468, in _async_updateCurrentProgramme
appImageUrl = await self._appImageUrl.async_getAppImageUrl(
File "/config/custom_components/skyq/utils.py", line 93, in async_getAppImageUrl
base_url = get_url(hass, allow_internal=False)
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 80, in get_url
request_host = _get_request_host()
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 120, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Additional context
Add any other context about the problem here.

integration problem

hello I have problems with the integration, I installed the latest version through hacs, I have the latest version of home assistant but I am not part of this integration
this is the error log:

2020-07-19 21:03:21 ERROR (MainThread) [homeassistant.config] Platform error: media_player
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/config.py", line 780, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/loader.py", line 321, in get_platform
cache[full_name] = importlib.import_module(
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/skyq/init.py", line 4, in
from pyskyqremote.skyq_remote import SkyQRemote
ModuleNotFoundError: No module named 'pyskyqremote'

Buttons List to use if you use "mini-media-player" [Feature Request]

Is your feature request related to a problem? Please describe.
Missing Button Commands for using "mini-media-player"

Describe the solution you'd like
have a list with supported Button commands

Describe alternatives you've considered
example code for the "mini-media-player" Screenshot that you use

Additional context
my current working buttons

type: 'custom:mini-media-player'
entity: media_player.sky_q
shortcuts:
columns: 4 # Max buttons per row
buttons:
- icon: 'mdi:chevron-up'
id: channelup
type: skyq
- icon: 'mdi:chevron-down'
id: channeldown
type: skyq
- icon: 'mdi:home'
id: home
type: skyq
- icon: mdi:magnify
id: search
type: skyq

Issue on channel list in config flow

Describe the bug
First of all thanks for great job with this component.

Just two little bug that I found in the channel list generation from config flow:

  1. if I go to the integration options and I add a new channel to the existing list, the list is duplicated and report a double list, the first with the original list and the second with the original plus the new channel (see screnshot)
  2. rebooting HA, point 1. is fixed but the channel list defined on my first SkyQ is duplicated on the second SkyQ Mini

Screenshots

image

Component versions

  1. What version of SkyQ component are you using? v2.2.0
  2. What was the last version where the problem was not shown? v2.2.0

Your configuration
How have you setup your devices, by UI or YAML?

UI

Your configuration from the options dialogue

Main Sky Q config
image

Sky Q Mini config

image

[BUG] skyqchannel.yaml empty

Schermata 2021-03-05 alle 10 52 38
I installed the latest sky q integration update and the switches YAML file is empty. I checked the settings and the channels are checked, the "Generate switches for channels" box but the file remains empty.
From the mediaplayer menu I can change channels.
How can I solve?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.