MQTT switch payload_on template

Is it possible to set template as value in payload_on MQTT switch ?
Something like this:

- platform: mqtt
  name: "bathroom fan"
  state_topic: "esp_bathr/outs"
  value_template: '{{ value_json["out1"] }}'  
  state_on: "ON"
  state_off: "OFF"
  command_topic: "esp_bathr/out1/set"
  payload_on: "{{ states.input_number.esp_bathr_time.state | int * 60 }}"
  payload_off: 0

In mqtt I see all string {{ states.input_number.esp_bathr_time.state | int * 60 }}

Hey, you found a solution?
Thank you

unfortunately not

1 Like