openhab-rules-tools
openhab-rules-tools copied to clipboard
Use ItemStateUpdatedEvent where ItemStateEvent was used
With OH 4 release the new ItemStateUpdatedEvent and GroupStateUpdatedEvent were introduced and ItemStateUpdatedEvent replaced ItemStateEvent. Rule templates that do something different based on the trigger need to be updated.
Did you add your middleware in settings MIDDLEWARE?
settings.py
MIDDLEWARE = [
...
"inertia.middleware.InertiaMiddleware",
"core.middleware.inertia_share",
]
Thanks, will see if this works. Because I'm just seeing the second middleware ("core.middleware.inertia_share") for the first time.
And I noticed that after form request using useForm() from the inertia vue the response comes like a modal containing the json as strings instead of pure json responses. Any fix for that?
"core.middleware.inertia_share" throws errors
"core.middleware.inertia_share" throws errors
"core" is your django app (usually you have at least one) "middleware" is your middleware python module (middleware.py) "inertia_share" is your middleware function (located inside middleware.py)
https://docs.djangoproject.com/en/4.2/topics/http/middleware/#activating-middleware
Hey @Fidel-C, I don't know of any issues here and this is working fine in my apps so I suspect it's something on your end that isn't clear in the docs. Could you provide some more information about your setup?
Thanks @dr3tt for the debugging help!