Set device exposed feature in automation

I have a dimmer that you can set the brightness of without turning the light on. I want to be able to update this with an automation so that the lights are set to low after sunset and high after sunrise, that way when they are turned on from the physical switch they will already be at the right brightness.

Is it possible to set an exposed z2m feature from an automation?

Generally, you can use the mqtt.publish service.