MQTT Light transitions

I have 2 Merkury white bulbs and a Sonoff B1 that have all be flashed with tasmota.

I’ve been trying to get transitions to work in scenes but I get instant bright or instant dim.

My code for the 2 scenes:

  - name: Livingroom_Normal
    entities:
      light.living_room_lamp_1:
        state: on
        transition: 2
        brightness_pct: 90
      light.living_room_lamp_2:
        state: on
        transition: 2
        brightness_pct: 85
      light.living_room_b1:
        state: on
        transition: 2
        brightness_pct: 85
 
  - name: Livingroom_Dim
    entities:
      light.living_room_lamp_1:
        state: on
        transition: 2
        brightness_pct: 20
    light.living_room_lamp_2:
      state: on
      transition: 2
      brightness_pct: 20
    light.living_room_b1:
      state: on
      transition: 2
      brightness_pct: 20  

My automations are:

#DIM AND BRIGHTED LIVING ROOM LIGHTS AS MEDIA IS PLAYED/STOPPED ON LIVING ROOM TV
  - alias: "Media player paused/stopped"
    trigger:
      - platform: state
        entity_id: media_player.living_room_tv
        from: 'playing'
        to: 'paused'
#        to: 'idle'
    condition:
      - condition: state
        entity_id: sun.sun
        state: 'below_horizon'
    action:
        service: scene.turn_on
        entity_id: scene.Livingroom_Normal

  - alias: "Media player playing"
    trigger:
      - platform: state
        entity_id: media_player.living_room_tv
        to: 'playing'
        from: 'paused'
#        from: 'idle'
    condition:
      - condition: state
        entity_id: sun.sun
        state: 'below_horizon'
    action:
        service: scene.turn_on
        entity_id: scene.Livingroom_Dim

I have also tried JSON which according to the docs should work but It still instantly sets to the lower light level.

I’ve used the code below in the Developer Tools, Services area with the ‘light.turn_off’ service and the ‘homeassistant.turn_off’ service.

{
  "entity_id": "light.living_room_#",
  "transition": "160"
}

What is your configuration for the Merkury light?

According to the documentation for MQTT Light, only the json and template schemas support transitions.

MQTT Light - JSON Schema

Here is my light config:

#LIVINGROOM LAMP 1
  - platform: mqtt
    name: "Living Room Lamp 1"
    command_topic: "cmnd/sonoff_livingroom_1/power"
    state_topic: "stat/sonoff_livingroom_1/POWER"
    brightness_state_topic: "stat/sonoff_livingroom_1/dimmer"
    brightness_command_topic: "cmnd/sonoff_livingroom_1/Dimmer"
    brightness_scale: 100
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"

Do I need to add schema: json even if I’m trying the json from the Services tool?

Sorry, I no longer know what to tell you. The documentation’s chart indicates the default schema does not support transitions … but in the very next paragraph it says it does support transitions. :man_shrugging:

Default schema

The mqtt light platform with default schema lets you control your MQTT enabled lights. It supports setting brightness, color temperature, effects, flashing, on/off, RGB colors, transitions, XY colors and white values.

I searched and found this post which may or may not be useful. Good luck!

Did you ever find a solution for this? I’m having the same issues.

I haven’t yet. I stopped trying to get it to work as it was driving me crazy so I moved on to something else.
I’ll circle back eventually but for now I’m just letting it chill.

I’m trying the same thing. Transition works for my lifx bulbs but not my mqtt ones via SmartThings.