Skip to content

Commit

Permalink
input_numbers for motion triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Aug 2, 2020
1 parent 075ae9a commit 490f5cf
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 71 deletions.
6 changes: 0 additions & 6 deletions input_number.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ warm_upper_bath_before_wakeup:
min: 18
max: 30
step: 0.5
oben_treppe_motion_trigger_delay:
name: Treppen Bewegungsmelder Licht Dauer
icon: mdi:alarm
min: 90
max: 300
step: 5
#################################################################
## Appdaemon App Switches - Thermostats - Leaving
#################################################################
Expand Down
47 changes: 47 additions & 0 deletions packages/climate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,53 @@ script:
temperature: >
{{ state_attr('climate.wohnzimmer_thermostat', 'temperature') | float
+ 2 }}
automation:
- id: bfbb961f-ca65-4916-b9f6-b4afabadc7af
alias: Fußbodenheizung im Bad aus/an wenn Fenster auf/zu
description: Turn on/off bathroom floor heating when the window is opened/closed
trigger:
- platform: state
entity_id: binary_sensor.contact_lower_bathroom_window_tilted
- platform: state
entity_id: binary_sensor.contact_lower_bathroom_window
action:
- choose:
- conditions:
- condition: template
value_template: >
{{ trigger.to_state.state == 'on'}}
sequence:
- service: homeassistant.turn_off
entity_id: climate.bad_thermostat
default:
- service: homeassistant.turn_on
entity_id: climate.bad_thermostat
- id: cc85d256-87ae-4303-b234-27d81c98451b
alias: Fußbodenheizung im Bad oben aus/an wenn Fenster auf/zu
description: Turn on/off upper bathroom floor heating when the window is opened/closed
trigger:
- platform: state
entity_id: binary_sensor.contact_upper_bathroom_window_tilted
- platform: state
entity_id: binary_sensor.contact_upper_bathroom_window
action:
- choose:
- conditions:
- condition: template
value_template: >
{{ trigger.to_state.state == 'on'}}
sequence:
- service: homeassistant.turn_off
entity_id: climate.bad_oben_thermostat
default:
- service: homeassistant.turn_on
entity_id: climate.bad_oben_thermostat
homeassistant:
customize:
automation.fussbodenheizung_im_bad_aus_an_wenn_fenster_auf_zu:
icon: mdi:radiator-off
automation.fussbodenheizung_im_bad_oben_aus_an_wenn_fenster_auf_zu:
icon: mdi:radiator-off
cloud:
alexa:
filter:
Expand Down
1 change: 0 additions & 1 deletion packages/fridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ homeassistant:
customize:
automation.kuhlschrank_strom_kontrolle:
icon: mdi:fridge

cloud:
alexa:
filter:
Expand Down
41 changes: 32 additions & 9 deletions packages/motion_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ automation:
data:
entity_id: light.upper_stairs_yeelight
brightness: 1
- delay: 60
- delay:
seconds: "{{ states('input_number.stairs_motion_trigger_delay') | int }}"
- service: light.turn_off
data:
entity_id: light.stairs_lower_yeelight
Expand All @@ -47,7 +48,8 @@ automation:
data:
entity_id: light.upper_stairs_yeelight
brightness: 100
- delay: 60
- delay:
seconds: "{{ states('input_number.stairs_motion_trigger_delay') | int }}"
- service: light.turn_off
data:
entity_id: light.stairs_lower_yeelight
Expand Down Expand Up @@ -80,7 +82,8 @@ automation:
data:
entity_id: light.philips_miio_light_bulb
brightness: 100
- delay: 60
- delay:
seconds: "{{ states('input_number.studyroom_motion_trigger_delay') | int }}"
- service: light.turn_off
data:
entity_id: light.philips_miio_light_bulb
Expand Down Expand Up @@ -110,7 +113,8 @@ automation:
data:
entity_id: light.lower_bathroom_yeelight
brightness: 1
- delay: 60
- delay:
seconds: "{{ states('input_number.bathroom_motion_trigger_delay') | int }}"
- service: light.turn_off
data:
entity_id: light.lower_bathroom_yeelight
Expand All @@ -119,7 +123,8 @@ automation:
data:
entity_id: light.lower_bathroom_yeelight
brightness: 100
- delay: 60
- delay:
seconds: "{{ states('input_number.bathroom_motion_trigger_delay') | int }}"
- service: light.turn_off
data:
entity_id: light.lower_bathroom_yeelight
Expand Down Expand Up @@ -149,10 +154,26 @@ automation:
data:
entity_id: light.bedroom_yeelight
brightness: 100
- delay: 60
- service: light.turn_off
data:
entity_id: light.bedroom_yeelight

input_number:
stairs_motion_trigger_delay:
name: Treppen Bewegungsmelder Licht Dauer
icon: mdi:alarm
min: 90
max: 300
step: 5
studyroom_motion_trigger_delay:
name: Arbeitszimmer Bewegungsmelder Licht Dauer
icon: mdi:alarm
min: 90
max: 300
step: 5
bathroom_motion_trigger_delay:
name: Bad Bewegungsmelder Licht Dauer
icon: mdi:alarm
min: 90
max: 6000
step: 5
homeassistant:
customize:
automation.treppe_bewegungsmelder:
Expand All @@ -161,3 +182,5 @@ homeassistant:
icon: mdi:briefcase
automation.bad_bewegungsmelder:
icon: mdi:shower
automation.schlafzimmer_bewegungsmelder:
icon: mdi:bed
4 changes: 2 additions & 2 deletions packages/room_presence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sensor:
value_template: >-
{% if states.device_tracker.sm_g975f.state != 'home'
and states.device_tracker.sm_g975f.state == 'not_home' %}
Unterwegs
{{ states('sensor.sm_g975f_geocoded_location') }}
{% elif states.device_tracker.sm_g975f.state != 'home'
and states.device_tracker.sm_g975f.state != 'not_home' %}
{{states.device_tracker.sm_g975f.state}}
Expand All @@ -90,7 +90,7 @@ sensor:
value_template: >-
{% if states.device_tracker.oneplus_a3003.state != 'home'
and states.device_tracker.oneplus_a3003.state == 'not_home' %}
Unterwegs
{{ states('sensor.oneplus_a3003_geocoded_location') }}
{% elif states.device_tracker.oneplus_a3003.state != 'home'
and states.device_tracker.oneplus_a3003.state != 'not_home' %}
{{states.device_tracker.oneplus_a3003.state}}
Expand Down
53 changes: 0 additions & 53 deletions packages/toggle_thermostat_when_window_open.yaml

This file was deleted.

0 comments on commit 490f5cf

Please sign in to comment.