WIP motion light with luminescence
This commit is contained in:
@@ -87,27 +87,3 @@ actions:
|
||||
title: HA template 'heat_save' ERROR
|
||||
message: >
|
||||
Bad Conditions state {{ states( sensor_status ) }}
|
||||
|
||||
# - if:
|
||||
# - condition: state
|
||||
# entity_id: !input window_sensor
|
||||
# state: "true"
|
||||
# for:
|
||||
# hours: 0
|
||||
# minutes: 0
|
||||
# seconds: 10
|
||||
# then:
|
||||
# - action: climate.set_hvac_mode
|
||||
# metadata: {}
|
||||
# data:
|
||||
# hvac_mode: "off"
|
||||
# target:
|
||||
# entity_id: !input climate_target
|
||||
# else:
|
||||
# - action: climate.set_hvac_mode
|
||||
# metadata: {}
|
||||
# data:
|
||||
# hvac_mode: heat
|
||||
# target:
|
||||
# entity_id: !input climate_target
|
||||
# mode: single
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
blueprint:
|
||||
name: Motion-activated Light
|
||||
description: Turn on a light when motion is detected.
|
||||
domain: automation
|
||||
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
author: Home Assistant
|
||||
input:
|
||||
motion_entity:
|
||||
name: Motion Sensor
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
light_target:
|
||||
name: Light
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 120
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 3600
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# If motion is detected within the delay,
|
||||
# we restart the script.
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
trigger: state
|
||||
entity_id: !input motion_entity
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
actions:
|
||||
- alias: "Turn on the light"
|
||||
action: light.turn_on
|
||||
target: !input light_target
|
||||
- alias: "Wait until there is no motion from device"
|
||||
wait_for_trigger:
|
||||
trigger: state
|
||||
entity_id: !input motion_entity
|
||||
from: "on"
|
||||
to: "off"
|
||||
- alias: "Wait the number of seconds that has been set"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
action: light.turn_off
|
||||
target: !input light_target
|
||||
@@ -1,63 +0,0 @@
|
||||
blueprint:
|
||||
name: Motion-activated Light Customised with condition after sunset and before sunrise
|
||||
description: Turn on a light when motion is detected.
|
||||
domain: automation
|
||||
# source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
author: Home Assistant Rewised by Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity:
|
||||
name: Motion Sensor
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
light_target:
|
||||
name: Light
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 120
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 3600
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# If motion is detected within the delay,
|
||||
# we restart the script.
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
trigger: state
|
||||
entity_id: !input motion_entity
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
conditions:
|
||||
- condition: sun
|
||||
after: sunset
|
||||
after_offset: "-01:00:00"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
|
||||
actions:
|
||||
- alias: "Turn on the light"
|
||||
action: light.turn_on
|
||||
target: !input light_target
|
||||
- alias: "Wait until there is no motion from device"
|
||||
wait_for_trigger:
|
||||
trigger: state
|
||||
entity_id: !input motion_entity
|
||||
from: "on"
|
||||
to: "off"
|
||||
- alias: "Wait the number of seconds that has been set"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
action: light.turn_off
|
||||
target: !input light_target
|
||||
@@ -1,6 +1,6 @@
|
||||
blueprint:
|
||||
name: Dual Sensor Motion-activated Light Customised with selectable condition after sunset and before sunrise
|
||||
description: Turn on a light when motion is detected.
|
||||
name: Dual Sensor Sunrise / Sunset Motion-activated Light
|
||||
description: Turn on a light when motion is detected (with Sunrise / Sunset).
|
||||
domain: automation
|
||||
# source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
author: Home Assistant Rewised by Tiziano Trabattoni
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
blueprint:
|
||||
name: Dual Sensor Sunset and Luminescence Motion-activated Light
|
||||
description: Turn on a light when motion is detected.
|
||||
description: Turn on a light when motion is detected (with Sunrise / Sunset / Luminance).
|
||||
domain: automation
|
||||
# source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
author: Home Assistant Rewised by Tiziano Trabattoni
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity_down:
|
||||
name: Motion Sensor (Sensore Basso)
|
||||
@@ -33,15 +33,6 @@ blueprint:
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 30
|
||||
selector:
|
||||
number:
|
||||
min: 10
|
||||
max: 120
|
||||
unit_of_measurement: seconds
|
||||
|
||||
trigger_variables:
|
||||
use_sun: !input sun_condition
|
||||
@@ -71,10 +62,13 @@ actions:
|
||||
- condition: template
|
||||
value_template: "{{ use_sun }}"
|
||||
sequence:
|
||||
# we need to use either external luminescence or sunrise and sunset conditions
|
||||
- if:
|
||||
- or:
|
||||
# external light is LOW (below Helper daylight_luminescence set value)
|
||||
- condition: template
|
||||
value_template: "{{ ( sensor.esterno_luminosita_illuminance_lux | int ) < input_number.daylight_luminescence }}"
|
||||
value_template: "{{ ( states('sensor.esterno_luminosita_illuminance_lux') | int ) < ( states('input_number.daylight_luminescence') | int ) }}"
|
||||
# after sunrise and before sunset
|
||||
- condition: sun
|
||||
after: sunset
|
||||
after_offset: "-01:00:00"
|
||||
@@ -96,6 +90,7 @@ actions:
|
||||
transition: 10
|
||||
target: !input light_target
|
||||
default:
|
||||
# the motion light is always active
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
blueprint:
|
||||
name: Dual Sensor Motion-activated Light Customised with selectable condition after sunset and before sunrise
|
||||
description: Turn on a light when motion is detected.
|
||||
name: Dual Sensor Motion-activated Light (no Sunrise / Sunset)
|
||||
description: Turn on a light when motion is detected (active all time)
|
||||
domain: automation
|
||||
# source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
author: Home Assistant Rewised by Tiziano Trabattoni
|
||||
|
||||
Reference in New Issue
Block a user