From f0b3f6f1f6f08c7b33198bf12438101a12a438c9 Mon Sep 17 00:00:00 2001 From: Jan Castermans Date: Thu, 29 Nov 2018 08:28:28 +0100 Subject: [PATCH] Added UOM and value casts (#7673) Completed the configuration for PlantGateway to make sure everything displays even more beautiful by default --- source/_components/plant.markdown | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source/_components/plant.markdown b/source/_components/plant.markdown index e262e81059f..9c21905676a 100644 --- a/source/_components/plant.markdown +++ b/source/_components/plant.markdown @@ -146,23 +146,28 @@ sensor: - platform: mqtt name: my_plant_moisture state_topic: my_plant_topic - value_template: '{{ value_json.moisture }}' + value_template: '{{ value_json.moisture | int }}' + unit_of_measurement: '%' - platform: mqtt name: my_plant_battery state_topic: my_plant_topic - value_template: '{{ value_json.battery }}' + value_template: '{{ value_json.battery | int }}' + unit_of_measurement: '%' - platform: mqtt name: my_plant_temperature state_topic: my_plant_topic - value_template: '{{ value_json.temperature }}' + value_template: '{{ value_json.temperature | float }}' + unit_of_measurement: '°C' - platform: mqtt name: my_plant_conductivity state_topic: my_plant_topic - value_template: '{{ value_json.conductivity }}' + value_template: '{{ value_json.conductivity | int }}' + unit_of_measurement: 'µS/cm' - platform: mqtt name: my_plant_brightness state_topic: my_plant_topic - value_template: '{{ value_json.brightness }}' + value_template: '{{ value_json.brightness | int }}' + unit_of_measurement: 'Lux' ``` {% endraw %}