Hi,
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?
Hi,
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?
Hello!
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.
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:
script:
bedtime_scene:
alias: "Bedtime"
sequence:
- service: scene.turn_on
entity_id: scene.bedtime
homekit:
auto_start: true
filter:
include_entities:
- script.bedtime_scene
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?
script:
Editing_scene:
alias: âEditingâ
sequence:
- service: scene.turn_on
entity_id: scene.editing
homekit:
auto_start: true
filter:
include_entities:
- script.Editing_scene
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:
homekit:
filter:
include_entities:
- 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?
Thanks
There is no solution. That is how they are exposed. Create a new HomeKit scene that turns on that switch.
I found a workaround: create an extra helper switch in Home Assistant, expose that to Homekit.
Setup an automation in Homekit that whenever the HA switch gets toggled, a scene gets triggered.
Its a workaround but Homekit seems to pick up these changes quite quickly.