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
73.67k stars 30.8k forks source link

Hidden Helpers are not visible in HomeKit configuration #71246

Closed matthiasdebaat closed 2 years ago

matthiasdebaat commented 2 years ago

The problem

In the HomeKit configuration flow, hidden Helpers are not displayed and therefore are not pushed to the Apple Home app. Enabled Helpers are show in the config flow. Hide them afterwards stil keeps them in the Home app. Editing the config flow makes them hidden again.

What version of Home Assistant Core has the issue?

core-2022.5.0b6

What was the last working version of Home Assistant Core?

core-2022.4.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

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

Can you give a few more lines about what you expect the behavior to be?

Do you want the bridge to reload whenever you hide them in the UI? That would be quite expensive as it has to do a full resync which we try to avoid.

matthiasdebaat commented 2 years ago

I expected when hiding entities it only hides on my auto-generated dashboard, but it's still available in config flows for integrations like HomeKit.

I've got an input boolean that I toggle in the Apple Home app on my iPhone when I'm away or home. I find this one of the best presence detection I have. I don't need this boolean on my dashboard.

bdraco commented 2 years ago

I'm assuming you are using exclude Inclusion Mode. If you switch to include Inclusion Mode it should allow you to add hidden ones as specific inclusion will override the logic:

                if (
                    ent_reg_ent.entity_category is not None
                    or ent_reg_ent.hidden_by is not None
                ) and not self._filter.explicitly_included(entity_id):
                    continue
matthiasdebaat commented 2 years ago

Both gives me an empty list. Tested on Chrome and Safari.

CleanShot 2022-05-03 at 17 01 02@2x

This is my input_boolean

CleanShot 2022-05-03 at 17 01 59@2x
Daneish commented 2 years ago

I have a similar issue as Matthias, but via YAML instead of the frontend. I was attempting to add a hidden device (switch.whole_house_siren) with the following config:

homekit:
  - name: HA YAML Bridge
    filter:
      include_entities:
        - switch.whole_house_hot_water_plug
        - switch.whole_house_siren
    entity_config:
      switch.whole_house_hot_water_plug:
        type: outlet
      switch.whole_house_siren:
        name: Whole House Siren

The non-hidden enabled device, switch.whole_house_hot_water_plug appears in HomeKit, but the hidden device, switch.whole_house_siren does not appear.

For context, the entity is hidden automatically as it is part of Switch as X. The Switch as X entity is a siren which is not yet compatible with the HomeKit integration. (As a cheeky side note, adding the Siren domain to HomeKit would also workaround this issue 😅).

I have tried reloading HomeKit, restarting Home Assistant and HomeKit Reset Accessory service, all have no effect. There are no relevant entries in my Core logs.

To workaround this issue, and thanks to the fix #71250, I was able to add the entity to HomeKit by creating a new HomeKit instance using Include through the frontend. But I figured it was worth mentioning incase others experience the issue.

Would it be preferable to add to this Issue, or should I raise a new one? Happy to do whatever works better for you guys.

I’m happy to provide any more information or testing as needed.

Thanks for making my favourite piece of software!

System Health

version core-2022.5.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.9
os_name Linux
os_version 5.10.103-v8
arch aarch64
timezone Australia/Sydney
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4887 Installed Version | 1.24.5 Stage | running Available Repositories | 1051 Downloaded Repositories | 16
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 29 May 2022, 10:00 relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | ap-southeast-1-0.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 7.6 -- | -- update_channel | stable supervisor_version | supervisor-2022.05.1 docker_version | 20.10.9 disk_total | 116.7 GB disk_used | 70.8 GB healthy | true supported | failed to load: Unsupported board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.3.3), Samba share (9.6.1), Check Home Assistant configuration (3.10.0), Terminal & SSH (9.4.0), AdGuard Home (4.5.1), Portainer (2.0.0), Home Assistant Google Drive Backup (0.107.2), Studio Code Server (5.0.2), Mosquitto broker (6.1.2), Eufy Security Add-on (0.8.4), RTSP Simple Server Add-on (v0.17.6), Duck DNS (1.14.0), Scrypted (v0.0.176)
Dashboards dashboards | 4 -- | -- resources | 3 views | 19 mode | storage
Spotify api_endpoint_reachable | ok -- | --