mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-19 11:38:30 +00:00
Some Quick fixes.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
- alias: Startup Notification and Shut startup lights
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: homeassistant_start
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: script.ifttt_notify
|
||||
data_template:
|
||||
@@ -16,4 +16,3 @@
|
||||
|
||||
- service: light.turn_off
|
||||
entity_id: group.hallway_lights
|
||||
|
||||
|
@@ -10,18 +10,6 @@ sensor.backdoor:
|
||||
hidden: False
|
||||
icon: mdi:home-variant
|
||||
|
||||
sensor.deliveries_today:
|
||||
friendly_name: 'Deliveries Today'
|
||||
emulated_hue: False
|
||||
hidden: False
|
||||
icon: mdi:package-variant
|
||||
|
||||
sensor.packages_in_transit:
|
||||
friendly_name: 'Packages in Transit'
|
||||
emulated_hue: False
|
||||
hidden: False
|
||||
icon: mdi:truck-delivery
|
||||
|
||||
sensor.linen_door:
|
||||
friendly_name: 'Linen Door'
|
||||
emulated_hue: False
|
||||
|
@@ -7,8 +7,22 @@
|
||||
command: "/srv/hass/hass_venv/bin/hass --version"
|
||||
scan_interval: 86400
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
ha_uptime:
|
||||
value_template: '{{ relative_time(states.automation.startup_notification.attributes.last_triggered) }}'
|
||||
friendly_name: HA Uptime
|
||||
- platform: command_line
|
||||
name: "HA Uptime"
|
||||
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/hass/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
|
||||
scan_interval: 360
|
||||
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 }}
|
||||
|
Reference in New Issue
Block a user