i think that if there is an option to change names from other parties, or use other ways to avoid double names, there is no reason to create breaking changes.
there will always be third parties that use the same names, for sure when it gets to things like “events, entities, new, old, attributes, etc” in an automation development.
it could very well be that if Andrew changes it to “event_name” then some other components will get a problem, because they use event_name in stead of event.
i didnt get that you are the third party
isnt that event also in the attributes?
or could you add it there?
then there wouldnt be a need for listen_event at all and noone would have to have breaking changes.
This is the way to go I think - the filtering function of listen_event() is optional - you will still get the callback, and you simply need to use an if statement in your callback to check the id and event entries in the data parameter that AppDaemon supplies to you.
It’s a couple of lines more code, but no one has to make any breaking changes
Not really - the filtering is just a convenience function - either way there is an if/then evaluation either implicitly in the appdaemon code if you specify the additional arguments and they match fields in the event data, or in the app where you are handed a complete set of the event data anyway.
@Try2Fly would you be willing to post a full AD example of this? Either here or as an PR for the component documentation. Would be really nice to have an AD example in the documentation.
btw chances are that the event codes 1000 and 1002 for pressed and released will be swapped in the next version of the deconz rest api, as this is now a pull request.
Hi @Try2Fly i’m new to AppDaemon, to use your script i need something like automation? I installed and configured Appdaemon, changed the light name but it doesn’t work