com.swttt.homekit
com.swttt.homekit copied to clipboard
Sensative strips shown as switches
Hello,
Today suddenly all my Sensative strips (contact sensors) shows up as switches in Home. Have tried excluding and including them, to no avail. Any ideas? :-)
The Sensative app was updated 5 hours ago, so I guess there were some (internal) changes that are causing this behaviour.
This is the answer I got from the developer:
«Hmm, that's odd. Nothing was changed about the device class. Possibly, the tamper alarm capability was added on update, if you initially added the Strips with a version prior to 2.0.1 (more than a year ago).»
My Strips was added just a few months ago...
It's not just the device class that Homeykit looks at, it's also the capabilities. Homeykit hasn't been updated for quite a while now, so I can only attribute any changes in its behaviour to external causes.
@jahnkenneth made a good point: the new Sensative app version added maintenance actions. It's new homey functionality. In the metadata, these appear as a "button" type capability.
For example, the Strips Guard (a contact sensor) capabilities list now looks like this:
"capabilities": [
"alarm_contact",
"alarm_tamper",
"measure_battery",
"alarm_battery",
"button.reset_tamper_alarm"
],
Since HomeyKit doesn't know about maintenance actions (yet), this looks like a device that has a button; hence it's now shown as a switch, I'm guessing 🙂
As far as I can tell, the only way to tell maintenance actions apart from a "regular" button, is to call the getCapabilityOptions(capabilityId) method (on Device) which should have a maintenanceAction: true
property.
@Thorarin Any luck? Or would it be possible for me to «downgrade» to the previous version via CLI?
@Thorarin Any luck? Or would it be possible for me to «downgrade» to the previous version via CLI?
You could downgrade, but it's not really a solution because other developers might also start adding maintenance actions left and right. I've made a pull request for HomeyKit that makes it ignore maintenance actions.
Hopefully @robertklep will fix this soon, eventhough he has moved on from Homey :-)
I have now downgraded to the previous version, but HomeyKit still shows it as a switch... Have tried excluding and including it in the settings... What to do?
You probably have to re-pair the device.
Normally, you would, yes. The "problem" is that capabilities are persisted by Homey once added, so downgrading alone has no effect. See https://github.com/Thorarin/com.sensative/issues/25 to install a special version that removes the existing capabilities, so you don't have to re-pair the devices.