I finally found a workaround to control my Legrand Switches with Home Assistant. It’s not ideal and maybe someone knows of a better way, but it works for now.
I already have my switches working with Alexa so what I do is use the Alexa Media Player integration to send a command to my echo to run a routine.
To set this up, first set up an Alexa routine with what you want your switches to be set at. I set up a routine for my lights be off, another routine at 50%, and another routine at 100%. I then set up a script to send the command to alexa to run that routine.
Here’s the example I used to set up the script:
plant_light_off:
alias: Plant Light Off
sequence:
- data:
entity_id: media_player.bruce_s_echo_dot
media_content_id: plantLightOff
media_content_type: routine
service: media_player.play_media
I can then call that script in automations that I want to control the Legrand switches with.
There’s a bit more info in this thread:
Hope that helps.