I am running hassio version 0.65.6 and have created a trigger to monitor free space on RP SD card as below:
configuration.yaml
- platform: systemmonitor
resources:
- type: disk_use_percent
- arg: /
I can see sensor.disk_use_percent_
on state page changing from value from 19.6 and using the below trigger in my automation.
automation.yaml
- id: HA_SMS_Send_ServerSpace_Low
alias: HA SMS Send ServerSpace Low
trigger:
platform: numeric_state
entity_id: sensor.disk_use_percent_
value_template: "{{state.attributes.disk_use_percent|float}}"
above: 20
action:
- service: persistent_notification.create
data:
message: "HADev: Server Free Space below 80%"
notification_id: "0115"
title: "Alert"
- service: notify.hamessanger
data:
message: "HADev: Server Free Space below 80%"
target:
- +1**********
When I move a temp file to SD card to increase used space, noticed sensor.disk_use_percent_
value changed 19.6 to 20.6 but it gave below error in log:
_018-04-08 12:57:05 ERROR (MainThread) [homeassistant.helpers.condition] Template error: UndefinedError: ‘mappingproxy object’ has no attribute ‘disk_use_percent’
I also tried changing template to "{{state.attributes.disk_use_percent_|float}}"
but still got below error:
2018-04-08 16:28:12 ERROR (MainThread) [homeassistant.helpers.condition] Template error: UndefinedError: ‘mappingproxy object’ has no attribute 'disk_use_percent_’
Any help appreciated.