alexmohr / media_player.sony

Custom component for Home Assistant to control Sony devices
Apache License 2.0
16 stars 8 forks source link

hass.components.configurator is deprecated #39

Open yx37055 opened 1 month ago

yx37055 commented 1 month ago

Guten morgen Alex ! Hopefully you still provide support for your development.

I'm new to HA and trying to get my Sony bluray player working using your code. (I precise that remote control works using php code based on IRCC protocol. So player is OK)

Integration seems OK as I see it in the list. But while adding lines to configuration.yaml nothing appears. No configuration is initiated. Maybe I'm missing something stupid.

When looking to the log, I see:

2024-08-03 10:40:00.067 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sony 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 2024-08-03 10:40:09.042 INFO (MainThread) [homeassistant.components.media_player] Setting up sony.media_player 2024-08-03 10:40:09.108 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'sony' accesses hass.components.configurator. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from configurator directly at custom_components/sony/media_player.py, line 130: configurator = hass.components.configurator, please report it to the author of the 'sony' custom integration----------------------------------

Any help will be greatly appreciated. Thanks in advance !

alexmohr commented 1 month ago

Hi,

I'm not really maintaining this component at the moment because I don't have the time to do so and I'm not using the integration myself anymore. I do accept pull requests though. As 2024.9 is not released yet the configuration should still work until then. It could also be the case that you particular device is not supported

yx37055 commented 1 month ago

Hi, Thanks a lot for your quick reply and still accepting requests !!! FYI, my player is a SONY UBP-X1100ES (UHD player).

I made progress as now, an entity is appearing with the name I gave in the configuration.yaml. I've even been able to complete the pairing with the PIN code. I'm now stuck as I got no clue how to send a command to the player.

Should there be a device created automatically ? Should I create it myself ? Should I create something manually in the dashboard ?

Not sure if that is important but when opending settings of the entity, I got following message: "This entity ('media_player.ubp_x1100es') does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail."

Fabrice

alexmohr commented 1 month ago

Once you've been able to configure the pin it should show up in devices in the home assistant settings and a player entity should be visible which you can add to Lovelace. If it doesn't the configuration failed, maybe there is something about this in the home assistant log. In any case you have to add the device manually to a dashboard. The main issue is that each of these devices works a bit differently and the API is not publicly documented.

yx37055 commented 1 month ago

OK I see. Then I'll look at the code and try to adapt it until a device is reated. Thanks for the advice.

I've also seen that a sony.conf file has been generated with all the possible commands it seems.

Thanks again Alexander. Very appreciated ! Enjoy olympics in case you follow them :-)