Short version: Can we please get presense sensors to show up in Room Automation, it only shows Motion sensors.
Long version: I have motion sensors that only Homekit (ugh, Aqara FP2). I shared Virtual Presense w/ Switch to Homekit and a Homekit automation triggers those nicely. However to use that anywhere in Hubitat I need to make another rule that sets a Virtual Motion sensor to always mirror the Virtual Presense sensor. Seems silly over one flag.
For those that havent hit this issue but are about to ask, you cant share Virtual Motion w/ Switch to Homekit and have it be changable on Homekit.
You can use the switch turning on in Hubitat rather than mirroring the device. This is true in Room Lighting as well. Just use the presence switch as On to Activate Room Lighting.
Also, Hubitat defines presence as arrival/departure. Devices like FP2 say presence but are really advanced motion sensors
Can you post your settings? In Means to Activate, you just need to select Switches that Turn On. This should allow you to select the Virtual Presence with Switch. It works on my end. I use the built in version for presence via HomeKit and can select the switch as an option.
ok, I found what you are talking about, it turns out when you import a rule from the old "Motion and Lighting App" you cant change it to one based on anything but motion, so whatever, I deleted it and made a new one, and I see what you are talking about.
However! The new Room Lighting App is terrible.
I set it to turn on based on presence (see original issue), it does, and when presence goes away, it turns it off. But if I put a delay time in turning off... ugh. When it gets the "no presence" signal, it starts the delay timer, but if I come back in before the timer expires it still turns it off when it expires. The old app was WAY smarter about this.
I cant set the delay off time based on the current mode or time or anything. I like to have the off delay be really short late at night, and longer in the day.
In Room Lighting motion (and contact) sensors have built in delay management that matches your use case. Presence and switches do not have identical options. Your case is easily handled if your virtual device has motion sensor capability as well as presence and switch.
Since you are using the switch in Apple Home this one is a good choice. (There are other multi-capability virtual devices available, search in the community or HPM)
“Presence” sensors in Hubitat mean something else.
Presence is used to denote arrival/departure from the hub’s general location, for example with a mobile phone when you arrive at home, or leave home.
This pre-dates the availability of mmWave sensors that can detect a person in a room while they are still, unlike PIR “motion” sensors.
In Means to Activate, there is a category called "Activate Light Options." You'll find a drop down box titled "Additional Options." In that drop down, select "Activate even if partially activated." Every time presence becomes true, it will reset your timer.
If you are using modes, just create as many different Room Lighting instances as you need. Restrict them so that only one can be active based on the mode (using limiting activation in Means to Activate).
The problem with this is when used with HomeKit you cant set the switch state, because homekit makes sensors read-only even if they have a switch element. I've had a motion sensor w/ switch device for years and it never works with homekit
This does not make sense. What driver are you using for the device to send to HomeKit? The built-in Virtual Presence with Switch works just fine in Homekit. I use it to determine arrival and departure within Homekit via automations and the switch turning on/off is reflected in Hubitat.
Additionally, I just tested and can use motion sensors in Homekit to also flip the device on and off. That is why I'm asking about what driver you are using. Further, the recommendation from @bill.d is a good choice. In the Homekit app within Hubitat, you can choose to just export the switch portion of the device. This would then allow the FP2 to just turn on and off a switch which Homekit handles fine. This flipping would cause the motion sensor part in Hubitat to show as active and inactive.
I'm using the built in Presence w/ switch, which does work with Homekit, but on the hubitat side I need motion not presence.
How do I share only part of a driver with homekit, if I add that uDTH driver it only shows up in one category of the Homekit config page (on hubitat). I've also tried the Virtual Motion w/ switch (found on github), it also shows only in the switch section of the homekit config, yet in homekit its still a motion sensor and thus cant be changed
Unfortunately you can't using Hubitat's HomeKit integration. The 3rd party Homebridge integration has capability filtering capabilities.
I think the way the Hubitat HomeKit integration works is to check capabilities as defined in the driver and pass them all. Even though you might have only 1 or 2 capabilities activated in the driver they are there in the background.
See next post, Hubitat filters capabilities by clicking the small circled minus sign
If this device is showing in the Hubitat HomeKit app as a switch then that should be the device that shows in Apple Home. Because of the lack of capability filtering it will have other capabilities in Apple Home. So you will see a motion sensor too. Look in the Home "Other" area to see if it there. If you don't see a switch you have some other issue in the system. Whether that is Hubitat or Apple I don't know. I've not had an issue like this before.
I will say I've never used this virtual device and I don't think I like it as it is. It shows low battery and a leak even though I don't have either. There is a user created presence + switch driver. It would only take a little effort to add motion to it.
This isn't true. Hubitat's implementation allows for removing capabilities and exporting devices as a different type of device.
If you haven't yet, look at the docs for Homekit (HomeKit Integration | Hubitat Documentation). At the bottom of the Homekit app, make sure you have the "Show accessory classes and characteristics" selected. This will show all possible options for the device using the uDTH driver. If you go back to your virtual device, you should see the various options that it can be exported to Homekit. Just select switch. You can also delete the extras if you want. Below is a picture using the light weight version of the uDTH that should show you what it looks like.
Ok, in the end this all works, but wow what a journey of workarounds and unclear UI. Dont get me wrong, I love Hubitat and have been using it for 8+ years but, they really need to hire a UI/UX engineer.