MQTT Value for Gauge

I am trying to create a gauge based off the lux value of the MQTT feed from a camera. When trying to add a gauge I see the message as follows: Entity is non-numeric: sensor.office_lux

Here is what I get from the camera
{“lux”: 9.4}

My configuration.yaml has the following…

sensor 2:
  platform: mqtt
  name: "Office Lux"
  state_topic: "/merakimv/<camera SN?/light"
  unit_of_measurement: "lux"
  value_template: '{{ value_json.lux[0].value }}'
  qos: 0

Could someone point me in the right direction or provide some assistance?


Have you tried:

value_template: '{{ value_json.lux | float }}'`

No I had not. But I did after your suggestion and it works perfect. Thank you so much!!!