home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

Homekit - iOS 16 - input_select name not shown #78468

Closed ZeroHour closed 1 year ago

ZeroHour commented 2 years ago

The problem

I have updated a batch of devices to iOS 16 including my hub devices like AppleTV / Homepod and I have noticed the powerstrip workaround for input_select does not show the input select title for each of the powerstrip switches any more. The ipads on iOS 15.7 do work and show the various titles for each of the input_select options but iOS 16 just shows the input_select entity name as the title of each option.

Its not a huge huge issue especially given iOS 16 will have supposedly big changes core wise in a future update but I thought it was worth reporting so you were aware.

What version of Home Assistant Core has the issue?

core-2022.9.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Homekit

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

homekit documentation homekit source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

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)

bdraco commented 2 years ago

I expect this is probably relatively easy to reproduce, but it would be helpful to have a minimum reproducer example.

ZeroHour commented 2 years ago

I expect this is probably relatively easy to reproduce, but it would be helpful to have a minimum reproducer example.

I am not quite sure exactly whats needed (first report) but I have attached a couple of photos.

The helper entity: image

iOS 16: image

iOS 15.7: I will grab a screenshot later but basically those buttons would show "Normal" "Away from home" "Evening Mode" as the power strip switches rather than multiple "House Mode" titles.

I just started playing with the input_select a couple of weeks ago trying different things.

smart7324 commented 2 years ago

@ZeroHour I'm having thee exact same issue with a completely different integration using homebridge and homebridge-hue plugin. The names for all my switches are not shown, just the name of the device as it is on your screenshot. Also siri can't find the right switches now... I hate every single HomeKit update. Apple destroys it again and again. So it's definitely a HomeKit iOS 16 issue. On Home App on macOS 12.6 and iPadOS 15.7 the switches show the correct name in the same setup.

ZeroHour commented 2 years ago

@Hubsi3 yeah it could be an iOS 16 bug but I just was not sure if it was a HomeKit api change which is why I reported it. Let me know if you hear more.

smart7324 commented 2 years ago

@ZeroHour Also found 2 other: https://www.reddit.com/r/HomeKit/comments/w9zzfo/anyone_else_experience_sensors_attached_to_a/ https://community.home-assistant.io/t/ios16-homekit-with-input-select-states-all-named-equally/460863

Ok thank you. Please let me also know, if you found something. Currently I can not control my devices through siri... so annoying again.

ihaettypo commented 2 years ago

Same problem here. To reproduce simply include an input_select with mutiple options in your homekit bridge configuration, the target device must be ios 16.

smart7324 commented 2 years ago

Workaround: You can rename them manually. Just click on the Main device -> then on devices and then you can edit the names of the single switches by clicking on them. If you remove the "wrong equal name" then the correct is showing. You can then manually type this name and this change is persistent (also after reboots, HomeHub switches, iCloud Syncs of HomeKit and Homebridge/HA restarts". This fixes the situation for me, even if it was a pain to rename all my 190 scene switches manually. Done in 30 minutes and now it is working. But anyways: shame on apple...

bdraco commented 2 years ago

I looked into this, and it doesn't look like we can do anything to fix it on the Home Assistant side as the name is coming through, but iOS is just not using it.

I think we have to wait for a fix from Apple

e95jb commented 2 years ago

I have the same issue

bdraco commented 2 years ago

🀚 I have the same issue! πŸ‘‡ Read below

Hi there! Sorry to read you are experiencing the same issue as other people here. Nobody likes having issues 😞

Finding an issue on a GitHub issue tracker that matches your problem is kinda nice: At least you know you are not alone. So, let's leave a comment with: "Yeah, I have the same issue", or "+1!!!". 🚫 No!

Please do not create "I have the same issue" comments!

Not just this issue or this project, but anywhere on GitHub or any issue tracker on the internet even. It doesn't add to triaging the issue. It only generates noise when reading / triaging the case.

What to do instead?

Instead, go to the top of the issue, and add a πŸ‘ emoji reaction. That way, we can still see that you (and how many others) experience this issue while keeping the issue threads nice and clean.

daredoes commented 1 year ago

I believe this bug comes from this line in the source code. I'll try doing some testing to see if my hypothesis is correct.

daredoes commented 1 year ago

Took some time to dive into it as best as I could, it being my first time looking at HAP-Python.

It looks like the outlets are created as services tied to the main Accessory, but these outlet services are created without dedicated Accessory elements. When HomeKit takes in the main Accessory, it seems to pass it's own AccessoryInformation service to each of these outlet services. This contains the primary Name characteristic that seems to be used by HomeKit, the value we all have an issue with.

Personally, I want to implement the input_select as some sort of Fan/Climate device since it supports "Mode" strings, while having an outlet named "Off" creates an issue with the Siri command "Turn Input Select Option Off On" (it says you can only use one choice for off or on).

cayossarian commented 1 year ago

yes same problem here. Included a screen shot. Goal was to use these options to get stateful scenes in HomeKit.

The work around for me is to separate the power strip within HomeKit to separate tiles, test each tile, rename them individually, and then select one of the separated tiles and put it back to "Show as single tile" causing iOS to retain the names.

input_select:
    master_light_select:
    name: Master Lights Select
    options:
      - None
      - Bright
      - Medium
      - Minimum
    icon: mdi:lamps

Screenshot 2023-03-19 at 7 42 23 PM

RXM307 commented 1 year ago

Workaround: You can rename them manually. Just click on the Main device -> then on devices and then you can edit the names of the single switches by clicking on them. If you remove the "wrong equal name" then the correct is showing. You can then manually type this name and this change is persistent (also after reboots, HomeHub switches, iCloud Syncs of HomeKit and Homebridge/HA restarts". This fixes the situation for me, even if it was a pain to rename all my 190 scene switches manually. Done in 30 minutes and now it is working. But anyways: shame on apple...

Interestingly when you rename them they show the correct names as the suggested name.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.