Hello, @TAustin
Excuse my ignorance, could this be related to the improvement announced in beta firmware 041x?
I asked what they meant and how to use it and I have still received an answer.
In case it helps you, as another option for what you want to do.
Now that the profile changes work better and it is only necessary to clear the cache the first time it is done, I am using this method to do something similar to what you want to do.
-
I create two profiles, one with all the capabilities and the other without the optional capability
-
I create only one VID with all the Capabilities and apply it to both profiles.
-
I create a preference or a custom capability to enable or disable the capability that I want as an option.
-
If you do it with custom capability, you have to put it in the VID and you can also enable and disable it with routines.
-
The infoChnged code, if you use preferences, or in the custom capaility handler, you write the profile change code.
-
When you disable it, the capbility disappears from the detail and automation view and if you enable it, it appears just by closing and opening the app.
-
It’s working fine for me
Profile with Motion Sensor Enabled:
Profile with Motion Sensor Disabled: