missed unit_of_measurement
Closed this issue · 2 comments
krom commented
Your excample sensor provide text sensor with human friendly unit of measurement
- name: Sensible Root Disk Free
kind: script
sensorid: root_free
script: root_free.sh
icon: mdi:harddisk
and script
#!/bin/sh
df / -h | tail -n 1 | awk '/ / {print $4}'
But it's not good solution because it's not useful for authomations and graphs
I've replaces config to
- name: Sensible Root Disk Free
kind: script
sensorid: root_free
script: root_free.sh
unit_of_measurement: GB
icon: mdi:harddisk
and script to
#!/bin/sh
df / | tail -n 1 | awk '/ / {print $4 / 1048576}'
But unit_of_measurement
does not exist in config.
Could you please provide unit_of_measurement
and change your configs
This issue is related to #4
TheTinkerDad commented
Thanks, I'll definitely add this as part of the next release!
TheTinkerDad commented
Implemented this and it's available on the latest branch.