Home assistant dimmer switch configuration

Hi Great People of Home Assistant,

I have a AC light dimmer module which is controlled via Arduino and this reacts to numbers which is published on a MQTT topic. e.g “livingroom/lights/dimmer” 0 for off and 100 for full brightness.

How do I configure a light switch (in configuration.yaml or automation script) with a slider to publish onto this topic the numbers (0-100) which will control the light?

I think the mqtt light module will do.

Just set the brightness_command_topic to livingroom/lights/dimmer

Continuing the discussion from Home assistant dimmer switch configuration:

Hi gpbenton. Thank you for the fast response. how do I get home assistant to recognize which is max and min brightness? say if my max value is 128 instead of 100?

Isn’t that the brightness_scale: parameter?

so this will actually publish numbers 0 through 128 in the topic?

That is what it says.