My ioBroker driver for controlling Eufy HomeBase cameras is updating by adding new attributes with the same name rather than replacing the values of attributes I declared. My code and screenshot attached.
Parsing:
My ioBroker driver for controlling Eufy HomeBase cameras is updating by adding new attributes with the same name rather than replacing the values of attributes I declared. My code and screenshot attached.
Parsing:
If you refresh the screen are the multiples still there?
I am able to replicate this problem in a minimal driver if I use spaces in the attribute name. I'm not aware of anything saying this is strictly forbidden, but it is definitely non-conventional; convention is to use camel casing starting with a lowercase letter, like thermostatOperatingState
or colorMode
. I would suggest using attribute names like that instead for this reason alone.
However, I'm still not sure that what you're seeing should actually be happening, and I did not test whether it was just a display issue or if the underlying event creation (and apps that may subscribe, etc.) were affected. My hunch is that it might just be a display issue in the browser; the duplicates disappeared when I refreshed the page, as @thebearmay asked.
Guessing @gopher.ny might be the person to ask for this.
Minimal test driver:
This demonstrates the issue above; to "fix," replace instances of my attribute
with myAttribute
(or similar).
metadata {
definition (name: "Test Driver with Custom Attribute", namespace: "Test", author: "Test") {
capability "Actuator"
attribute "my attribute", "STRING"
command "setTheAttribute", ["STRING"]
}
}
void setTheAttribute(String value) {
log.debug "Setting 'my attribute' to: $value"
sendEvent(name: "my attribute", value: "$value")
}
void installed() {}
void updated() {}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.