HADashboard widget, which trigger a scene / event / sequence


I wants to create an HADashboard widget, which will run a scene / sequence / event.
For example a “Good Night” widget that will run the following sequence:

  1. First turn_off “kitchen light”
  2. And then turn_off “Living room AC” (by sending a code IR through Broadlink)
  3. etc’

I also want to create the scene / sequence using the AppDaemon (python script).

How should I do it ?
There is a simple example that I can learn from it ?

Someone who can help ?

Have a look at AppDaemon 4.0.0 new sequence feature: https://appdaemon.readthedocs.io/en/dev/APPGUIDE.html#sequences

Thanks @tjntomas

  1. How can I install the new AppDaemon 4.0.0 (I don’t see any add-on in hassio).
  2. Did you try that already ?

I am not using hassio so I can’t be of any help im afraid. I installed using these instructions: https://appdaemon.readthedocs.io/en/dev/INSTALL.html

you may create the script in HA and then use the script widget on appdaemon to call it.

I see… @tjntomas
It’s looks like that the official hass.io addon for AppDaemon is version 3.0 for now,
I’ll wait for the AppDaemon 4.0.0 to be official hass.io addon .

Thanks, I wants to create the script in Appdaemon as well, means with Python (If possible).

One more thing: someone now how can I send a IR code (through Broadlink) using a widget ?

You may create a app in appdaemon to do what you want but. I dont know how to call a app from the dashboard directly… maybe using a event.

To send a IR code you will have to call the broadlink.send from your appdaemon app. It should look something like this:
self.call_service(“broadlink/send”, host = “192.168.1.x”, packet = “<IR_STRING>”)