Closed Bascht74 closed 2 years ago
androidtv documentation androidtv source (message by IssueLinks)
homekit documentation homekit source (message by IssueLinks)
Hey there @jefflirion, @ollo69, mind taking a look at this issue as it has been labeled with an integration (androidtv
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Hi, I tried to add it anyway to homekit. But the "Home" App says that "This device is not supported by the Home-App" (message is in German, so maybe a little different in English). Could the missing device_class be the cause?
I don't know if this is the cause, but I can confirm that in AndroidTV integration device class is not defined. Define a class is very simply, but we don't have any information to understand if a device is a TV
or a Receiver
. It is correct to assume that any Android device connected through this integration is a TV
?
I don’t know, but the integration says AndroidTV so tv seemed to be right for me.
If the integration is not able to detect it, the user could be able to choose it.
Without this information other integrations cannot work as desired.
Because @bdraco is in this thread. I will wait for his opinion. No problem to create a PR to add device class if he think that this make sense.
You cannot assume that every device will be a TV. I use Chromecast with Google TV on all my TVs in the house. This is the dongle, which I connect via Android TV integration but it is not a TV itself. I am not sure if designating the device class as a TV would hurt anything or not, but I wanted to make it know that you cannot just assume that any device is an actual TV.
Because at this moment just exist 3 device class, all cast device (as Chromecast or FireTV) probably better match to DeviceClass TV than any others. At the end these devices just transform a classic TV to a Smart TV.
I used customize to set device class to TV, as a workaround. In homekit I see a power toggle and source selection but volume controls don't seem to work.
I used customize to set device class to TV, as a workaround. In homekit I see a power toggle and source selection but volume controls don't seem to work.
could you give me your example, please?
@ollo69 I read here: https://www.home-assistant.io/integrations/media_player/#device-class
... that we should be able to select the device class in the customize section. But I don't see this option.
Here I can change it:
But for the anroidTV integration I don't see it:
There is a reference blog entry: https://www.home-assistant.io/blog/2021/12/11/release-202112/
The customize.yaml UI (customization) has been removed. The YAML configuration for this is recommended and remains available. To customize entities, use the entity settings available via the icon in the top right of the entity “more info” dialog (when clicking on an entity). Entity settings now also allows customizing device_class for certain binary_sensor and cover cases.
So setting the device_class is right now not available for media_players... This path could be another way to solve this: Add "show as" to the media_player integration itself.
I am curios for @bdraco opinion.
Seb
I use the customize yaml with an entry for the Android tv entity.
I use the customize yaml with an entry for the Android tv entity.
I tried that, but no success. Can you share you config entries for that?
Can confirm doing this manually and not through GUI (where it is missing worked). Not all buttons work but the remote connects
configuration.yaml homeassistant: customize: !include customize.yaml
media_player.android_tv_your_device_name: device_class: tv
make a new universal media player and add the tv media player to the children list then after attributes set device_class: tv
This should work and just a wrapper for your existing media players
then in devices on ha make a new home kit
choose accessory and NOT Bridge
select the Universal media player
and to homekit that media player and u will get a new qr
scan to add accessories in homekit
tv will appear
VOLUME USE IPHONE UP/DOWN Buttons
hope this helps you all
im cheynespc on community home assistant Universal media player Homekit accessories mode
Because @bdraco is in this thread. I will wait for his opinion. No problem to create a PR to add device class if he think that this make sense.
Because at this moment just exist 3 device class, all cast device (as Chromecast or FireTV) probably better match to DeviceClass TV than any others. At the end these devices just transform a classic TV to a Smart TV.
@bdraco I hope you can take a quick look after the holiday season... :-) Right now the official AndroidTV integration doesn't set a device_class so that you cannot use the created entity with your homkit integration. Before anything happens the code owners would like a short feedback from you :-) Another way could be to make the device_class (tv, speaker, receiver) customable in the entity dialog like with binary sensors (e.g. to set the device_class door / window / etc.). But I don't know who to ask nicely about this.
It does look like tv
is a reasonable device class for this based on https://www.android.com/tv/. Some of them may be headless but they still generally behave like a TV.
It would also be good to add customize support to the frontend for media_players as its expected that the device class may not always be perfect. As developers we can only accommodate the most likely use case.
Because @bdraco is in this thread. I will wait for his opinion. No problem to create a PR to add device class if he think that this make sense.
@ollo69 Could you please create a PR for it?
Maybe later on somebody can add customization to the frondend for media_players.
Before that everybody could use customize
in rare usecases if tv is not working for them.
For people that are using customize
right now to add the device_class, nothing changes in my oppinion.
So maybe this is not even a breaking change, only streamlining the usage of media players and homekit a little :-)
Great thx!
The problem
Hi,
i am setting up my homekit integration right now. I read about the supported components and TV devices here: https://www.home-assistant.io/integrations/homekit/#supported-components
But for my android TV media_player entity the device class is missing. The entity just got none. Could this be corrected an the missing device_class "tv" added for this integration
What version of Home Assistant Core has the issue?
core-2022.8.0b2
What was the last working version of Home Assistant Core?
-
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Andoid TV
Link to integration documentation on our website
https://www.home-assistant.io/integrations/androidtv
Diagnostics information
config_entry-androidtv-e9c8cc04dbf4da1d2245671b356cd74d.json.txt
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response