diff --git a/source/_components/light.mqtt_json.markdown b/source/_components/light.mqtt_json.markdown index d6ba5ad07d0..d14f58001a4 100644 --- a/source/_components/light.mqtt_json.markdown +++ b/source/_components/light.mqtt_json.markdown @@ -63,6 +63,11 @@ brightness: required: false type: boolean default: false +brightness_scale: + description: "Defines the maximum brightness value (i.e. 100%) of the MQTT device." + required: false + type: integer + default: 255 color_temp: description: Flag that defines if the light supports color temperature. required: false @@ -191,6 +196,29 @@ light: brightness: true ``` +### {% linkable_title Brightness Scaled %} + +To enable a light using a brightness scale other than 8bit the `brightness_scale` option may be added to denote the "fully on" value: +```yaml +# Example configuration.yaml entry +light: + - platform: mqtt_json + name: mqtt_json_light_1 + state_topic: "home/light" + command_topic: "home/light/set" + brightness: true + brightness_scale: 4095 +``` + +Home Assistant will then convert its 8bit value in the message to and from the device: + +```json +{ + "brightness": 4095, + "state": "ON", +} +``` + ### {% linkable_title Implementations %} - A full example of custom lighting using this platform and an ESP8266 microcontroller can be found [here](https://github.com/corbanmailloux/esp-mqtt-rgb-led). It supports on/off, brightness, transitions, RGB colors, and flashing.