mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
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:
parent
0215e85c59
commit
f0b3f6f1f6
@ -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 %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user