Kelvin
(kelv)
1
Hey hope you can help
I’m trying to make a sensor from a attribute I have worked out the template
this is it.
{{ state_attr('sensor.kelvinspc_storage_c', 'AvailableSpacePercentage') }}
How do I add this to my config, I have tried a load of different ways but for the life of
me I can not work it out.
can you help?
Thanks
tom_l
2
Add this to your configuration.yaml file:
template:
- sensor:
- name: "Kelvins PC Available Space"
unit_of_measurement: "%"
state: "{{ state_attr('sensor.kelvinspc_storage_c', 'AvailableSpacePercentage') }}"
Then do a yaml reload, or restart home assistant.
Kelvin
(kelv)
3
Worked perfectly, thank so much, over a period of 3 days I reckon I spent
5 hour trying to figure it out.
There should be a repository for templates.