GPIO relay on/off timer

Hey :slight_smile:

Just installed HomeAssistant. So i’m a total beginner.

What i have so far:

The relay board is connected to the Raspberry Pi4 GPIO and i can turn on/off the relays using this configuration.yaml:

switch:
  - platform: rpi_gpio
    ports:
      2: GPIO 2
      3: GPIO 3
      4: GPIO 4
      ....

Manually i can control the dimmer states

  • “trigger relay on/off” - turns on the dimmer, when run again it turns it of
  • “trigger relay on/wait 500ms/off” dimms to ~50%
  • and so on…

Sadly i can’t predict the state of the dimmer.

The questions

Is there a way to lets say “programm” the behavior of the switch, e.g. on setting it to on turn on the relay, leave it on for 500ms to dimm to a certain 50%?

Is it possible to customize the GUI with additional buttons for ON / OFF and a slider (pull left dimms down, and pull right dimms up) ?

SainSmart 16-Channel relay board

Thank you

Dimmer (Eltako EUD12NPM-UC)