roberodin / ha-samsungtv-custom

📺 HomeAssistant - SamsungTV Custom Component
Apache License 2.0
122 stars 177 forks source link

Custom Component Loading Errors #54

Open Bsunshine18 opened 3 years ago

Bsunshine18 commented 3 years ago

First @roberodin - I know developing these custom components is not easy so thank you for your efforts.

I am having the issues with this customer component with the errors listed in the log below.

My setup is as follows:

Note: I also have the standard Samsung TV integration installed and confirmed the TVs work (on/off, volume up/down, etc)

I have created the devices as per below:

image

with each having the custom dropdown displaying correctly (such as below)

image

As you can see unfortunately the state of all three TV is "unknown" and none of the functionality actually works. EG - clicking the power button cause a pop up error "Failed to call service media.player/turn_on"

Log details after restart of HA look as follows (same as the above):

image

I do really like this component - I hope you'll be able to fix the issue soon.

Thanks

michelwilson commented 3 years ago

Hi, did you manage to find a solution for this? I just installed this component, and I get the exact same issue. Trying to find a component that lets me choose the HDMI2 input instead of just HDM1 or TV...

michelwilson commented 3 years ago

So I did manage to find the issue, the line https://github.com/roberodin/ha-samsungtv-custom/blob/master/custom_components/samsungtv_custom/media_player.py#L205 compares the token with an empty string, but it is None. Changing this line to if self._token != None fixes this issue. The component then shows, but it doesn't do anything. From the default component I recall my TV asking for permission to add this network remote, but for this one, this doesn't happen. I'll continue to play around with this, when I get it to work I'll let you know ;)

Bsunshine18 commented 3 years ago

Hi Michael, Thanks for the update - never heard back anything on this (which is a shame as I think this is a useful upgrade to the standard). Unfortnately I won't be of much help (except maybe for testing) if you happen to make any progress. Thanks again for trying.