Okay, I’m creating a clean branch. Well, I can’t start from Gladys master, shouldn’t I create a branch in my fork? Or my master also contains zwavejs, I think that’s the issue, I should have created a special branch for my demos…
Before even talking about the code, I think it would be good if we agree on what we want at the feature level, because in my opinion there are many ways to do this, and it’s not a simple feature:
Typically, the « event starts » trigger is useful, but often what we want is « event starts in 5/15/30 minutes » (if you want to receive a reminder 15 minutes before leaving for an appointment, for example). Knowing that this is a very different paradigm, it will change the implementation a lot (since you have to program each trigger and not each event), so you need to think about it beforehand.
As for event selection, how does it work? Is there a list and you select an event from the list? Do you take all events that contain this string? In my opinion, there is a real reflection to be had on this, it may be useful to have a trigger that is triggered on a specific event, or on a match of a specific text, in any case it must be clear in the UI.
Indeed, the feature is incomplete! I have just started the developments of what also goes into the heart of Gladys (and especially the UI part) Isn’t this a good way to work?
The reminder is managed via the reminder given by CalDav. But we would need to update the « calendar_event » data model to include the value; We could also specify the reminder when creating the scene and thus create the trigger when creating the scene. But in this case, we lose the triggering outside the scene, for example a notification on the UI or Telegram.
« Know how to retrieve info for event conditions »: to do
The current condition ‹ user › + ‹ calendar › + ‹ event ›, where ‹ event › is a regular expression (e.g. condition Papa/maman works for Papa, Maman Papa/maman, I admit it’s quite specific to my needs)
Rights are not managed and it seems quite complex to me.
No problem, there was nothing negative in my message!!
This is exactly what is being debated. In my opinion, it’s more of a thing we would like to manage in the scene rather than in the calendar, because typically we might want several scenes to be triggered by the same event, for example:
30 minutes before the appointment, send me a Telegram notification
15 minutes before, if I haven’t left the house, play a sound in the house
5 minutes before, make all the living room lights flash!
In my opinion, the programming should be specified in the trigger rather than in the calendar, and it’s actually simpler to understand in terms of UX, I think.
On this point, perhaps we should propose several cases:
Selection of a specific event (is this useful?)
Event whose title contains this text (and on this point, we need to be clear in the UI, the word « regex » is not obvious to everyone )
I think the discussion with @bertrandda should continue with this development in mind so that we can make something that is coherent overall
That’s the goal
In any case, congratulations on the first development, it’s great! My remarks are only positive, the goal is mainly to move forward!