Value template problem with mqtt message

Hi All,
I have a problem with the value template which I can’t solve. Probably very simple for the experienced Home Assistant user.

So I’m receiving a MQTT message from a door sensor which is 0 for closed and 255 for opened.

I’m defining this in the sensor part of the config

- platform: mqtt
  name: "Door Kitchen"
  state_topic: "Hassio/Door_Kitchen/32/1/0"
  value_template: '{% if is_state("sensor.door_kitchen", '255') %} Opened {% else %} Closed {% endif %}'

But the sensorvalue in Home Assistant is always closed. Tried the number 0 and 255 both with and without the quotes.

Any ideas
PPee