In this blog post, I will show you how you can expand your Home app to use devices that are not compatible out of the box with Apple’s HomeKit thanks to home assistant. Let me give you a few examples of devices that I’m going to expose in this post
Garage door opener, thanks to Shelly 1; a few nest products the thermostat and hello doorbell. Sonos playbase, a Zigbee Light strip, two ip cameras (Reolink, Annke) and my alarm panel.
If you are a home assistant user and a have an apple product (HomePod, Apple TV) then I would recommend doing this!
HomeKit as a few neat functionality that auto suggests automations when you add devices depending on what they are.
Configuration
You have two options, the user interface (UI), configuration file
User Interface
Go to the configuration tab, click on Integrations and add integration.
Search for HomeKit and add it.
Now, you can pick the different domains and entities that you want to expose into HomeKit. This is where you need to be careful not to have double entries. What I mean by this, if you already connected a light bulb, for example directly into HomeKit and you did the same thing with the home assistant app then ensure to exclude this, unless you want to devices that are the same in the Home app, confusing right?
Look at the notification tab in home assistant to find the QR code that you will need to scan.
Go to your home app (I’m using my iPhone), click on add accessory and scan the QR code. Now you will have added in the HASS IO bridge and all the devices that you have allowed.
So, you can set everything up with the UI, then why bother with the configuration file ?
Let me tell you why.
Configuration File
In my example, I have an alarm panel which I setup in home assistant that requires a code to disarm. When I tried to configure this via the UI, I could control every aspect of the alarm panel, apart from disarming, which actually is quite important.
Any other reasons ? It is faster to setup if you are copying and pasting like from this blog. And you can edit it with much more clarity. This is the code I used in my configuration.yaml.
Remember to access the configuration file you will need an add-on such as file editor or visual studio code (like I use).
homekit:
- filter:
include_domains:
- alarm_control_panel
# include_entity_globs:
include_entities:
- alarm_control_panel.home_alarm
- light.zignito_light_strip
- media_player.lounge
- camera.parking_bay
- camera.front_door
- camera.garage_camera
- climate.nest
- cover.garage_door
entity_config:
alarm_control_panel.home_alarm:
code: !secret alarm_code
media_player.lounge:
feature_list:
- feature: play_pause
- feature: toggle_mute
Restart home assistant after you added in the code, I’m using include_domains to demonstrate that you can add entire groups of entities. In my case I could remove it, as I have the home alarm in the entities too. You can also create an exclude list, if you want every entity in a domain apart from a specific one.
In the entity config part of the code, I’m adding in the !secret alarm_code which is set in my secrets.yaml this will me to disarm my alarm from the home app.
Media player configuration will give me the option to play / pause and enable disable mute.
For the full list of options check the home assistant guide
If you used the UI in the past and then decided to move to the configuration file, you will need to do two things:
- Remove the configuration from the integration page.
- Remove the reference in the home app, so that you don’t have dummy devices.
If you want to find out more about my smart home checkout my courses page –> courses.leonardosmarthomemakers.com
In this blog post, I will show you how you can expand your Home app to use devices that are not compatible out of the box with Apple’s HomeKit thanks to home assistant. Let me give you a few examples of devices that I’m going to expose in this post
Garage door opener, thanks to Shelly 1; a few nest products the thermostat and hello doorbell. Sonos playbase, a Zigbee Light strip, two ip cameras (Reolink, Annke) and my alarm panel.
If you are a home assistant user and a have an apple product (HomePod, Apple TV) then I would recommend doing this!