Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99293

Command line sensor - directory recursive size not working

$
0
0

@majkers wrote:

Hello,
I want to create sensor for counting directory with subdirectories size. I made something like this (yes I know I can add h parameter and ommit value templating) but it is not working. I am using HassIO and this command line is wokring when I fire it with ssh.

  - platform: command_line
    name: Camera recordings size
    command: "du -s /root/config/www/camera_recordings" 
    unit_of_measurement: "MB"
    value_template: '{{ value | multiply(0.001) | round(2) }}' 

My whitelist looks like this:

  whitelist_external_dirs:
    - /config/

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 99293

Trending Articles