Removing old command line sensors

This commit is contained in:
Jeffrey Stone 2019-11-09 10:22:55 -05:00
parent 96da697b23
commit 385102f467
1 changed files with 25 additions and 25 deletions

View File

@ -32,25 +32,25 @@ sensor:
# - platform: cert_expiry
# host: !secret ahsl_base_url
# name: SSL Cert Expiration
- platform: command_line
name: "HA Uptime"
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/homeassistant/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
scan_interval: 720
value_template: >-
{% set uptime = value | int %}
{% set seconds = uptime % 60 %}
{% set minutes = ((uptime % 3600) / 60) | int %}
{% set hours = ((uptime % 86400) / 3600) | int %}
{% set days = (uptime / 86400) | int %}
{%- if days > 0 -%}
{%- if days == 1 -%}
1 day
{%- else -%}
{{ days }} days
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{{ '%02d' % hours }}:{{ '%02d' % minutes }}
# - platform: command_line
# name: "HA Uptime"
# command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/homeassistant/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
# scan_interval: 720
# value_template: >-
# {% set uptime = value | int %}
# {% set seconds = uptime % 60 %}
# {% set minutes = ((uptime % 3600) / 60) | int %}
# {% set hours = ((uptime % 86400) / 3600) | int %}
# {% set days = (uptime / 86400) | int %}
# {%- if days > 0 -%}
# {%- if days == 1 -%}
# 1 day
# {%- else -%}
# {{ days }} days
# {%- endif -%}
# {{ ', ' }}
# {%- endif -%}
# {{ '%02d' % hours }}:{{ '%02d' % minutes }}
- platform: template
sensors:
current_version_ha:
@ -68,12 +68,12 @@ sensor:
- platform: version
name: Released Hassio Ver
source: hassio
- platform: command_line
name: ha_v2db
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant_v2.db | cut -f1 -d ' '"
- platform: command_line
name: ha_log
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant.log | cut -f1 -d ' '"
# - platform: command_line
# name: ha_v2db
# command: "ls -sh /home/homeassistant/.homeassistant/home-assistant_v2.db | cut -f1 -d ' '"
# - platform: command_line
# name: ha_log
# command: "ls -sh /home/homeassistant/.homeassistant/home-assistant.log | cut -f1 -d ' '"
- platform: uptime
name: Time Online
unit_of_measurement: days