Compare commits

..

4 Commits

6 changed files with 194 additions and 33 deletions

View File

@@ -5304,6 +5304,146 @@
data:
datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0)
}}
- id: '1716580842614'
alias: Stairwell and Hallway Motion Lighting
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.stairwell_top_motion
to: 'on'
from: 'off'
id: top-detected
alias: Stairwell Top Detected
- platform: state
entity_id:
- binary_sensor.stairwell_bottom_motion
from: 'off'
to: 'on'
id: bottom-detected
alias: Stairwell Bottom Detected
- platform: state
entity_id:
- binary_sensor.stairwell_top_motion
from: 'on'
to: 'off'
id: top-clear
alias: Stairwell Top Clear
- platform: state
entity_id:
- binary_sensor.stairwell_bottom_motion
from: 'on'
to: 'off'
id: bottom-clear
alias: Stairwell Bottom Clear
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.stairwell_motion_timer
id: stairwell-timer
alias: Stairwell Timer Finished
- alias: Hallway Timer Finished
platform: event
event_type: timer.finished
event_data:
entity_id: timer.upstairs_hallway_motion_timer
id: hallway-timer
condition: []
action:
- variables:
hallway_scene: "{% set people_sleeping = is_state('input_boolean.emma_sleeping','on')
or is_state('input_boolean.kallen_sleeping','on') or is_state('input_boolean.master_bedroom_sleeping','on')
%} {% if is_state('input_boolean.night_mode','on') or people_sleeping == true
%}\n Nightlight\n{% else %}\n Adaptive\n{% endif %}\n"
hallway_action: "{% set people_sleeping = is_state('input_boolean.emma_sleeping','on')
or is_state('input_boolean.kallen_sleeping','on') or is_state('input_boolean.master_bedroom_sleeping','on')
%} {% if is_state('input_boolean.goodnight','on') %}\n off\n{% elif is_state('input_boolean.night_mode','on')
or people_sleeping == true or is_state('binary_sensor.early_night_mode','on')
%}\n on\n{% else %}\n off\n{% endif %}\n"
- choose:
- conditions:
- condition: trigger
id:
- top-detected
- condition: numeric_state
entity_id: sensor.stairwell_top_illuminance
below: input_number.upstairs_hallway_lux_threshold
alias: Stairwell Top Illuminance is below lux threshold
sequence: []
alias: Stairwell Top Detected
- conditions:
- condition: trigger
id:
- bottom-detected
- alias: Stairwell Bottom Illuminance is below lux threshold
condition: numeric_state
entity_id: sensor.stairwell_bottom_illuminance
below: input_number.stairwell_lux_threshold
sequence: []
alias: Stairwell Bottom Detected
- conditions:
- condition: trigger
id:
- top-clear
- alias: Lights are on
condition: or
conditions:
- condition: state
entity_id: light.hallway_overhead
state: 'on'
alias: Hallway Overhead
- alias: Stairwell LED Strip
condition: state
entity_id: light.stairwell_led_strip
state: 'on'
sequence:
- service: timer.start
metadata: {}
data:
duration: '{{ states(''input_number.upstairs_hallway_lights_off_delay'')
| int * 60 }}'
target:
entity_id: timer.upstairs_hallway_motion_timer
alias: Start upstairs hallway motion timer
alias: Stairwell Top Clear
- conditions:
- condition: trigger
id:
- bottom-clear
- alias: Lights are on
condition: or
conditions:
- condition: state
entity_id: light.hallway_overhead
state: 'on'
alias: Hallway Overhead
- alias: Stairwell LED Strip
condition: state
entity_id: light.stairwell_led_strip
state: 'on'
sequence:
- service: timer.start
metadata: {}
data:
duration: '{{ states(''input_number.stairwell_lights_off_delay'') | int
* 60 }}'
target:
entity_id: timer.stairwell_motion_timer
alias: Start stairwell motion timer
alias: Stairwell Bottom Clear
- conditions:
- condition: trigger
id:
- hallway-timer
sequence: []
alias: Hallway Timer Finished
- conditions:
- condition: trigger
id:
- stairwell-timer
sequence: []
alias: Stairwell Timer Finished
mode: restart
'
alias: Set time morning meds were taken

View File

