Added UOM and value casts (#7673)

Completed the configuration for PlantGateway to make sure everything displays even more beautiful by default
This commit is contained in:
Jan Castermans 2018-11-29 08:28:28 +01:00 committed by Fabian Affolter
parent 0215e85c59
commit f0b3f6f1f6

View File

@ -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 %}