HassOSArgonOneAddon
HassOSArgonOneAddon copied to clipboard
Add state_class to allow usage of the "Statistics Graph Card"
Could you add state_class: measurement to the reqBody as this would allow uage of the "Statistics Graph Card" for better long term reporting and display.
What type?
Hi
The type would be measurement
Below is a workaround using a template sensor
template:
- name: "Argon Fan Speed"
unit_of_measurement: "%"
state: '{{ states("sensor.argon_one_addon_fan_speed") }}'
state_class: measurement
icon: mdi:fan
I would guess that the following line would need changing from
reqBody='{"state": "'"${fanPercent}"'", "attributes": { "unit_of_measurement": "%", "icon": "'"${icon}"'", "Temperature '"${CorF}"'": "'"${cpuTemp}"'", "friendly_name": "Argon Fan Speed"}}'
to the following, but I am only guessing at the right placement
reqBody='{"state": "'"${fanPercent}"'","state_class": "measurement" , "attributes": { "unit_of_measurement": "%", "icon": "'"${icon}"'", "Temperature '"${CorF}"'": "'"${cpuTemp}"'", "friendly_name": "Argon Fan Speed"}}'
or
reqBody='{"state": "'"${fanPercent}"'" , "attributes": { "unit_of_measurement": "%", "icon": "'"${icon}"'" ,"state_class": "measurement", "Temperature '"${CorF}"'": "'"${cpuTemp}"'", "friendly_name": "Argon Fan Speed"}}'