@@ -119,10 +119,6 @@ recorder:
- sensor.*_rssi
- sensor.weatherflow_hub*
- sensor.internet_round_trip*
- sensor.*_monitor_type
- sensor.*_certificate_expiry
- sensor.*_monitored_url
- sensor.*_response_time
entities:
- sensor.avg_ping
- sensor.max_ping
@@ -284,11 +280,6 @@ influxdb:
- binary_sensor.asus_laptop*
- sensor.*ashland*
- sensor.*kasx*
- sensor.*_monitor_type
- sensor.*_certificate_expiry
- sensor.*_monitored_url
- sensor.*_response_time
- sensor.*_status
entities:
- media_player.living_room_tv
- media_player.basement_tv
@@ -461,11 +452,6 @@ prometheus:
- binary_sensor.asus_laptop*
- sensor.*ashland*
- sensor.*kasx*
- sensor.*_monitor_type
- sensor.*_certificate_expiry
- sensor.*_monitored_url
- sensor.*_response_time
- sensor.*_status
include_entities:
- media_player.living_room_tv
- media_player.basement_tv

View File

@@ -47,6 +47,12 @@ input_boolean:
sunset_lights_triggered:
name: Sunset Lights Triggered
icon: mdi:weather-sunset
upstairs_hallway_motion_lighting:
name: Upstairs Hallway Motion Lighting
icon: mdi:motion-sensor
stairwell_motion_lighting:
name: Stairwell Motion Lighting
icon: mdi:motion-sensor
input_number:
upstairs_bathroom_motion_off_delay:

View File

@@ -47,6 +47,7 @@ ## HACS Components
- [PyScript](https://github.com/custom-components/pyscript)
- [Hass Animated Scenes](https://github.com/chazzu/hass-animated-scenes)
- [Jokes](https://github.com/LaggAt/ha-jokes)
- [Uptime Kuma](https://github.com/meichthys/uptime_kuma)
- [Jellyfin](https://github.com/koying/jellyfin_ha)
- [Sonoff LAN](https://github.com/AlexxIT/SonoffLAN)
- [Powercalc](https://github.com/bramstroker/homeassistant-powercalc)

View File

@@ -108,12 +108,27 @@ global_on:
max_brightness:
sequence:
- alias: Turn off Adaptive Lighting and Motion Lighting
data: {}
target:
label_id:
- adaptive_lighting
- motion_lighting
action: switch.turn_off
parallel:
- service: automation.turn_off
metadata: {}
data:
stop_actions: true
target:
label_id: motion_lighting
alias: Automations
- alias: Switches
service: switch.turn_off
data: {}
target:
label_id:
- adaptive_lighting
- motion_lighting
- service: input_boolean.turn_off
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Input Booleans
- delay:
hours: 0
minutes: 0
@@ -463,12 +478,26 @@ max_brightness_cleanup:
target:
entity_id: input_select.basement_studio_scenes
alias: Set basement lights to adaptive
- service: switch.turn_on
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Turn on motion lighting
- alias: Turn on motion lighting
parallel:
- service: input_boolean.turn_on
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Input Booleans
- service: switch.turn_on
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Switches
- service: automation.turn_on
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Automations
mode: single
icon: mdi:broom
cleanup_crash:

View File

@@ -450,19 +450,18 @@
unit_of_measurement: ''
icon: mdi:close-network-outline
state: >
{% set uptimekuma = states.sensor |
selectattr('entity_id','in',integration_entities('192.168.1.111')) |
selectattr('state','eq','down') |
{% set uptimekuma = states.binary_sensor |
selectattr('entity_id','in',integration_entities('uptime_kuma')) |
selectattr('state','eq','off') |
map(attribute='attributes.friendly_name') |
list %}
{{ uptimekuma | count | int }}
attributes:
services: >
{% set uptimekuma = states.sensor |
selectattr('entity_id','in',integration_entities('192.168.1.111')) |
selectattr('state','eq','down') |
{% set uptimekuma = states.binary_sensor |
selectattr('entity_id','in',integration_entities('uptime_kuma')) |
selectattr('state','eq','off') |
map(attribute='attributes.friendly_name') |
map('regex_replace', ' Status$', '') |
list %}
{{ uptimekuma | join(', ') }}
- name: Media Server Viewer Health