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
|
- alias: Startup Notification and Shut startup lights
|
||||||
hide_entity: True
|
hide_entity: True
|
||||||
trigger:
|
trigger:
|
||||||
- platform: event
|
- platform: homeassistant
|
||||||
event_type: homeassistant_start
|
event: start
|
||||||
action:
|
action:
|
||||||
- service: script.ifttt_notify
|
- service: script.ifttt_notify
|
||||||
data_template:
|
data_template:
|
||||||
@@ -16,4 +16,3 @@
|
|||||||
|
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: group.hallway_lights
|
entity_id: group.hallway_lights
|
||||||
|
|
||||||
|
@@ -10,18 +10,6 @@ sensor.backdoor:
|
|||||||
hidden: False
|
hidden: False
|
||||||
icon: mdi:home-variant
|
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:
|
sensor.linen_door:
|
||||||
friendly_name: 'Linen Door'
|
friendly_name: 'Linen Door'
|
||||||
emulated_hue: False
|
emulated_hue: False
|
||||||
|
@@ -7,8 +7,22 @@
|
|||||||
command: "/srv/hass/hass_venv/bin/hass --version"
|
command: "/srv/hass/hass_venv/bin/hass --version"
|
||||||
scan_interval: 86400
|
scan_interval: 86400
|
||||||
|
|
||||||
- platform: template
|
- platform: command_line
|
||||||
sensors:
|
name: "HA Uptime"
|
||||||
ha_uptime:
|
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/hass/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
|
||||||
value_template: '{{ relative_time(states.automation.startup_notification.attributes.last_triggered) }}'
|
scan_interval: 360
|
||||||
friendly_name: HA Uptime
|
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