I am trying to log the current attribute from the Aeotec Smart Switch 6 built in driver and I would have thought I could look up the currentMeter capability which has the attribute 'amperage' but it looks like the attribute on the built in Aeotec Smart Switch 6 built in driver calls it 'current' and it doesn't show up under the currentMeter capability. Am I doing something wrong or is the current measurement from that driver not properly mapped as a current capability?
Looking at capability list in documentation currentMeter has an "amperage" attribute and there is no "current" attribute. It feels like to me that the driver doesn't properly link the "current" attribute as amperage linked to the currentMeter attribute.
Any one (including Hubitat Devs) have any thoughts on this?
Agreed that Amperage isn't technically missing as I don't think it was implemented but there is a value on that driver that shows current (instead of using the work Amperage) as the value is in amps as far as I can tell:
So I think it would be to map that value to the "amperage" attribute in the currentMeter capability as far as I understand.
This is a built in driver so Hubitat Dev's would need to do that I believe.
Again I think the driver COULD be enhanced to add the currentMeter capability and just duplicate the current value. Then of course you could recreate the driver and add in the Capability yourself.
Yes, but if I write an app that gives me a selectable list that has any device with a capability currentMeter capability with an attribute of amperage, it doesn't show up from this driver.
So in an app, if I do something like this:
input "currentMeters", "capability.currentMeter", title: "Current Meters", multiple: true, required: false
when I pick the list box, it doesn't show my device that has 'current' in it, as it is not mapped as a currentMeter capability to the attribute 'amperage'. And there is no 'current' attribute listed under a capability in the documentation here:
So I can't find the capability that the current value on the Aeotec Smart Switch 6 is set to so I can't generically find it from the app I am writing.
As for this, yes, I guess I could try to rewrite the driver but ideally it would be nice to have the original driver source code which isn't available and just mod it to add the capabilty instead as that would be the fastest way for me to get there but I thought if this is something that made sense to others including Hubitat Dev, then hopefully they can make that change and improve it for all as it would be built in and by default work that way!
I guess, as a long time user of Hubitat, yet also a maintainer of code packages, the difference in response time is a big deal to me. If your suggestion was aimed at code I maintain, I'd investigate and test at the next opportunity, usually "tonight" and then if testing works, released soon after. You'd use HPM to update and bam... done.
Hubitat doesn't have that option. it might be a week, a month or more to get that change queued up into a platform release.
Therefore, a lot of my advice, everywhere, not just this topic, is trying to offer advice that leads to instant gratification Thus my advice to write your own.
All good and understand the advice as well so appreciate it. Thanks! This isn't a critical issue for me so I can be patient and hope that the Hubitat Dev sees this and puts it into the native driver. Just trying to make the overall product better and more consistent along the way
I didn't check but the Aeotec Smart Switch 7 might be similar, given it's small technical differences.
In other words, any device that is reporting "current" is probably doing so with an explicit Attribute vs the Capability.
To be clear, I'm just the "interpreter" in this The "current" Attribute has the correct values and unit. The query came about when the OP was trying to select based on it... can't be done.
I think the built in driver is not using the currentMeter capability and setting the current measurement to a 'current' attribute rather than the 'Amperage' from the currentMeter capability. Is it possible to update the driver to use the currentMeter capability and have the measured current that is in it now mapped to the Amperage in this capability? I was trying to do something like this in another app;
So in an app, if I do something like this:
input "currentMeters", "capability.currentMeter", title: "Current Meters", multiple: true, required: false
so that I can pick up this device in the list to pull in the current but it doesn't see it as it doesn't have the capability set up even though the device does show a current in it.
Hope this makes sense. Is it possible to get the driver updated for a future firmware release?