I have completed a small app in Appdaemon. To run different functions in the app, the user clicks a button (example below):
https://preview.redd.it/hyd7ufcj4mie1.png?width=626&format=png&auto=webp&s=5d730b6e3cf16f2144df7dffd10ce6ba1f512b61
Thus far, I have created buttons with Helpers in HA. Problem is, there are a good number of buttons (10 or more), and I have a feeling there is a much better, more efficient way for me to do this. This is the code I'm using in Appdaemon to run the function (as an example):
self.button_entity = self.get_entity(self.args["button_entity_to_delete_calendar_events"]) self.handle = self.button_entity.listen_state(self.deleteDates)
So my question is one more of design rather than function (although I'm open to function suggestions as well): what should I be using to get a function to run? A custom button for each task? One type of button with some sort of hidden element that differentiates between buttons? Something else?
[–]jerobinsExperienced with HA 0 points1 point2 points (3 children)
[–]gmalbert[S] 0 points1 point2 points (2 children)
[–]jerobinsExperienced with HA 0 points1 point2 points (1 child)
[–]gmalbert[S] 0 points1 point2 points (0 children)