WIP motion light with luminescence
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
- id: "1729875991469"
|
- id: '1729875991469'
|
||||||
alias: BagnoOvest-save-energy
|
alias: BagnoOvest-save-energy
|
||||||
description: Thermostat will close upon window open
|
description: Thermostat will close upon window open
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
@@ -6,27 +6,27 @@
|
|||||||
input:
|
input:
|
||||||
window_sensor: binary_sensor.bagnoovest_finestra_contact
|
window_sensor: binary_sensor.bagnoovest_finestra_contact
|
||||||
climate_target: climate.bagnoovest_termosifone
|
climate_target: climate.bagnoovest_termosifone
|
||||||
- id: "1729887529602"
|
- id: '1729887529602'
|
||||||
alias: BagnoPT-save-energy
|
alias: BagnoPT-save-energy
|
||||||
description: ""
|
description: ''
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
path: homeassistant/heat_save.yaml
|
path: homeassistant/heat_save.yaml
|
||||||
input:
|
input:
|
||||||
window_sensor: binary_sensor.bagnopt_finestra_contact
|
window_sensor: binary_sensor.bagnopt_finestra_contact
|
||||||
climate_target: climate.bagnopt_termosifone
|
climate_target: climate.bagnopt_termosifone
|
||||||
ext_temp_limit: 17
|
ext_temp_limit: 17
|
||||||
- id: "1729887632269"
|
- id: '1729887632269'
|
||||||
alias: SoggiornoPT-save-energy
|
alias: SoggiornoPT-save-energy
|
||||||
description: ""
|
description: ''
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
path: homeassistant/heat_save.yaml
|
path: homeassistant/heat_save.yaml
|
||||||
input:
|
input:
|
||||||
window_sensor: binary_sensor.soggiornopt_finestrasud_contact
|
window_sensor: binary_sensor.soggiornopt_finestrasud_contact
|
||||||
climate_target: climate.soggiornopt_termosifonesud
|
climate_target: climate.soggiornopt_termosifonesud
|
||||||
ext_temp_limit: 17
|
ext_temp_limit: 17
|
||||||
- id: "1730726143088"
|
- id: '1730726143088'
|
||||||
alias: Luce Automatica Scala Taverna
|
alias: Luce Automatica Scala Taverna
|
||||||
description: ""
|
description: ''
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
path: homeassistant/motion_light_dual_no_sun.yaml
|
path: homeassistant/motion_light_dual_no_sun.yaml
|
||||||
input:
|
input:
|
||||||
@@ -35,9 +35,9 @@
|
|||||||
light_target:
|
light_target:
|
||||||
device_id: 226779fb30bd68c5a2784ccd762d90e9
|
device_id: 226779fb30bd68c5a2784ccd762d90e9
|
||||||
no_motion_wait: 20
|
no_motion_wait: 20
|
||||||
- id: "1730726243854"
|
- id: '1730726243854'
|
||||||
alias: Luce Automatica Scala Mansarda
|
alias: Luce Automatica Scala Mansarda
|
||||||
description: ""
|
description: ''
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
path: homeassistant/motion_light_dual.yaml
|
path: homeassistant/motion_light_dual.yaml
|
||||||
input:
|
input:
|
||||||
@@ -46,31 +46,41 @@
|
|||||||
light_target:
|
light_target:
|
||||||
device_id: 702137a6f2c17b89fdb0598f7003743c
|
device_id: 702137a6f2c17b89fdb0598f7003743c
|
||||||
no_motion_wait: 20
|
no_motion_wait: 20
|
||||||
- id: "1731410549094"
|
- id: '1731410549094'
|
||||||
alias: EVcharge_front_charging
|
alias: EVcharge_front_charging
|
||||||
description: ""
|
description: ''
|
||||||
triggers:
|
triggers:
|
||||||
- trigger: state
|
- trigger: state
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.evcharge_front_start
|
- input_boolean.evcharge_front_start
|
||||||
for:
|
for:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 10
|
seconds: 10
|
||||||
conditions: []
|
conditions: []
|
||||||
actions:
|
actions:
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
- trigger: time
|
- trigger: time
|
||||||
at: input_datetime.evcharge_good_time_start
|
at: input_datetime.evcharge_good_time_start
|
||||||
- type: turn_on
|
- type: turn_on
|
||||||
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
||||||
entity_id: c1f2a5e1b3bc7807a8b291b6fd6dbb31
|
entity_id: c1f2a5e1b3bc7807a8b291b6fd6dbb31
|
||||||
domain: switch
|
domain: switch
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
- trigger: time
|
- trigger: time
|
||||||
at: input_datetime.evcharge_good_time_end
|
at: input_datetime.evcharge_good_time_end
|
||||||
- type: turn_off
|
- type: turn_off
|
||||||
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
||||||
entity_id: c1f2a5e1b3bc7807a8b291b6fd6dbb31
|
entity_id: c1f2a5e1b3bc7807a8b291b6fd6dbb31
|
||||||
domain: switch
|
domain: switch
|
||||||
mode: single
|
mode: single
|
||||||
|
- id: '1731631866160'
|
||||||
|
alias: test1
|
||||||
|
description: ''
|
||||||
|
use_blueprint:
|
||||||
|
path: homeassistant/motion_light_dual_lux.yaml
|
||||||
|
input:
|
||||||
|
motion_entity_down: binary_sensor.presenza_bassa_scala_mansarda_occupancy
|
||||||
|
motion_entity_up: binary_sensor.presenza_alta_scala_mansarda_occupancy
|
||||||
|
light_target:
|
||||||
|
device_id: 702137a6f2c17b89fdb0598f7003743c
|
||||||
|
|||||||
114
blueprints/automation/homeassistant/motion_light_dual_lux.yaml
Normal file
114
blueprints/automation/homeassistant/motion_light_dual_lux.yaml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
blueprint:
|
||||||
|
name: Dual Sensor Sunset and Luminescence 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 Rewised by Tiziano Trabattoni
|
||||||
|
input:
|
||||||
|
motion_entity_down:
|
||||||
|
name: Motion Sensor (Sensore Basso)
|
||||||
|
description: Sensore parte bassa della scala
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
device_class: motion
|
||||||
|
domain: binary_sensor
|
||||||
|
motion_entity_up:
|
||||||
|
name: Motion Sensor (Sensore Alto)
|
||||||
|
description: Sensore parte alta della scala
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
device_class: motion
|
||||||
|
domain: binary_sensor
|
||||||
|
light_target:
|
||||||
|
name: Light
|
||||||
|
selector:
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
domain: light
|
||||||
|
sun_condition:
|
||||||
|
name: Sun_driven
|
||||||
|
description: Controlled by sunrise and sunset
|
||||||
|
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
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- !input motion_entity_up
|
||||||
|
- !input motion_entity_down
|
||||||
|
to: "on"
|
||||||
|
id: motion-detected
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- !input motion_entity_up
|
||||||
|
- !input motion_entity_down
|
||||||
|
to: "off"
|
||||||
|
for:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: !input no_motion_wait
|
||||||
|
|
||||||
|
conditions: []
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ use_sun }}"
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- or:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ ( sensor.esterno_luminosita_illuminance_lux | int ) < input_number.daylight_luminescence }}"
|
||||||
|
- condition: sun
|
||||||
|
after: sunset
|
||||||
|
after_offset: "-01:00:00"
|
||||||
|
before: sunrise
|
||||||
|
before_offset: "+01:00:00"
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- motion-detected
|
||||||
|
then:
|
||||||
|
- action: light.turn_on
|
||||||
|
target: !input light_target
|
||||||
|
data: {}
|
||||||
|
else:
|
||||||
|
- action: light.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
transition: 10
|
||||||
|
target: !input light_target
|
||||||
|
default:
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- motion-detected
|
||||||
|
then:
|
||||||
|
- action: light.turn_on
|
||||||
|
target: !input light_target
|
||||||
|
data: {}
|
||||||
|
else:
|
||||||
|
- action: light.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
transition: 10
|
||||||
|
target: !input light_target
|
||||||
|
|
||||||
|
mode: single
|
||||||
Reference in New Issue
Block a user