Giter VIP home page Giter VIP logo

Comments (16)

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024 1

I'll publish an alpha3 shortly which should fix this. Just as a comment though, you shouldn't need things like channelup/down in your sources anymore, you can call them direct as detailed here:

https://community.home-assistant.io/t/custom-component-skyq-media-player/140306/370?u=rogtp.

It then allows you to keep sources for channels and the like, rather than basic functions from a remote control.

I'd be interested if you feel you still need them, just so I understand how people are using it.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024 1

Cheers Roger.
re the buttons, yes you are right. I'm using the mini media player card too so I know I can config in there.
Updating and removing them from my existing config is "on the list" but haven't gotten around to it......it worked so as usual it's a case of it if ain't broke.

Thanks again for looking at this

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024 1

So, no I don't need you to post if no problem :-)

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024 1

This all helps, because it shows I need to do some proper documentation on how it should be setup. I just haven't done that yet because I keep going... 'I wonder if I can change it to do that....?'. Not happy with the custom sources, but I just can't figure out how to make the config flow do it better...

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024 1

I've posted a beta 1, because I think it is now at a level of code stability to warrant it, let me know how it goes.

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024 1

YAML adds no extra features, apart from simpler duplication of config.

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

I published alpha4 (alpha 3 went potty), which should fix your issue.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

Cheers....will have a look.
My whole HA went "potty" last night and decided not to come back up so busy restoring last backup.....will test A4 when back up and running and let you know.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

Back up and running now...upgraded to Alpha 5

For YAML configured boxes everything seems fine but still getting an error on Config Flow boxes
WHen I try to press a button on the mini-media-card I get an error of.........
Failed to call service media_player/select_source. 'NoneType' object is not iterable

and the logs report

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547864255760] 'NoneType' object is not iterable
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 454, 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 485, in _handle_entity_call
    await result
  File "/config/custom_components/skyq/media_player.py", line 386, in async_select_source
    channel = next(c for c in self._channel_list if c.channelname == source)
TypeError: 'NoneType' object is not iterable

configuration for card is same for the differently configured boxes so don't think it's an issue with the config there

UPDATE
Actually looking again it seems that on the Config Flow box the buttons need type: skyq (as per your link above) whereas in the YAML configured type: source works fine (because I have the buttons (unnecessarily) configured in the yaml).
So looks like it's fixed and my lack of RTFM is the issue.........cheers

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Can you post your Lovelace config and what you have in channel sources and custom sources in the config_flow.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

I can no prob, but before I do just to confirm that the issue in my last post was mostly down to me rather than the component (I think anyway).

As I mentioned I've removed the box from YAML and used the Config Flow only, but never updated the card buttons so of course they wouldn't work.......they do work now so no issue as far as I can tell.
At the moment I don't have any Custom Sources in the Config Flow.

Do you still want me to post

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

OK, so I didn't read your edit before posting. Yes, you can use the 'source' method in config_flow through the custom sources option. But really I see that being in the minority now

  • You can do things like channel_up/down through play_media, using skyq as the type. (I may also add a service for this as well, to reduce the amount of yaml, just haven't got round to that yet, config_flow has been a big job to do over the bank holiday).
  • Also, you can setup channels, using channel sources options.
  • So really custom is for something like Netflix, which is something that may need different commands in different countries, so needs to be flexible.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

Perfect.
Yeah no probs with the component once I'd stopped and had a read and actually set it up the way it should be setup :-). Everything seems to be working as it should so thanks for that.

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

Glad it's of benefit so.
Happy to be a help (or is that hindrance) anytime :-)

from home_assistant_skyq_mediaplayer.

Gavin-A92 avatar Gavin-A92 commented on August 15, 2024

Updated just now and had a quick look.....everything I tested works fine (via config flow configured).
Will prob get more use later so will let you know if any issues.

At this stage then (notwithstanding Beta status) is there any reasoning to keep YAML config or best to route all through config flow

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Fixed by - v2.2.0

from home_assistant_skyq_mediaplayer.

Related Issues (20)

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.