Controlling outputs

Hi all,

is it possible to control multiple outputs from 1 light component. I want the power supply to come on when the light is turned on.

> light:
>   - platform: monochromatic 
>     name: "Cabinet Lights"
>     id: cabinet_lights
>     output: output_componentR
> output:
>   - platform: esp8266_pwm
>     id: output_componentR
>     pin: D2
>     inverted: false
> 
>   - platform: gpio
>     pin: D0
>     id: power_pack_output
>     power_supply: power_pack
>     inverted: true

Thanks.

Just create an automation within ESPhome

Or this https://esphome.io/components/power_supply.html