I’m making edge driver.
the capability is list type.
When the value is changed. It works well.
But not select any value or select same value.
then spinner displays for a while and there is a message.
“A network or server error occurred. Try again later”
handler
local newdevice = command.args.device
device:emit_event(capabilities[command.capability].device(newdevice))
This field allows you to explicitly inform the platform that an event is a state change. The most common use case for this is button events. Because the attribute value for a button press is always the same value, if you press a button twice in a row, regardless of the time between presses, the platform won’t see a change in value and thus would treat the event as not being a state change, and so the event would not be forwarded to subscriptions (rules, connected services, etc.) By specifying state_change = true you can force the event to be treated as a state change regardless of its relationship to the previous value. It is important to note that state_change = false is not guaranteed to be treated as not a state change, as a value different from the previous state value will always be treated as a state change regardless of this field.
local capabilities = require “st.capabilities” local event_state = capabilities.button.button.pushed({ state_change = true }) – or if an attribute doesn’t have enum values local event_state_2 = capabilities.button.button(“pushed”, { state_change = true })