pychromecast icon indicating copy to clipboard operation
pychromecast copied to clipboard

Expose 'manufacturer' and 'product_name' properties in 'Chromecast' class.

Open pjgrochowski opened this issue 2 years ago • 1 comments

Expose 'manufacturer' and 'product_name' properties in 'Chromecast' class.

[Justification]: Field 'model_name' evaluates to 'Chromecast' for all device models. Field 'product_name' allows to actually distinguish between Chromecast models:

  • Chromecast 3 => 'caprica'
  • Chromecast Ultra => 'steak'
  • Chromecast Android TV => 'sabrina'

pjgrochowski avatar Apr 17 '24 17:04 pjgrochowski

Hmm. Didn't realize cast_info was public already. Seem pointless yes. One can wonder why we expose the others then.

It's due to some old design choice to forward selected attributes and methods from sub-objects to the Pychromecast object.

See for example here: https://github.com/home-assistant-libs/pychromecast/blob/491789843f2bde6c21fe428c387d4064c425a191/pychromecast/init.py#L344-L356

It's currently applied very inconsistently; new functionality has not been forwarded like this for several years.

Notice how media_controller.play_media is forwarded, but no other methods of it are.

emontnemery avatar Aug 31 '24 08:08 emontnemery

Since no feedback from developer and this change is incomplete, let's close this for now.

elupus avatar Nov 13 '24 18:11 elupus