mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-16 18:44:58 +00:00
Completely Broke out the Configuration Files
This commit is contained in:
66
sensor/devices.yaml
Executable file
66
sensor/devices.yaml
Executable file
@@ -0,0 +1,66 @@
|
||||
- platform: template
|
||||
sensors:
|
||||
wii:
|
||||
friendly_name: 'Wii'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.wii", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
tablotv:
|
||||
friendly_name: 'Tablo TV'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.tablotv", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
hue_hub:
|
||||
friendly_name: 'Hue Hub'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.hue_hub", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
alexa_echo:
|
||||
friendly_name: 'Alexa Echo'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.alexa_echo", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
circle:
|
||||
friendly_name: 'Disney Circle'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.circle", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
rachio:
|
||||
friendly_name: 'Rachio Sprinklers'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.rachio", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
skybell:
|
||||
friendly_name: 'Skybell Doorbell'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.skybell", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
||||
samsungtv:
|
||||
friendly_name: 'Samsung TV'
|
||||
value_template: >-
|
||||
{%- if is_state("device_tracker.samsungtv", "home") %}
|
||||
Online
|
||||
{% else %}
|
||||
Offline
|
||||
{%- endif %}
|
10
sensor/speedtest.yaml
Executable file
10
sensor/speedtest.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
- platform: speedtest
|
||||
minute: 30
|
||||
hour:
|
||||
- 0
|
||||
- 6
|
||||
- 12
|
||||
- 18
|
||||
monitored_conditions:
|
||||
- download
|
||||
- upload
|
52
sensor/systemmonitor.yaml
Executable file
52
sensor/systemmonitor.yaml
Executable file
@@ -0,0 +1,52 @@
|
||||
- platform: command_line
|
||||
command: "grep -c invalidpassword /home/hass/.homeassistant/home-assistant.log"
|
||||
name: badlogin
|
||||
|
||||
- platform: systemmonitor
|
||||
resources:
|
||||
# - type: last_boot
|
||||
- type: since_last_boot
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
since_last_boot_templated:
|
||||
value_template: >-
|
||||
{%- set slb = states.sensor.since_last_boot.state.split(' ') -%}
|
||||
{%- set count = slb | length -%}
|
||||
{%- set hms = slb[count - 1] -%}
|
||||
{%- set hms_trimmed = hms.split('.')[0] -%}
|
||||
{%- set hms_split = hms_trimmed.split(':') -%}
|
||||
{%- set hours = hms_split[0] | int -%}
|
||||
{%- set minutes = hms_split[1] | int -%}
|
||||
{%- set seconds = hms_split[2] | int -%}
|
||||
|
||||
{%- if count == 3 -%}
|
||||
{{ slb[0] ~ ' ' ~ slb[1] ~ ' ' }}
|
||||
{%- endif -%}
|
||||
{%- if hours > 0 -%}
|
||||
{%- if hours == 1 -%}
|
||||
1 hour
|
||||
{%- else -%}
|
||||
{{ hours }} hours
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if minutes > 0 -%}
|
||||
{%- if hours > 0 -%}
|
||||
{{ ', ' }}
|
||||
{%- endif -%}
|
||||
{%- if minutes == 1 -%}
|
||||
1 minute
|
||||
{%- else -%}
|
||||
{{ minutes }} minutes
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if seconds > 0 -%}
|
||||
{%- if hours > 0 or minutes > 0 -%}
|
||||
{{ ', ' }}
|
||||
{%- endif -%}
|
||||
{%- if seconds == 1 -%}
|
||||
1 second
|
||||
{%- else -%}
|
||||
{{ seconds }} seconds
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
16
sensor/weather.yaml
Executable file
16
sensor/weather.yaml
Executable file
@@ -0,0 +1,16 @@
|
||||
- platform: darksky
|
||||
api_key: !secret forecast_key
|
||||
|
||||
monitored_conditions:
|
||||
- summary
|
||||
# - precip_type
|
||||
- precip_intensity
|
||||
- temperature
|
||||
# - dew_point
|
||||
# - wind_speed
|
||||
# - wind_bearing
|
||||
# - cloud_cover
|
||||
- humidity
|
||||
# - pressure
|
||||
# - visibility
|
||||
# - ozone
|
Reference in New Issue
Block a user