Trigger HomeKit scenes from HA

Tags: #<Tag:0x00007fc402f223a8>


Is there a way to call a script (scene) which is on HomeKit, from Home Assistant.
If not, is there a way to store the current light states to a new HA scene?

1 Like


Why not the other way? I mean run scripts on HomeKit that are written on Home Assistant.
You have two separated things: HomeKit and Home Assistant right? Or HA is making homebridge to your HomeKit?

I have HassIo, running with the Homekit component. I don’t use HomeBridge anymore since.
But I use Siri a lot, and that won’t work for calling HA scenes.
So the scenes I use with Siri are in Homekit.

But for some automations (like dimming lights while watching movies) I want the lights to come back to the default state (the scene in HomeKit)

Have you found a solution to this? There is an option in the Homekit component to include ‘scenes’ but it’s not working for me.

That’s the other way around; you’ll expose the HA-Scenes to HomeKit. :wink:

I don’t think you can expose scenes from Home Assistant to HomeKit, but you can create scripts in HA that run scenes. You can then expose those scripts to HomeKit (a workaround to expose HA scenes to HomeKit).

You can show HomeKit lights, switches etc. in HA with HomeKit controller support. Although it looks like it doesn’t support importing HomeKit scenes. Maybe there could be a workaround to include scenes, I’m not sure.

I tried to do this in the past but have ended up creating all scripts, scenes etc. in Home Assistant, then exposing all of those to HomeKit (see my previous post about a workaround to exposing HA scenes to HomeKit by running them via scripts).

For me this has been the best way of using Siri/HomeKit along with Home Assistant.

excellent. I will give it a try. But Im not sure where to start. How do I write a script that communicates with Homekit / the Homekit Controller? Still learning the ropes.

Here’s an example of a script that runs a scene in Home Assistant, and below it how it would be exposed to HomeKit:

    alias: "Bedtime"
      - service: scene.turn_on
        entity_id: scene.bedtime

  auto_start: true
      - script.bedtime_scene

You would put this in configuration.yaml, unless you've separated your .yaml files for scripts, scenes, etc. into separate ones.

This is exactly what I needed, thank you!

Well, now I’m stumped again. I have the following in my yaml file, but upon rebooting, I get an error on the overview screen that says : Invalid Config The following components and platforms could not be set up: script

The scene in Homekit I am trying to access is called “Editing” for when I edit on my computer. What am I doing wrong?

alias: “Editing”
- service: scene.turn_on
entity_id: scene.editing

auto_start: true
- script.Editing_scene

  • PS, spacing seems to be correct in the yaml file but it is not showing up correctly here.

Try changing Editing_scene: to editing_scene: (all lowercase). The only place you can use Title Case/UPPERCASE in .yaml is in the names and aliases of your entities (in your case alias: Editing should be fine).

Also, it looks like you have smart quotes around Editing for the alias, try to use regular straight single or double quotes ( ’ or " ), or don’t use them at all for names.

Once you’ve pasted your code here on the forum select it and click the button </> to keep the formatting (see the top of this or any post post about formatting)

Hi there, basically it worked for me too. However, homekit interprets the scenes as a switch for me. Is that the same with you?

Yes, they appear in the Home app as switches for me too.

This is an old thread, but I thought I might add my experience to the mix. I went through the same struggle as others, trying to figure out how best to handle scenes with a mix of HomeKit and HA devices. What worked best for me was creating a script (rather than a scene) in HA, and then exposing it to HomeKit. As others have mentioned, it is interpreted as a switch. I then added that “switch” to an actual HomeKit scene. Sometimes by itself, and sometimes with other HomeKit devices. Now I can say “Hey Siri, Movie Night” and it will turn on the “switch” as part of the Movie Night HomeKit scene, which will then run the HA script.


I am not sure when this was added, but I was able to add a Home Assistant scene entity to my configuration.yaml file and call the Scene on Siri.

Example entry:

      - scene.movie_time # Movie time

Old post but i can’t to use the scenes from HA to scenes in HomeKit, only as switch… this is annoying there is any solution for this?