Update template sensor definitions to current standard, close #109
This commit is contained in:
@ -1,50 +1,3 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
master_bedroom_current_temp:
|
||||
friendly_name: "Master Bedroom Current Temp"
|
||||
unique_id: 40c6b591-09d3-45cd-8cab-9838517cc08a
|
||||
value_template: "{{ state_attr('climate.master_bedroom_aircon','current_temperature') | float }}"
|
||||
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
master_bedroom_outdoor_temp:
|
||||
friendly_name: "Master Bedroom Outdoor Temp"
|
||||
unique_id: 1a79ac59-0faf-4de5-b546-5d6d5e151dd6
|
||||
value_template: "{{ state_attr('climate.master_bedroom_aircon','outdoor_temperature') | float }}"
|
||||
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
master_bedroom_target_temp:
|
||||
friendly_name: "Master Bedroom Target Temp"
|
||||
unique_id: 2ce31844-b115-42b8-8213-feccf24e236c
|
||||
value_template: "{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}"
|
||||
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
master_bedroom_aircon_eco_mode:
|
||||
friendly_name: "Master Bedroom Eco Mode"
|
||||
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
||||
value_template: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}"
|
||||
icon_template: >-
|
||||
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
|
||||
mdi:home-lightning-bolt
|
||||
{% else %}
|
||||
mdi:home-lightning-bolt-outline
|
||||
{% endif %}
|
||||
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
master_bedroom_aircon_fan_mode:
|
||||
friendly_name: "Master Bedroom Aircon Fan Mode"
|
||||
unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8
|
||||
value_template: "{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}"
|
||||
icon_template: >
|
||||
{% if is_state_attr('climate.master_bedroom_aircon','fan_mode','Auto') %}
|
||||
mdi:fan-auto
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Low') %}
|
||||
mdi:fan-speed-1
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Medium') %}
|
||||
mdi:fan-speed-2
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','High') %}
|
||||
mdi:fan-speed-3
|
||||
{% else %}
|
||||
mdi:fan-off
|
||||
{% endif %}
|
||||
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Emma Aircon - Compressor
|
||||
@ -66,6 +19,45 @@ template:
|
||||
- name: Kallen Fan - Separate Schedule
|
||||
unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08
|
||||
state: "{{ states('input_datetime.kallen_fan') != states('input_datetime.kallen_bedtime') }}"
|
||||
- sensor:
|
||||
- name: "Master Bedroom Current Temp"
|
||||
unique_id: 40c6b591-09d3-45cd-8cab-9838517cc08a
|
||||
state: "{{ state_attr('climate.master_bedroom_aircon','current_temperature') | float }}"
|
||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
- name: "Master Bedroom Outdoor Temp"
|
||||
unique_id: 1a79ac59-0faf-4de5-b546-5d6d5e151dd6
|
||||
state: "{{ state_attr('climate.master_bedroom_aircon','outdoor_temperature') | float }}"
|
||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
- name: "Master Bedroom Target Temp"
|
||||
unique_id: 2ce31844-b115-42b8-8213-feccf24e236c
|
||||
state: "{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}"
|
||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
- name: "Master Bedroom Eco Mode"
|
||||
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
||||
state: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}"
|
||||
icon: >-
|
||||
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
|
||||
mdi:home-lightning-bolt
|
||||
{% else %}
|
||||
mdi:home-lightning-bolt-outline
|
||||
{% endif %}
|
||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
- name: "Master Bedroom Aircon Fan Mode"
|
||||
unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8
|
||||
state: "{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}"
|
||||
icon: >
|
||||
{% if is_state_attr('climate.master_bedroom_aircon','fan_mode','Auto') %}
|
||||
mdi:fan-auto
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Low') %}
|
||||
mdi:fan-speed-1
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Medium') %}
|
||||
mdi:fan-speed-2
|
||||
{% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','High') %}
|
||||
mdi:fan-speed-3
|
||||
{% else %}
|
||||
mdi:fan-off
|
||||
{% endif %}
|
||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||
|
||||
input_boolean:
|
||||
master_bedroom_climate_protocol:
|
||||
|
File diff suppressed because it is too large
Load Diff
121
packages/history_stats.yaml
Normal file
121
packages/history_stats.yaml
Normal file
@ -0,0 +1,121 @@
|
||||
sensor:
|
||||
- platform: history_stats
|
||||
name: Basement TV Time
|
||||
entity_id: media_player.basement_tv
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Basement TV Chromecast Time
|
||||
entity_id: media_player.basement_tv_chromecast
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Living Room TV Time
|
||||
entity_id: media_player.living_room_tv
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Living Room TV Chromecast Time
|
||||
entity_id: media_player.living_room_tv_chromecast
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Master Bedroom TV Time
|
||||
entity_id: media_player.master_bedroom_firetv
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Outside Lights
|
||||
entity_id: light.outside_lights
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Windows Open Time
|
||||
entity_id: sensor.windows_open
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Doors Open Time
|
||||
entity_id: sensor.doors_open
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Emma A/C Compressor Time
|
||||
entity_id: binary_sensor.emma_aircon_compressor
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Emma A/C Fan Time
|
||||
entity_id: binary_sensor.emma_aircon_fan
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Master Bedroom A/C Compressor Time
|
||||
entity_id: binary_sensor.master_bedroom_aircon_compressor
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Master Bedroom A/C Fan Time
|
||||
entity_id: binary_sensor.master_bedroom_aircon_fan
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Master Bedroom Fan Time
|
||||
entity_id: fan.master_bedroom_fan
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Kallen Fan Time
|
||||
entity_id: fan.kallen_bedroom_fan
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Basement Fan Time
|
||||
entity_id: fan.basement_fan
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
@ -78,6 +78,21 @@ input_datetime:
|
||||
has_time: true
|
||||
icon: mdi:alarm
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: Kallen Tasks
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/sync/v9/projects/get_data'
|
||||
params:
|
||||
project_id: 2285969005
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
value_template: '{{value_json[''project''][''id'']}}'
|
||||
json_attributes:
|
||||
- project
|
||||
- items
|
||||
scan_interval: 30
|
||||
|
||||
automation:
|
||||
- id: 67fbdb66-b94b-4351-86de-a388d601e93c
|
||||
alias: Kallen Meds Handler
|
||||
|
@ -303,135 +303,6 @@ input_text:
|
||||
tina_desk_selected_scene:
|
||||
name: Tina Desk Selected Scene
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
basement_studio_lights_brightness_actual:
|
||||
friendly_name: "Basement Studio Lights - Brightness Actual"
|
||||
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
||||
value_template: >
|
||||
{% from 'lighting.jinja' import get_brightness_pct %}
|
||||
{{ get_brightness_pct('light.basement_studio_lights') }}
|
||||
availability_template: "{{ is_state('light.basement_studio_lights','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
basement_studio_lights_brightness_intended:
|
||||
friendly_name: "Basement Studio Lights - Brightness Intended"
|
||||
unique_id: 3542077f-24c6-460c-a73f-fe7bc8413b81
|
||||
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}"
|
||||
availability_template: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
basement_studio_lights_colortemp_actual:
|
||||
friendly_name: "Basement Studio Lights - Colortemp Actual"
|
||||
unique_id: 93cb2a2f-c8a7-44bf-813f-26ce349a072f
|
||||
value_template: "{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}"
|
||||
availability_template: "{{ is_state('light.basement_studio_lights','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
basement_studio_lights_colortemp_intended:
|
||||
friendly_name: "Basement Studio Lights - Colortemp Intended"
|
||||
unique_id: 85d4b063-bae8-43c2-9fea-35820b13f26f
|
||||
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}"
|
||||
availability_template: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
basement_studio_lights_brightness_diff:
|
||||
friendly_name: "Basement Studio Lights - Brightness Diff"
|
||||
unique_id: ab24a44c-6c6b-4ae9-b256-52592b0503bb
|
||||
value_template: >
|
||||
{% set current = states('sensor.basement_studio_lights_brightness_actual') | float %}
|
||||
{% set intended = states('sensor.basement_studio_lights_brightness_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability_template: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
basement_studio_lights_colortemp_diff:
|
||||
friendly_name: "Basement Studio Lights - Colortemp Diff"
|
||||
unique_id: fecf7d42-9a5c-471e-9af3-e1a330a6ae3e
|
||||
value_template: >
|
||||
{% set current = states('sensor.basement_studio_lights_colortemp_actual') | float %}
|
||||
{% set intended = states('sensor.basement_studio_lights_colortemp_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability_template: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
living_room_lights_brightness_actual:
|
||||
friendly_name: "Living Room Lights - Brightness Actual"
|
||||
unique_id: e557022a-184f-4111-bb6a-6c0869cce42c
|
||||
value_template: >
|
||||
{% from 'lighting.jinja' import get_brightness_pct %}
|
||||
{{ get_brightness_pct('light.living_room_lights') }}
|
||||
availability_template: "{{ is_state('light.living_room_lights','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
living_room_lights_brightness_intended:
|
||||
friendly_name: "Living Room Lights - Brightness Intended"
|
||||
unique_id: a758742f-6724-4920-a9d1-325fe4f02664
|
||||
value_template: "{{ state_attr('switch.adaptive_lighting_living_room','brightness_pct') | float | round(2) }}"
|
||||
availability_template: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
living_room_lights_colortemp_actual:
|
||||
friendly_name: "Living Room Lights - Colortemp Actual"
|
||||
unique_id: dbe08826-e113-4474-bbca-60d3c32a4b65
|
||||
value_template: "{{ state_attr('light.living_room_lights','color_temp_kelvin') | int }}"
|
||||
availability_template: "{{ is_state('light.living_room_lights','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
living_room_lights_colortemp_intended:
|
||||
friendly_name: "Living Room Lights - Colortemp Intended"
|
||||
unique_id: 8b974c03-ab5b-4b89-97bf-afee78fa1a40
|
||||
value_template: "{{ state_attr('switch.adaptive_lighting_living_room','color_temp_kelvin') | int }}"
|
||||
availability_template: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
living_room_lights_brightness_diff:
|
||||
friendly_name: "Living Room Lights - Brightness Diff"
|
||||
unique_id: 05f911d3-3b6a-4ca2-8181-5365707b2456
|
||||
value_template: >
|
||||
{% set current = states('sensor.living_room_lights_brightness_actual') | float %}
|
||||
{% set intended = states('sensor.living_room_lights_brightness_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability_template: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon_template: mdi:brightness-percent
|
||||
living_room_lights_colortemp_diff:
|
||||
friendly_name: "Living Room Lights - Colortemp Diff"
|
||||
unique_id: d8fcaa26-d3dc-48d8-b4b9-9e701a1506a8
|
||||
value_template: >
|
||||
{% set current = states('sensor.living_room_lights_colortemp_actual') | float %}
|
||||
{% set intended = states('sensor.living_room_lights_colortemp_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability_template: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon_template: mdi:thermometer-lines
|
||||
basement_led_strip_resets:
|
||||
friendly_name: "Basement LED Strip Resets"
|
||||
unique_id: 0d016f09-a89b-4616-83b7-934580612d00
|
||||
value_template: "{{ states('input_number.basement_led_strip_resets') | int }}"
|
||||
unit_of_measurement: 'resets'
|
||||
icon_template: mdi:restore
|
||||
tina_desk_scene:
|
||||
friendly_name: Tina Desk Scene
|
||||
unique_id: 0d94ba35-bc9d-40a2-aa77-776d26bc3538
|
||||
value_template: >
|
||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||
Night Mode
|
||||
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
|
||||
Evening Mode
|
||||
{% else %}
|
||||
Day Mode
|
||||
{% endif %}
|
||||
icon_template: >
|
||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||
mdi:weather-night
|
||||
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
|
||||
mdi:lightbulb-night
|
||||
{% else %}
|
||||
mdi:lightbulb
|
||||
{% endif %}
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Basement Lights Sync Issue
|
||||
@ -532,6 +403,118 @@ template:
|
||||
{% endif %}
|
||||
device_class: problem
|
||||
delay_on: "00:00:10"
|
||||
- sensor:
|
||||
- name: "Basement Studio Lights - Brightness Actual"
|
||||
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
||||
state: >
|
||||
{% from 'lighting.jinja' import get_brightness_pct %}
|
||||
{{ get_brightness_pct('light.basement_studio_lights') }}
|
||||
availability: "{{ is_state('light.basement_studio_lights','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Basement Studio Lights - Brightness Intended"
|
||||
unique_id: 3542077f-24c6-460c-a73f-fe7bc8413b81
|
||||
state: "{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}"
|
||||
availability: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Basement Studio Lights - Colortemp Actual"
|
||||
unique_id: 93cb2a2f-c8a7-44bf-813f-26ce349a072f
|
||||
state: "{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}"
|
||||
availability: "{{ is_state('light.basement_studio_lights','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Basement Studio Lights - Colortemp Intended"
|
||||
unique_id: 85d4b063-bae8-43c2-9fea-35820b13f26f
|
||||
state: "{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}"
|
||||
availability: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Basement Studio Lights - Brightness Diff"
|
||||
unique_id: ab24a44c-6c6b-4ae9-b256-52592b0503bb
|
||||
state: >
|
||||
{% set current = states('sensor.basement_studio_lights_brightness_actual') | float %}
|
||||
{% set intended = states('sensor.basement_studio_lights_brightness_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Basement Studio Lights - Colortemp Diff"
|
||||
unique_id: fecf7d42-9a5c-471e-9af3-e1a330a6ae3e
|
||||
state: >
|
||||
{% set current = states('sensor.basement_studio_lights_colortemp_actual') | float %}
|
||||
{% set intended = states('sensor.basement_studio_lights_colortemp_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Living Room Lights - Brightness Actual"
|
||||
unique_id: e557022a-184f-4111-bb6a-6c0869cce42c
|
||||
state: >
|
||||
{% from 'lighting.jinja' import get_brightness_pct %}
|
||||
{{ get_brightness_pct('light.living_room_lights') }}
|
||||
availability: "{{ is_state('light.living_room_lights','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Living Room Lights - Brightness Intended"
|
||||
unique_id: a758742f-6724-4920-a9d1-325fe4f02664
|
||||
state: "{{ state_attr('switch.adaptive_lighting_living_room','brightness_pct') | float | round(2) }}"
|
||||
availability: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Living Room Lights - Colortemp Actual"
|
||||
unique_id: dbe08826-e113-4474-bbca-60d3c32a4b65
|
||||
state: "{{ state_attr('light.living_room_lights','color_temp_kelvin') | int }}"
|
||||
availability: "{{ is_state('light.living_room_lights','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Living Room Lights - Colortemp Intended"
|
||||
unique_id: 8b974c03-ab5b-4b89-97bf-afee78fa1a40
|
||||
state: "{{ state_attr('switch.adaptive_lighting_living_room','color_temp_kelvin') | int }}"
|
||||
availability: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Living Room Lights - Brightness Diff"
|
||||
unique_id: 05f911d3-3b6a-4ca2-8181-5365707b2456
|
||||
state: >
|
||||
{% set current = states('sensor.living_room_lights_brightness_actual') | float %}
|
||||
{% set intended = states('sensor.living_room_lights_brightness_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Living Room Lights - Colortemp Diff"
|
||||
unique_id: d8fcaa26-d3dc-48d8-b4b9-9e701a1506a8
|
||||
state: >
|
||||
{% set current = states('sensor.living_room_lights_colortemp_actual') | float %}
|
||||
{% set intended = states('sensor.living_room_lights_colortemp_intended') | float %}
|
||||
{{ (current - intended) | float | round(2) }}
|
||||
availability: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
|
||||
unit_of_measurement: 'K'
|
||||
icon: mdi:thermometer-lines
|
||||
- name: "Basement LED Strip Resets"
|
||||
unique_id: 0d016f09-a89b-4616-83b7-934580612d00
|
||||
state: "{{ states('input_number.basement_led_strip_resets') | int }}"
|
||||
unit_of_measurement: 'resets'
|
||||
icon: mdi:restore
|
||||
- name: Tina Desk Scene
|
||||
unique_id: 0d94ba35-bc9d-40a2-aa77-776d26bc3538
|
||||
state: >
|
||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||
Night Mode
|
||||
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
|
||||
Evening Mode
|
||||
{% else %}
|
||||
Day Mode
|
||||
{% endif %}
|
||||
icon: >
|
||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||
mdi:weather-night
|
||||
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
|
||||
mdi:lightbulb-night
|
||||
{% else %}
|
||||
mdi:lightbulb
|
||||
{% endif %}
|
||||
|
||||
switch:
|
||||
- platform: animated_scenes
|
||||
|
@ -153,6 +153,9 @@ binary_sensor:
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: People Present
|
||||
state: >
|
||||
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}
|
||||
- name: "Tony Home"
|
||||
unique_id: 4f0d8c3d-dc49-4b7a-a1fc-5d286b4a954d
|
||||
state: "{{ is_state('device_tracker.tony_s_iphone', 'home') or is_state('device_tracker.life360_tony_stork','home') }}"
|
||||
|
@ -85,155 +85,150 @@ template:
|
||||
off
|
||||
{% endif %}
|
||||
icon: mdi:school
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
school_start_days2go:
|
||||
unique_id: 94a53e67-c00f-4cc7-9309-f9033a9482f9
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.school_first_day') }}
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.school_first_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
school_end_days2go:
|
||||
unique_id: 589c44ec-7e16-4c72-a264-cdf54de409a9
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.school_last_day') | int }}
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.school_last_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
vacation_days2go:
|
||||
unique_id: f1628d87-e58a-4d1a-8a49-a71f0a9ed3e5
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{% if state_attr('calendar.vacation', 'start_time') %}
|
||||
{{ count_the_days('calendar.vacation','start_time') }}
|
||||
{% else %}
|
||||
999
|
||||
{% endif %}
|
||||
unit_of_measurement: 'Days'
|
||||
thanksgiving_break_days2go:
|
||||
unique_id: 2381e9de-407b-4304-b09a-448c169bbaf2
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.thanksgiving_break_start') }}
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.thanksgiving_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
christmas_break_days2go:
|
||||
unique_id: 851700f7-c593-4db8-ba4f-001cbffcfc4a
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.christmas_break_start') }}
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.christmas_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
spring_break_days2go:
|
||||
unique_id: cec6e687-8999-4548-991c-02ba546335f5
|
||||
value_template: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.spring_break_start') }}
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.spring_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
kallen_lunch_menu_week:
|
||||
friendly_name: Lunch Menu Week
|
||||
unique_id: 62ba9dcb-3cd3-4875-8e6f-86bebf542c37
|
||||
value_template: >
|
||||
{% if is_state('calendar.elementary_school_lunch','on') %}
|
||||
{{ state_attr('calendar.elementary_school_lunch','message') }}
|
||||
{% else %}
|
||||
No Menu
|
||||
{% endif %}
|
||||
icon_template: >
|
||||
{% if is_state_attr('calendar.elementary_school_lunch','message','First Menu') %}
|
||||
mdi:numeric-1-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Second Menu') %}
|
||||
mdi:numeric-2-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Third Menu') %}
|
||||
mdi:numeric-3-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Fourth Menu') %}
|
||||
mdi:numeric-4-circle
|
||||
{% else %}
|
||||
mdi:calendar-end
|
||||
{% endif %}
|
||||
kallen_lunch_menu_items:
|
||||
friendly_name: Lunch Menu Items
|
||||
unique_id: a2cb62d7-ae9f-4bab-81c1-81f2006391b2
|
||||
icon_template: >
|
||||
- sensor:
|
||||
- name: School Start Days2go
|
||||
unique_id: 94a53e67-c00f-4cc7-9309-f9033a9482f9
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.school_first_day') }}
|
||||
attributes:
|
||||
date: "{{ state_attr('input_datetime.school_first_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
- name: School End Days2go
|
||||
unique_id: 589c44ec-7e16-4c72-a264-cdf54de409a9
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.school_last_day') | int }}
|
||||
attributes:
|
||||
date: "{{ state_attr('input_datetime.school_last_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
- name: Vacation Days2go
|
||||
unique_id: f1628d87-e58a-4d1a-8a49-a71f0a9ed3e5
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{% if state_attr('calendar.vacation', 'start_time') %}
|
||||
{{ count_the_days('calendar.vacation','start_time') }}
|
||||
{% else %}
|
||||
999
|
||||
{% endif %}
|
||||
unit_of_measurement: 'Days'
|
||||
- name: Thanksgiving Break Days2go
|
||||
unique_id: 2381e9de-407b-4304-b09a-448c169bbaf2
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.thanksgiving_break_start') }}
|
||||
attributes:
|
||||
date: "{{ state_attr('input_datetime.thanksgiving_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
- name: Christmas Break Days2go
|
||||
unique_id: 851700f7-c593-4db8-ba4f-001cbffcfc4a
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.christmas_break_start') }}
|
||||
attributes:
|
||||
date: "{{ state_attr('input_datetime.christmas_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
- name: Spring Break Days2go
|
||||
unique_id: cec6e687-8999-4548-991c-02ba546335f5
|
||||
state: >
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{{ count_the_days('input_datetime.spring_break_start') }}
|
||||
attributes:
|
||||
date: "{{ state_attr('input_datetime.spring_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
- name: Lunch Menu Week
|
||||
unique_id: 62ba9dcb-3cd3-4875-8e6f-86bebf542c37
|
||||
state: >
|
||||
{% if is_state('calendar.elementary_school_lunch','on') %}
|
||||
{{ state_attr('calendar.elementary_school_lunch','message') }}
|
||||
{% else %}
|
||||
No Menu
|
||||
{% endif %}
|
||||
icon: >
|
||||
{% if is_state_attr('calendar.elementary_school_lunch','message','First Menu') %}
|
||||
mdi:numeric-1-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Second Menu') %}
|
||||
mdi:numeric-2-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Third Menu') %}
|
||||
mdi:numeric-3-circle
|
||||
{% elif is_state_attr('calendar.elementary_school_lunch','message','Fourth Menu') %}
|
||||
mdi:numeric-4-circle
|
||||
{% else %}
|
||||
mdi:calendar-end
|
||||
{% endif %}
|
||||
- name: Lunch Menu Items
|
||||
unique_id: a2cb62d7-ae9f-4bab-81c1-81f2006391b2
|
||||
icon: >
|
||||
{% set week = states('sensor.kallen_lunch_menu_week') %}
|
||||
{% if week == 'First Menu' %}
|
||||
mdi:numeric-1-circle
|
||||
{% elif week == 'Second Menu' %}
|
||||
mdi:numeric-2-circle
|
||||
{% elif week == 'Third Menu' %}
|
||||
mdi:numeric-3-circle
|
||||
{% elif week == 'Fourth Menu' %}
|
||||
mdi:numeric-4-circle
|
||||
{% else %}
|
||||
mdi:calendar-end
|
||||
{% endif %}
|
||||
state: >
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{%- macro getReport() -%}
|
||||
{% set week = states('sensor.kallen_lunch_menu_week') %}
|
||||
{% set dow = now().strftime('%A') %}
|
||||
{% if week == 'First Menu' %}
|
||||
mdi:numeric-1-circle
|
||||
{% elif week == 'Second Menu' %}
|
||||
mdi:numeric-2-circle
|
||||
{% elif week == 'Third Menu' %}
|
||||
mdi:numeric-3-circle
|
||||
{% elif week == 'Fourth Menu' %}
|
||||
mdi:numeric-4-circle
|
||||
{% else %}
|
||||
mdi:calendar-end
|
||||
{% endif %}
|
||||
value_template: >
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{%- macro getReport() -%}
|
||||
{% set week = states('sensor.kallen_lunch_menu_week') %}
|
||||
{% set dow = now().strftime('%A') %}
|
||||
{% if week == 'First Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Sloppy Joe, tomatoes or dip, green beans, mixed fruit, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Beef, taco salad, refried beans, spanish rice, peaches, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, pulled pork, steamed broccoli, carrots, apples, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Beef Stroganoff, steamed cauliflower, cucumbers, fresh fruit, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Hamburger, spinach salad, oven potatoes, applesauce, and milk.
|
||||
{% endif %}
|
||||
{% elif week == 'Second Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Popcorn chicken, mashed potatoes, corn, pears, bread, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Lasagna, garlic bread, celery, tomatoes, apple crisp, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, hot ham and cheese, spinach salad, broccoli, fresh fruit, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Turkey and noodles, mashed potatoes, carrots, peaches, bread, and milk.
|
||||
{% elif down == 'Friday' %}
|
||||
Hot dog with chili sauce, oven potatoes, backed beans, mixed fruit, and milk.
|
||||
{% endif %}
|
||||
{% elif week == 'Third Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Bosco sticks with pizza sauce, black bean salad, oven potatoes, peach crisp, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Toasted cheese, tomato soup, mixed vegetables, fresh fruit, treat, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, popcorn chicken, mashed potatoes, carrots, apples, corn bread, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Spaghetti, broccoli, green beans, fresh fruit, breadsticks, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Cold cut sub, spinach salad, tomatoes, pears, and milk.
|
||||
{% endif %}
|
||||
{% elif week == 'Fourth Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Chicken patty, baked beans, celery, mixed fruit, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Omelet or french toast, sausage, hash browns, tomatoes, orange, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, hamburger, green beans, cauliflower, apple crisp, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Mac and cheese, steamed broccoli, carrots, pears, bread, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Hot dog, spinach salad, oven potatoes, fresh fruit, and milk.
|
||||
{% endif %}
|
||||
{% else %}
|
||||
No menu for the current day.
|
||||
{% if dow == 'Monday' %}
|
||||
Sloppy Joe, tomatoes or dip, green beans, mixed fruit, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Beef, taco salad, refried beans, spanish rice, peaches, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, pulled pork, steamed broccoli, carrots, apples, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Beef Stroganoff, steamed cauliflower, cucumbers, fresh fruit, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Hamburger, spinach salad, oven potatoes, applesauce, and milk.
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
{{- cleanup(getReport()) -}}
|
||||
{% elif week == 'Second Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Popcorn chicken, mashed potatoes, corn, pears, bread, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Lasagna, garlic bread, celery, tomatoes, apple crisp, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, hot ham and cheese, spinach salad, broccoli, fresh fruit, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Turkey and noodles, mashed potatoes, carrots, peaches, bread, and milk.
|
||||
{% elif down == 'Friday' %}
|
||||
Hot dog with chili sauce, oven potatoes, backed beans, mixed fruit, and milk.
|
||||
{% endif %}
|
||||
{% elif week == 'Third Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Bosco sticks with pizza sauce, black bean salad, oven potatoes, peach crisp, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Toasted cheese, tomato soup, mixed vegetables, fresh fruit, treat, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, popcorn chicken, mashed potatoes, carrots, apples, corn bread, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Spaghetti, broccoli, green beans, fresh fruit, breadsticks, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Cold cut sub, spinach salad, tomatoes, pears, and milk.
|
||||
{% endif %}
|
||||
{% elif week == 'Fourth Menu' %}
|
||||
{% if dow == 'Monday' %}
|
||||
Chicken patty, baked beans, celery, mixed fruit, and milk.
|
||||
{% elif dow == 'Tuesday' %}
|
||||
Omelet or french toast, sausage, hash browns, tomatoes, orange, and milk.
|
||||
{% elif dow == 'Wednesday' %}
|
||||
Optionally, Papa Johns Pizza. Otherwise, hamburger, green beans, cauliflower, apple crisp, and milk.
|
||||
{% elif dow == 'Thursday' %}
|
||||
Mac and cheese, steamed broccoli, carrots, pears, bread, and milk.
|
||||
{% elif dow == 'Friday' %}
|
||||
Hot dog, spinach salad, oven potatoes, fresh fruit, and milk.
|
||||
{% endif %}
|
||||
{% else %}
|
||||
No menu for the current day.
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
{{- cleanup(getReport()) -}}
|
||||
|
||||
|
||||
# - platform: rest
|
||||
|
@ -126,96 +126,91 @@ alarm_control_panel:
|
||||
who: living_room
|
||||
call_security_not_armed: 1
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
windows_open:
|
||||
friendly_name: "Windows"
|
||||
unique_id: 780770d2-8b5a-4c96-aee4-459281cc3471
|
||||
unit_of_measurement: 'open'
|
||||
value_template: >-
|
||||
{% set windows = [
|
||||
states.binary_sensor.front_window_near,
|
||||
states.binary_sensor.kitchen_big_window,
|
||||
states.binary_sensor.mud_room_window,
|
||||
states.binary_sensor.stairway_window_lower,
|
||||
] %}
|
||||
{% set windows_open = windows | selectattr('state','eq','on') | list | count %}
|
||||
{{ windows_open }}
|
||||
icon_template: >-
|
||||
{% set windows = [
|
||||
states.binary_sensor.front_window_near,
|
||||
states.binary_sensor.kitchen_big_window,
|
||||
states.binary_sensor.mud_room_window,
|
||||
states.binary_sensor.stairway_window_lower,
|
||||
] %}
|
||||
{% set windows_open = windows | selectattr('state','eq','on') | list | count %}
|
||||
{% if windows_open == 0 %}
|
||||
mdi:window-closed
|
||||
{% else %}
|
||||
mdi:window-open
|
||||
{% endif %}
|
||||
doors_open: #! This sensor is only for exterior doors, and interior doors that are NOT excluded from security protocols
|
||||
friendly_name: "Doors"
|
||||
unique_id: 61b1a98a-51a4-4faa-947d-7883de2430c0
|
||||
unit_of_measurement: 'open'
|
||||
value_template: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.front_door,
|
||||
states.binary_sensor.back_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{{ doors_open }}
|
||||
icon_template: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.front_door,
|
||||
states.binary_sensor.back_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{% if doors_open == 0 %}
|
||||
mdi:door-closed
|
||||
{% else %}
|
||||
mdi:door-open
|
||||
{% endif %}
|
||||
interior_doors_open: # This sensor is not used for security purposes, only for information
|
||||
friendly_name: "Interior Doors"
|
||||
unique_id: 772aa056-881a-4778-ba5b-19e46afc107a
|
||||
unit_of_measurement: 'open'
|
||||
value_template: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.basement_studio_door,
|
||||
states.binary_sensor.downstairs_bathroom_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{{ doors_open }}
|
||||
icon_template: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.basement_studio_door,
|
||||
states.binary_sensor.downstairs_bathroom_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{% if doors_open == 0 %}
|
||||
mdi:door-closed
|
||||
{% else %}
|
||||
mdi:door-open
|
||||
{% endif %}
|
||||
total_faults:
|
||||
friendly_name: Faults
|
||||
unique_id: 1629a83a-a46c-4041-9e49-8e54c5195388
|
||||
unit_of_measurement: 'open'
|
||||
value_template: >-
|
||||
{% set windows_open = states('sensor.windows_open') | int %}
|
||||
{% set doors_open = states('sensor.doors_open') | int %}
|
||||
{{ doors_open + windows_open }}
|
||||
icon_template: >-
|
||||
{% set windows_open = states('sensor.windows_open') | int %}
|
||||
{% set doors_open = states('sensor.doors_open') | int %}
|
||||
{% set faults = ( doors_open + windows_open ) %}
|
||||
{% if faults == 0 %}
|
||||
mdi:shield-home
|
||||
{% else %}
|
||||
mdi:shield-off
|
||||
{% endif %}
|
||||
template:
|
||||
- sensor:
|
||||
- name: "Windows"
|
||||
unique_id: 780770d2-8b5a-4c96-aee4-459281cc3471
|
||||
unit_of_measurement: 'open'
|
||||
state: >-
|
||||
{% set windows = [
|
||||
states.binary_sensor.front_window_near,
|
||||
states.binary_sensor.kitchen_big_window,
|
||||
states.binary_sensor.mud_room_window,
|
||||
states.binary_sensor.stairway_window_lower,
|
||||
] %}
|
||||
{% set windows_open = windows | selectattr('state','eq','on') | list | count %}
|
||||
{{ windows_open }}
|
||||
icon: >-
|
||||
{% set windows = [
|
||||
states.binary_sensor.front_window_near,
|
||||
states.binary_sensor.kitchen_big_window,
|
||||
states.binary_sensor.mud_room_window,
|
||||
states.binary_sensor.stairway_window_lower,
|
||||
] %}
|
||||
{% set windows_open = windows | selectattr('state','eq','on') | list | count %}
|
||||
{% if windows_open == 0 %}
|
||||
mdi:window-closed
|
||||
{% else %}
|
||||
mdi:window-open
|
||||
{% endif %}
|
||||
- name: "Doors" #! This sensor is only for exterior doors, and interior doors that are NOT excluded from security protocols
|
||||
unique_id: 61b1a98a-51a4-4faa-947d-7883de2430c0
|
||||
unit_of_measurement: 'open'
|
||||
state: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.front_door,
|
||||
states.binary_sensor.back_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{{ doors_open }}
|
||||
icon: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.front_door,
|
||||
states.binary_sensor.back_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{% if doors_open == 0 %}
|
||||
mdi:door-closed
|
||||
{% else %}
|
||||
mdi:door-open
|
||||
{% endif %}
|
||||
- name: "Interior Doors" # This sensor is not used for security purposes, only for information
|
||||
unique_id: 772aa056-881a-4778-ba5b-19e46afc107a
|
||||
unit_of_measurement: 'open'
|
||||
state: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.basement_studio_door,
|
||||
states.binary_sensor.downstairs_bathroom_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{{ doors_open }}
|
||||
icon: >-
|
||||
{% set doors = [
|
||||
states.binary_sensor.basement_studio_door,
|
||||
states.binary_sensor.downstairs_bathroom_door,
|
||||
] %}
|
||||
{% set doors_open = doors | selectattr('state','eq','on') | list | count %}
|
||||
{% if doors_open == 0 %}
|
||||
mdi:door-closed
|
||||
{% else %}
|
||||
mdi:door-open
|
||||
{% endif %}
|
||||
- name: Faults
|
||||
unique_id: 1629a83a-a46c-4041-9e49-8e54c5195388
|
||||
unit_of_measurement: 'open'
|
||||
state: >-
|
||||
{% set windows_open = states('sensor.windows_open') | int %}
|
||||
{% set doors_open = states('sensor.doors_open') | int %}
|
||||
{{ doors_open + windows_open }}
|
||||
icon: >-
|
||||
{% set windows_open = states('sensor.windows_open') | int %}
|
||||
{% set doors_open = states('sensor.doors_open') | int %}
|
||||
{% set faults = ( doors_open + windows_open ) %}
|
||||
{% if faults == 0 %}
|
||||
mdi:shield-home
|
||||
{% else %}
|
||||
mdi:shield-off
|
||||
{% endif %}
|
||||
|
||||
automation:
|
||||
- id: 51819f36-2407-496c-afcd-ae160d747f0a
|
||||
|
@ -50,28 +50,6 @@ command_line:
|
||||
scan_interval: 20000
|
||||
unit_of_measurement: ''
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
min_ping:
|
||||
friendly_name: "Min Ping"
|
||||
unique_id: ddcb9f6f-7c94-41fe-9453-2a2205b078e0
|
||||
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_min') }}"
|
||||
availability_template: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
avg_ping:
|
||||
friendly_name: "Avg Ping"
|
||||
unique_id: 79a13c64-7508-48de-8b44-2a23c59917c8
|
||||
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_avg') }}"
|
||||
availability_template: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
max_ping:
|
||||
friendly_name: "Max Ping"
|
||||
unique_id: c9c71ab6-c7fa-4425-a4ed-768d60e93781
|
||||
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_max') }}"
|
||||
availability_template: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Uptime Kuma Status"
|
||||
@ -127,6 +105,22 @@ template:
|
||||
state: "{{ states('sensor.asus_laptop_system_idle_time') | int > 1800 }}"
|
||||
attributes:
|
||||
idle_time: "{{ states('sensor.asus_laptop_system_idle_time') }}s"
|
||||
- sensor:
|
||||
- name: "Min Ping"
|
||||
unique_id: ddcb9f6f-7c94-41fe-9453-2a2205b078e0
|
||||
state: "{{ state_attr('binary_sensor.internet','round_trip_time_min') }}"
|
||||
availability: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
- name: "Avg Ping"
|
||||
unique_id: 79a13c64-7508-48de-8b44-2a23c59917c8
|
||||
state: "{{ state_attr('binary_sensor.internet','round_trip_time_avg') }}"
|
||||
availability: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
- name: "Max Ping"
|
||||
unique_id: c9c71ab6-c7fa-4425-a4ed-768d60e93781
|
||||
state: "{{ state_attr('binary_sensor.internet','round_trip_time_max') }}"
|
||||
availability: "{{ is_state('binary_sensor.internet','on') }}"
|
||||
unit_of_measurement: "ms"
|
||||
|
||||
# - platform: influxdb
|
||||
# host: 192.168.1.26
|
||||
|
@ -1,3 +1,13 @@
|
||||
sensor:
|
||||
- platform: time_date
|
||||
display_options:
|
||||
- 'time'
|
||||
- 'date'
|
||||
- 'date_time'
|
||||
- 'time_date'
|
||||
- 'time_utc'
|
||||
- 'beat'
|
||||
|
||||
intent_script:
|
||||
SetTimer:
|
||||
action:
|
||||
|
@ -38,6 +38,21 @@ input_datetime:
|
||||
has_time: true
|
||||
icon: mdi:medical-bag
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: Home Tech
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/sync/v9/projects/get_data'
|
||||
params:
|
||||
project_id: 2285967948
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
value_template: '{{value_json[''project''][''id'']}}'
|
||||
json_attributes:
|
||||
- project
|
||||
- items
|
||||
scan_interval: 30
|
||||
|
||||
automation:
|
||||
- id: c583aebf-4500-412c-9436-e1b534ba1a44
|
||||
alias: Tony Meds Handler
|
||||
|
10
packages/twitch.yaml
Normal file
10
packages/twitch.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
sensor:
|
||||
- platform: twitch_helix
|
||||
client_id: !secret twitch_client_id
|
||||
client_secret: !secret twitch_client_secret
|
||||
own_channel: ironnerd24
|
||||
thumbnail_dimensions: 320x180
|
||||
entity_prefix: Twitch_
|
||||
channels:
|
||||
- ironnerd24
|
||||
- Xia_P988
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user