Compare commits
26 Commits
8d1b272cce
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a4fc5fb0b8 | |||
| 2faf02aa4d | |||
| 673adba896 | |||
| 8615882a3e | |||
| 8c3b41eae1 | |||
| ffda257fc0 | |||
| 5d12d0ab71 | |||
| d5437abb61 | |||
| c6315ede9b | |||
| bb0d3cded5 | |||
| b6196a4651 | |||
| b89ca293ae | |||
| c2d91b3646 | |||
| cdb498be6a | |||
| 7fee79c364 | |||
| d003fd5f0f | |||
| 62611ecc37 | |||
| 40bbf1ca65 | |||
| 588c8310ca | |||
| f0e608166f | |||
| 90db78aa8d | |||
| 2b925109ef | |||
| 2a63241c72 | |||
| c8cdade85c | |||
| 539f7132b7 | |||
| 326414bd89 |
@@ -1 +1 @@
|
||||
2025.9.3
|
||||
2026.3.3
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -11,4 +11,7 @@ dwains-dashboard/*
|
||||
home-assistant.log*
|
||||
zigbee2mqtt
|
||||
.HA_VERSION
|
||||
.HA_VERSION
|
||||
.ha_run.lock
|
||||
pycupra_data/*
|
||||
esphome/*
|
||||
.cache/*
|
||||
1
.ha_run.lock
Normal file
1
.ha_run.lock
Normal file
@@ -0,0 +1 @@
|
||||
{"pid": 65, "version": 1, "ha_version": "2026.3.3", "start_ts": 1774178078.8002532}
|
||||
701
automations.yaml
701
automations.yaml
@@ -1,4 +1,4 @@
|
||||
- id: '1729875991469'
|
||||
- id: "1729875991469"
|
||||
alias: BagnoOvest-save-energy
|
||||
description: Thermostat will close upon window open
|
||||
use_blueprint:
|
||||
@@ -6,85 +6,49 @@
|
||||
input:
|
||||
window_sensor: binary_sensor.bagnoovest_finestra_contact
|
||||
climate_target: climate.bagnoovest_termosifone
|
||||
- id: '1729887529602'
|
||||
- id: "1729887529602"
|
||||
alias: BagnoPT-save-energy
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/heat_save.yaml
|
||||
input:
|
||||
window_sensor: binary_sensor.bagnopt_finestra_contact
|
||||
climate_target: climate.bagnopt_termosifone
|
||||
ext_temp_limit: 17
|
||||
- id: '1729887632269'
|
||||
- id: "1729887632269"
|
||||
alias: SoggiornoPT-save-energy
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/heat_save.yaml
|
||||
input:
|
||||
window_sensor: binary_sensor.soggiornopt_finestrasud_contact
|
||||
climate_target: climate.soggiornopt_termosifonesud
|
||||
ext_temp_limit: 17
|
||||
- id: '1731705145404'
|
||||
alias: Luce Automatica Scala Mansarda
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_dual_ng.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_alta_scala_mansarda_occupancy
|
||||
motion_entity2: binary_sensor.presenza_bassa_scala_mansarda_occupancy
|
||||
light_target:
|
||||
device_id: 702137a6f2c17b89fdb0598f7003743c
|
||||
no_motion_wait: 30
|
||||
- id: '1732739522749'
|
||||
alias: Luce Automatica Taverna Garage
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_trix_ng.yaml
|
||||
input:
|
||||
light_target:
|
||||
entity_id: light.luce_taverna_garage
|
||||
motion_entity1: binary_sensor.presenza_bassa_scala_taverna_occupancy
|
||||
motion_entity2: binary_sensor.presenza_taverna_garage_occupancy
|
||||
motion_entity3: binary_sensor.presenza_taverna_lavanderia_occupancy
|
||||
use_sun: false
|
||||
dont_disturb: false
|
||||
no_motion_wait: 40
|
||||
- id: '1736805701473'
|
||||
- id: "1736805701473"
|
||||
alias: P1confort-light
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/confort_light.yaml
|
||||
input:
|
||||
light_target:
|
||||
device_id: e0397b54f1c2d1514be403e2996ca368
|
||||
- id: '1738366774549'
|
||||
alias: Test-motion-light-ng
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_dual_ng.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_alta_scala_mansarda_occupancy
|
||||
motion_entity2: binary_sensor.presenza_bassa_scala_mansarda_occupancy
|
||||
light_target:
|
||||
device_id: 9f46c5b7c07f1495e0f4bf8d6f72a525
|
||||
no_motion_wait: 0
|
||||
dont_disturb: false
|
||||
- id: '1738426726761'
|
||||
- id: "1738426726761"
|
||||
alias: Test-Pulsante01
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/button_action.yaml
|
||||
input:
|
||||
light_target:
|
||||
entity_id: light.test_lamp1
|
||||
- id: '1739393696392'
|
||||
- id: "1739393696392"
|
||||
alias: Power-load-high
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/power-load-high.yaml
|
||||
- id: '1740247429602'
|
||||
- id: "1740247429602"
|
||||
alias: EVcharge-process
|
||||
description: Manage charge of 2 cars sequentially via 2 controlled plugs (requires
|
||||
description:
|
||||
Manage charge of 2 cars sequentially via 2 controlled plugs (requires
|
||||
power and energy entities)
|
||||
use_blueprint:
|
||||
path: homeassistant/evcharge-process.yaml
|
||||
@@ -94,151 +58,118 @@
|
||||
use_entity1: input_boolean.evcharge_front_request
|
||||
use_entity2: input_boolean.evcharge_back_request
|
||||
start_button: input_button.evcharge_start
|
||||
- id: '1740332596550'
|
||||
- id: "1740332596550"
|
||||
alias: test-email
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/test_macro.yaml
|
||||
- id: '1748185066312'
|
||||
alias: Luce-Garage
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/presence_light.yaml
|
||||
input:
|
||||
presence_entity1: binary_sensor.presenza_garage_occupancy
|
||||
light_target:
|
||||
device_id: d5b217920e2f4fe83e0496257b27e39c
|
||||
use_sun: false
|
||||
dont_disturb: false
|
||||
no_presence_wait: 180
|
||||
- id: '1753031203413'
|
||||
- id: "1753031203413"
|
||||
alias: Apri-Cancelletto
|
||||
description: ''
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- input_button.apri_cancelletto
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- input_button.apri_cancelletto
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 200
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
milliseconds: 0
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 200
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
milliseconds: 0
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 4a76297a493304816b1084c6979f4801
|
||||
mode: single
|
||||
- id: '1753371588861'
|
||||
- id: "1753371588861"
|
||||
alias: Cancelletto Alert
|
||||
description: ''
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.cancelletto_visitor
|
||||
to: 'on'
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.cancelletto_visitor
|
||||
to: "on"
|
||||
conditions: []
|
||||
actions:
|
||||
- device_id: 61ac46de1cc773e1b7d5faa379ee465b
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
- device_id: f0ad21f704179a15735313abaa4bd548
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
- device_id: 46e6c7b252a23f498de8602ca380d0a9
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: true
|
||||
- device_id: 163daed9ae6074cfa3a10b866ab5d2e0
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
- device_id: 8836f21983cdb6b245d3be58d7acd7d7
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
- device_id: 61ac46de1cc773e1b7d5faa379ee465b
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
- device_id: f0ad21f704179a15735313abaa4bd548
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
- device_id: 46e6c7b252a23f498de8602ca380d0a9
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: true
|
||||
- device_id: 163daed9ae6074cfa3a10b866ab5d2e0
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
- device_id: 8836f21983cdb6b245d3be58d7acd7d7
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
|
||||
enabled: false
|
||||
mode: single
|
||||
- id: '1756127648616'
|
||||
alias: Luce Automatica Scala Taverna
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_dual_ng.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_alta_scala_taverna_occupancy
|
||||
motion_entity2: binary_sensor.presenza_bassa_scala_taverna_occupancy
|
||||
light_target:
|
||||
device_id: 6d330da42619e33e75960756cd2262eb
|
||||
use_sun: false
|
||||
dont_disturb: false
|
||||
no_motion_wait: 30
|
||||
- id: '1757599657040'
|
||||
- id: "1757599657040"
|
||||
alias: Luce-Giardino
|
||||
description: ''
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: sun
|
||||
event: sunset
|
||||
offset: '1800'
|
||||
id: giardino-on
|
||||
- trigger: time
|
||||
at: '22:00:00'
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
- sat
|
||||
- sun
|
||||
id: giardino-off
|
||||
- trigger: sun
|
||||
event: sunset
|
||||
offset: "1500"
|
||||
id: giardino-on
|
||||
- trigger: time
|
||||
at: "22:00:00"
|
||||
id: giardino-off
|
||||
conditions: []
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- giardino-on
|
||||
then:
|
||||
- action: light.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 52db33441371f13f0f217a2e66668a2c
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- giardino-off
|
||||
then:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 52db33441371f13f0f217a2e66668a2c
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- giardino-on
|
||||
then:
|
||||
- action: light.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 52db33441371f13f0f217a2e66668a2c
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- giardino-off
|
||||
then:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 52db33441371f13f0f217a2e66668a2c
|
||||
mode: single
|
||||
- id: '1757871524695'
|
||||
- id: "1757871524695"
|
||||
alias: EVcharge_process_PRO
|
||||
description: ''
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/evcharge_process_pro.yaml
|
||||
input:
|
||||
@@ -250,41 +181,403 @@
|
||||
charged_entity1: input_number.evcharge_front_charged
|
||||
charged_entity2: input_number.evcharge_back_charged
|
||||
stop_button: input_button.evcharge_pro_stop
|
||||
- id: '1758560143754'
|
||||
- id: "1758560143754"
|
||||
alias: Cancelletto-on
|
||||
description: ''
|
||||
description: ""
|
||||
triggers:
|
||||
- type: turned_on
|
||||
device_id: 3c1785ee92ef67b2536571f4e318db84
|
||||
entity_id: 34480c273e9378e8582a881acd4a7871
|
||||
domain: binary_sensor
|
||||
trigger: device
|
||||
- type: turned_on
|
||||
device_id: 3c1785ee92ef67b2536571f4e318db84
|
||||
entity_id: 34480c273e9378e8582a881acd4a7871
|
||||
domain: binary_sensor
|
||||
trigger: device
|
||||
conditions: []
|
||||
actions:
|
||||
- action: input_boolean.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.cancelletto_video_duration
|
||||
- action: input_boolean.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.cancelletto_video_duration
|
||||
mode: single
|
||||
- id: '1758560334981'
|
||||
- id: "1758560334981"
|
||||
alias: Cancelletto-off
|
||||
description: ''
|
||||
description: ""
|
||||
triggers:
|
||||
- type: turned_off
|
||||
device_id: 3c1785ee92ef67b2536571f4e318db84
|
||||
entity_id: 34480c273e9378e8582a881acd4a7871
|
||||
domain: binary_sensor
|
||||
trigger: device
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 0
|
||||
- type: turned_off
|
||||
device_id: 3c1785ee92ef67b2536571f4e318db84
|
||||
entity_id: 34480c273e9378e8582a881acd4a7871
|
||||
domain: binary_sensor
|
||||
trigger: device
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 48
|
||||
conditions: []
|
||||
actions:
|
||||
- action: input_boolean.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.cancelletto_video_duration
|
||||
- action: input_boolean.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.cancelletto_video_duration
|
||||
mode: single
|
||||
- id: "1759608901579"
|
||||
alias: Luce-Manuale-Salotto
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.luce_salotto_ctrl
|
||||
id: luce-salotto-toogle
|
||||
conditions: []
|
||||
actions:
|
||||
- action: light.toggle
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: light.luce_salotto
|
||||
mode: single
|
||||
- id: "1763497184744"
|
||||
alias: ETcontroller_pub_setFixHPlimit
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- input_select.fix_hp_power
|
||||
conditions: []
|
||||
actions:
|
||||
- action: mqtt.publish
|
||||
metadata: {}
|
||||
data_template:
|
||||
topic: etcontroller/sw/commands
|
||||
payload:
|
||||
"{\"cmd\": \"setFixHPlimit\", \"params\": {\n \"level\": \"{{states('input_select.fix_hp_power')}}\",\n
|
||||
\ \"duration\": {{states('input_number.fix_hp_power_duration')}} }}"
|
||||
mode: single
|
||||
- id: "1774178169206"
|
||||
alias: Luce Automatica Scala-Mansarda
|
||||
description: Motion light PRO dual
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_pro_dual.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_alta_scala_mansarda_occupancy
|
||||
motion_entity2: binary_sensor.presenza_bassa_scala_mansarda_occupancy
|
||||
light_target:
|
||||
entity_id: light.luce_scala_mansarda
|
||||
no_motion_wait: 40
|
||||
use_sun: true
|
||||
- id: "1774178649402"
|
||||
alias: Luce Automatica Scala-Taverna
|
||||
description: Motion light PRO dual per Scala Taverna
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_pro_dual.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_alta_scala_taverna_occupancy
|
||||
motion_entity2: binary_sensor.presenza_bassa_scala_taverna_occupancy
|
||||
light_target:
|
||||
entity_id: light.luce_scala_taverna
|
||||
no_motion_wait: 40
|
||||
use_sun: false
|
||||
dont_disturb: false
|
||||
- id: "1774187260983"
|
||||
alias: Luce Automatica Taverna-Garage
|
||||
description: Motion light PRO dual per Luce Taverna-Garage
|
||||
use_blueprint:
|
||||
path: homeassistant/motion_light_pro_triple.yaml
|
||||
input:
|
||||
motion_entity1: binary_sensor.presenza_bassa_scala_taverna_occupancy
|
||||
motion_entity2: binary_sensor.presenza_taverna_garage_occupancy
|
||||
motion_entity3: binary_sensor.presenza_taverna_lavanderia_occupancy
|
||||
light_target:
|
||||
entity_id: light.luce_taverna_garage
|
||||
use_sun: false
|
||||
dont_disturb: false
|
||||
no_motion_wait: 60
|
||||
- id: "1764007463105"
|
||||
alias: ETcontroller_fix_limit_copy
|
||||
description:
|
||||
"This Automation allows to copy status from MQTT read HP Fix Limit
|
||||
set by ETcontroller.py to internal input_select.fix_hp_power in order to align.
|
||||
dashboards when fix_hp_limit expires
|
||||
|
||||
"
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.fix_hp_level_read
|
||||
conditions: []
|
||||
actions:
|
||||
- action: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.fix_hp_power
|
||||
data_template:
|
||||
option: "{{ states('sensor.fix_hp_level_read') }}"
|
||||
mode: single
|
||||
- id: "1774188925405"
|
||||
alias: Luce Automatica Garage
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.presenza_garage_occupancy
|
||||
from:
|
||||
- "off"
|
||||
to:
|
||||
- "on"
|
||||
id: garage_on
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.presenza_garage_occupancy
|
||||
from:
|
||||
- "on"
|
||||
to:
|
||||
- "off"
|
||||
id: garage_off
|
||||
conditions: []
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- garage_on
|
||||
then:
|
||||
- action: light.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: light.luce_garage
|
||||
data: {}
|
||||
else:
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
milliseconds: 0
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: light.luce_garage
|
||||
data: {}
|
||||
mode: single
|
||||
- id: "1765575450095"
|
||||
alias: Xmas-light-mgmt
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: sun
|
||||
event: sunset
|
||||
offset: "-900"
|
||||
id: Xmas-light-on
|
||||
- trigger: time
|
||||
at: 01:00:00
|
||||
id: Xmas-light-off
|
||||
- trigger: time
|
||||
at: 06:50:00
|
||||
id: Xmas-light-on
|
||||
- trigger: sun
|
||||
event: sunrise
|
||||
offset: "900"
|
||||
id: Xmas-light-off
|
||||
conditions: []
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- Xmas-light-on
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id:
|
||||
- light.presa_smart_1
|
||||
- light.presa_smart_11
|
||||
- light.presa_smart_2
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- Xmas-light-off
|
||||
sequence:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id:
|
||||
- light.presa_smart_1
|
||||
- light.presa_smart_2
|
||||
- light.presa_smart_11
|
||||
data: {}
|
||||
- conditions: []
|
||||
sequence:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id:
|
||||
- light.presa_smart_1
|
||||
- light.presa_smart_2
|
||||
- light.presa_smart_11
|
||||
data: {}
|
||||
default:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id:
|
||||
- light.presa_smart_1
|
||||
- light.presa_smart_2
|
||||
- light.presa_smart_11
|
||||
data: {}
|
||||
mode: single
|
||||
- id: "1769710512491"
|
||||
alias: Check-Batteries
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: Blackshome/low-battery-notifications-and-actions.yaml
|
||||
input:
|
||||
include_button: enable_button_trigger
|
||||
button_entity: input_button.check_batteries
|
||||
include_time: time_disabled
|
||||
include_easy_notify: enable_easy_okay_notify
|
||||
notify_device:
|
||||
- 61ac46de1cc773e1b7d5faa379ee465b
|
||||
- id: "1770243140821"
|
||||
alias: ETHW_PRO_reset
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- input_button.ethw_pro_reset
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
device_id: 83fcb9d6fe7420d69f1b4cb63adfddae
|
||||
data: {}
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 8
|
||||
milliseconds: 0
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
device_id: 83fcb9d6fe7420d69f1b4cb63adfddae
|
||||
data: {}
|
||||
mode: single
|
||||
- id: "1770846621388"
|
||||
alias: Nicola_send_message
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: 08:30:00
|
||||
id: send_nicola_message
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
- sat
|
||||
- trigger: time
|
||||
at: "14:00:00"
|
||||
id: send_nicola_message
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
- trigger: time
|
||||
at: "18:00:00"
|
||||
id: send_nicola_message
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
actions:
|
||||
- action: notify.tiziano_trabattoni_gmail_com
|
||||
data:
|
||||
title: Persiane di Tiziano
|
||||
target: "{{ recipient_persiane_list_gmail['target'] }}"
|
||||
message: '"Nicola, Nicola, Nicola le mie persiane. Un Tiziano Disperato ""'
|
||||
mode: single
|
||||
variables:
|
||||
_cafe_metadata:
|
||||
version: 1
|
||||
strategy: native
|
||||
nodes:
|
||||
trigger_1770846171469_0:
|
||||
x: 255
|
||||
y: 135
|
||||
action_1770846272163_1:
|
||||
x: 675
|
||||
y: 150
|
||||
graph_id: 58ade0d9-32c5-40df-b6e5-73442506a775
|
||||
graph_version: 1
|
||||
recipient_persiane_list_gmail:
|
||||
title: Persiane di Tiziano
|
||||
target:
|
||||
- sistemser@alice.it
|
||||
- id: "1771585465072"
|
||||
alias: Nuova automazione
|
||||
description: ""
|
||||
triggers:
|
||||
- trigger: tag
|
||||
tag_id: fdd88606-1018-4f01-8e7a-792c87c77943
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.toggle
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.edelweiss_accesscontol_allarme_disinserito
|
||||
- switch.edelweiss_accesscontol_allarme_inserito
|
||||
data: {}
|
||||
mode: single
|
||||
- id: "1773510003619"
|
||||
alias: SalottoPT-save-energy
|
||||
description: ""
|
||||
use_blueprint:
|
||||
path: homeassistant/heat_save.yaml
|
||||
input:
|
||||
window_sensor: binary_sensor.salottopt_finestra_contact
|
||||
climate_target: climate.salottopt_termosifone
|
||||
ext_temp_limit: 17
|
||||
- id: "1773787966184"
|
||||
alias: SE_fan_automation
|
||||
description: Manages fan under Solaredge Inverter
|
||||
triggers:
|
||||
- trigger: numeric_state
|
||||
entity_id:
|
||||
- sensor.se_heatsink_temp
|
||||
above: 36
|
||||
id: se_fan_on
|
||||
- trigger: numeric_state
|
||||
entity_id:
|
||||
- sensor.se_heatsink_temp
|
||||
below: 32
|
||||
id: se_fan_off
|
||||
conditions: []
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- se_fan_on
|
||||
sequence:
|
||||
- type: turn_on
|
||||
device_id: e3ed6a2244c1e2ddaeff6f94e96f25e1
|
||||
entity_id: 361d8b711623afed18b3e9397bdae647
|
||||
domain: switch
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- se_fan_off
|
||||
sequence:
|
||||
- type: turn_off
|
||||
device_id: e3ed6a2244c1e2ddaeff6f94e96f25e1
|
||||
entity_id: 361d8b711623afed18b3e9397bdae647
|
||||
domain: switch
|
||||
default:
|
||||
- type: turn_off
|
||||
device_id: e3ed6a2244c1e2ddaeff6f94e96f25e1
|
||||
entity_id: 361d8b711623afed18b3e9397bdae647
|
||||
domain: switch
|
||||
mode: single
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
---
|
||||
# ---
|
||||
# IMPORTANT NOTE: all sensors here having templates have been migrated/fixed to template.yaml as per Deprecation of platform: Template
|
||||
#
|
||||
#### Return true if current time is within from and to time
|
||||
- platform: template
|
||||
sensors:
|
||||
dont_disturb_nighttime:
|
||||
# all variables below (excluding hour & minute) hold UTC times converted to timestamps (int)
|
||||
# as internally HA times are in UTC
|
||||
# nothe that you have to have sensor.time_utc configured
|
||||
unique_id: dont_disturb_nighttime
|
||||
value_template: >
|
||||
{% set from = state_attr('input_datetime.dont_disturb_nighttime_from','timestamp') %}
|
||||
{% set to = state_attr('input_datetime.dont_disturb_nighttime_to','timestamp') %}
|
||||
{% set cur = ( now().hour * 3600 + now().minute * 60 ) %}
|
||||
{{ (cur < to or from <= cur) if from > to else from <= cur < to }}
|
||||
# - platform: template
|
||||
# sensors:
|
||||
# dont_disturb_nighttime:
|
||||
# # all variables below (excluding hour & minute) hold UTC times converted to timestamps (int)
|
||||
# # as internally HA times are in UTC
|
||||
# # nothe that you have to have sensor.time_utc configured
|
||||
# unique_id: dont_disturb_nighttime
|
||||
# value_template: >
|
||||
# {% set from = state_attr('input_datetime.dont_disturb_nighttime_from','timestamp') %}
|
||||
# {% set to = state_attr('input_datetime.dont_disturb_nighttime_to','timestamp') %}
|
||||
# {% set cur = ( now().hour * 3600 + now().minute * 60 ) %}
|
||||
# {{ (cur < to or from <= cur) if from > to else from <= cur < to }}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@ triggers:
|
||||
id: p1-confort-light-dim
|
||||
- trigger: sun
|
||||
event: sunset
|
||||
offset: 00:30:00
|
||||
offset: 00:15:00
|
||||
id: p1-confort-light-on
|
||||
- trigger: state
|
||||
entity_id:
|
||||
|
||||
63
blueprints/automation/homeassistant/copy_entity_state.yaml
Normal file
63
blueprints/automation/homeassistant/copy_entity_state.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
blueprint:
|
||||
name: copy-light-entity-state
|
||||
description: Copy state from light entity to light entity
|
||||
domain: automation
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
source_entity:
|
||||
name: Source Entity
|
||||
description: Entity to copy state from
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
destination_entity:
|
||||
name: Destination Entity
|
||||
description: Entity to copy state to
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
|
||||
mode: queued
|
||||
max_exceeded: silent
|
||||
|
||||
variables:
|
||||
src_entity: !input source_entity
|
||||
dest_entity: !input destination_entity
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: !input source_entity
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: turn-light-on
|
||||
- trigger: state
|
||||
entity_id: !input source_entity
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: turn-light-off
|
||||
|
||||
conditions: []
|
||||
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- turn-light-on
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target: !input destination_entity
|
||||
data:
|
||||
brightness_pct: 100
|
||||
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- turn-light-off
|
||||
sequence:
|
||||
- action: light.turn_off
|
||||
target: !input destination_entity
|
||||
data:
|
||||
brightness_pct: 0
|
||||
@@ -102,7 +102,7 @@ variables:
|
||||
# here list of mobile APP to be notified
|
||||
recipient_list_notification:
|
||||
- notify.mobile_app_tiziano_iphone15pro
|
||||
- notify.mobile_app_emanuele_s24
|
||||
# - notify.mobile_app_emanuele_s24
|
||||
|
||||
recipient_list_gmail:
|
||||
title: "EVcharge Process"
|
||||
@@ -149,14 +149,12 @@ actions:
|
||||
data:
|
||||
value: 0.00
|
||||
# check which EVcharge plugs to be activated
|
||||
|
||||
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(use_entity1_var, 'on') }}"
|
||||
then: # EVcharge entity_1 (eg front) charge is requested
|
||||
sequence:
|
||||
|
||||
|
||||
# set stop button to off
|
||||
- action: input_boolean.turn_off
|
||||
target:
|
||||
@@ -181,8 +179,6 @@ actions:
|
||||
- variables:
|
||||
energy1_before: "{{ states(evcharge_entity1_energy_var) | float | round(2) }}"
|
||||
|
||||
|
||||
|
||||
# Start plug1 and wait until power measured is below input_number.evcharge_no_charge_threshold for 10 minutes = 600 seconds
|
||||
- action: switch.turn_on
|
||||
entity_id: !input evcharge_entity1
|
||||
@@ -212,7 +208,7 @@ actions:
|
||||
data:
|
||||
value: "{{ evcharge_entity1_energy_charged }}"
|
||||
|
||||
- delay: 30
|
||||
- delay: 120
|
||||
# - delay: 10 # TEST ONLY
|
||||
|
||||
# take energy counter after charging
|
||||
@@ -245,6 +241,11 @@ actions:
|
||||
message: >-
|
||||
"EVcharge process on {{ evcharge_entity1_var }} has ended: {{ ( energy1_after - energy1_before ) | round(2) }} kW/h charged"
|
||||
|
||||
# reset stop button
|
||||
- action: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.evcharge_pro_stop
|
||||
|
||||
# wait couple of minutes before starting charge on plug2
|
||||
- delay: 120
|
||||
# - delay: 10 # TEST ONLY
|
||||
@@ -302,7 +303,7 @@ actions:
|
||||
data:
|
||||
value: "{{ evcharge_entity2_energy_charged }}"
|
||||
|
||||
- delay: 30
|
||||
- delay: 120
|
||||
# - delay: 10 # TEST ONLY
|
||||
|
||||
# take energy counter after charging
|
||||
@@ -332,6 +333,12 @@ actions:
|
||||
target: "{{ recipient_list_gmail['target'] }}"
|
||||
message: >-
|
||||
"EVcharge process on {{ evcharge_entity2_var }} has ended: {{ ( energy2_after - energy2_before ) | round(2) }} kW/h charged"
|
||||
|
||||
# reset stop button
|
||||
- action: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.evcharge_pro_stop
|
||||
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
|
||||
165
blueprints/automation/homeassistant/motion_light_pro_dual.yaml
Normal file
165
blueprints/automation/homeassistant/motion_light_pro_dual.yaml
Normal file
@@ -0,0 +1,165 @@
|
||||
blueprint:
|
||||
name: Motion-activated-Light PRO (dual motion sensors)
|
||||
description: Turn on a light when motion is detected PRO (dual motion sensor)
|
||||
domain: automation
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity1:
|
||||
name: Motion-sensor1
|
||||
description: First Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
motion_entity2:
|
||||
name: Motion-sensor2
|
||||
description: Second Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
light_target:
|
||||
name: Light
|
||||
description: Entity of the Lamp to be controlled
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
use_sun:
|
||||
name: Sun_driven
|
||||
description: Controlled by sunrise and sunset flag
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
dont_disturb:
|
||||
name: dont_disturb_light_control
|
||||
description: Controls if lamp brightness has to be reduced to not disturb
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 20
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 300
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# Every motion state change is captured and managed by the script therefore we need to restart by queueing triggers
|
||||
# in this automation the poweroff of light is started only if all managed motion sensor are in clear state (= "off")
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity1_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity2
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity2_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity1_off
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity2
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity2_off
|
||||
|
||||
variables:
|
||||
use_sun_flag: !input use_sun
|
||||
dont_disturb_flag: !input dont_disturb
|
||||
light_target_var: !input light_target
|
||||
motion_entity1_var: !input motion_entity1
|
||||
motion_entity2_var: !input motion_entity2
|
||||
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_on
|
||||
- motion_entity2_on
|
||||
then:
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ use_sun_flag }}"
|
||||
then: # Sun and luminescence controlled
|
||||
- if:
|
||||
- or:
|
||||
# external light is LOW (below Helper daylight_luminescence set value)
|
||||
- condition: template
|
||||
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"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
then:
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
else: # Always active
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_off
|
||||
- motion_entity2_off
|
||||
then:
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity1_var,'off') }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity2_var,'off') }}"
|
||||
then:
|
||||
- alias: "Wait for delay set before turn off"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
action: light.turn_off
|
||||
target: !input light_target
|
||||
142
blueprints/automation/homeassistant/motion_light_pro_single.yaml
Normal file
142
blueprints/automation/homeassistant/motion_light_pro_single.yaml
Normal file
@@ -0,0 +1,142 @@
|
||||
blueprint:
|
||||
name: Motion-activated-Light PRO (singlel motion sensors)
|
||||
description: Turn on a light when motion is detected PRO (single motion sensor)
|
||||
domain: automation
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity1:
|
||||
name: Motion-sensor1
|
||||
description: First Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
light_target:
|
||||
name: Light
|
||||
description: Entity of the Lamp to be controlled
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
use_sun:
|
||||
name: Sun_driven
|
||||
description: Controlled by sunrise and sunset flag
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
dont_disturb:
|
||||
name: dont_disturb_light_control
|
||||
description: Controls if lamp brightness has to be reduced to not disturb
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 20
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 300
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# Every motion state change is captured and managed by the script therefore we need to restart by queueing triggers
|
||||
# in this automation the poweroff of light is started only if all managed motion sensor are in clear state (= "off")
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity1_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity1_off
|
||||
|
||||
variables:
|
||||
use_sun_flag: !input use_sun
|
||||
dont_disturb_flag: !input dont_disturb
|
||||
light_target_var: !input light_target
|
||||
motion_entity1_var: !input motion_entity1
|
||||
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_on
|
||||
then:
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ use_sun_flag }}"
|
||||
then: # Sun and luminescence controlled
|
||||
- if:
|
||||
- or:
|
||||
# external light is LOW (below Helper daylight_luminescence set value)
|
||||
- condition: template
|
||||
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"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
then:
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
else: # Always active
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_off
|
||||
then:
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity1_var,'off') }}"
|
||||
then:
|
||||
- alias: "Wait for delay set before turn off"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
action: light.turn_off
|
||||
target: !input light_target
|
||||
188
blueprints/automation/homeassistant/motion_light_pro_triple.yaml
Normal file
188
blueprints/automation/homeassistant/motion_light_pro_triple.yaml
Normal file
@@ -0,0 +1,188 @@
|
||||
blueprint:
|
||||
name: Motion-activated-Light PRO (triple motion sensors)
|
||||
description: Turn on a light when motion is detected PRO (triple motion sensor)
|
||||
domain: automation
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity1:
|
||||
name: Motion-sensor1
|
||||
description: First Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
motion_entity2:
|
||||
name: Motion-sensor2
|
||||
description: Second Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
motion_entity3:
|
||||
name: Motion-sensor3
|
||||
description: Third Sensor motion entity
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
light_target:
|
||||
name: Light
|
||||
description: Entity of the Lamp to be controlled
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
use_sun:
|
||||
name: Sun_driven
|
||||
description: Controlled by sunrise and sunset flag
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
dont_disturb:
|
||||
name: dont_disturb_light_control
|
||||
description: Controls if lamp brightness has to be reduced to not disturb
|
||||
default: on
|
||||
selector:
|
||||
boolean:
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 20
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 300
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# Every motion state change is captured and managed by the script therefore we need to restart by queueing triggers
|
||||
# in this automation the poweroff of light is started only if all managed motion sensor are in clear state (= "off")
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity1_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity2
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity2_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity3
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: motion_entity3_on
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity1
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity1_off
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity2
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity2_off
|
||||
- trigger: state
|
||||
entity_id: !input motion_entity3
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: motion_entity3_off
|
||||
|
||||
variables:
|
||||
use_sun_flag: !input use_sun
|
||||
dont_disturb_flag: !input dont_disturb
|
||||
light_target_var: !input light_target
|
||||
motion_entity1_var: !input motion_entity1
|
||||
motion_entity2_var: !input motion_entity2
|
||||
motion_entity3_var: !input motion_entity3
|
||||
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_on
|
||||
- motion_entity2_on
|
||||
- motion_entity3_on
|
||||
then:
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ use_sun_flag }}"
|
||||
then: # Sun and luminescence controlled
|
||||
- if:
|
||||
- or:
|
||||
# external light is LOW (below Helper daylight_luminescence set value)
|
||||
- condition: template
|
||||
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"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
then:
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
else: # Always active
|
||||
- if:
|
||||
- and:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_flag }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }}"
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion_entity1_off
|
||||
- motion_entity2_off
|
||||
- motion_entity3_off
|
||||
then:
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity1_var,'off') }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity2_var,'off') }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state(motion_entity3_var,'off') }}"
|
||||
then:
|
||||
- alias: "Wait for delay set before turn off"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
action: light.turn_off
|
||||
target: !input light_target
|
||||
@@ -7,7 +7,7 @@ blueprint:
|
||||
variables:
|
||||
recipient_list:
|
||||
- notify.mobile_app_tiziano_iphone15pro
|
||||
- notify.mobile_app_emanuele_s24
|
||||
# - notify.mobile_app_ipad_di_emanuele
|
||||
- notify.mobile_app_enza_iphone13
|
||||
|
||||
triggers:
|
||||
|
||||
@@ -52,13 +52,13 @@ actions:
|
||||
message: >-
|
||||
"TEST -> >>{{ evcharge_entity1_power_var }}<<"
|
||||
title: "EVcharge process from HA"
|
||||
# - action: notify.tiziano_trabattoni_gmail_com
|
||||
# data:
|
||||
# title: "{{ recipient_list_gmail['title'] }}"
|
||||
# target: "{{ recipient_list_gmail['target'] }}"
|
||||
# message: >-
|
||||
# "TEST -> >>{{ evcharge_entity1_power_var }}<<"
|
||||
#
|
||||
- action: notify.tiziano_trabattoni_gmail_com
|
||||
data:
|
||||
title: "{{ recipient_list_gmail['title'] }}"
|
||||
target: "{{ recipient_list_gmail['target'] }}"
|
||||
message: >-
|
||||
"TEST -> >>{{ evcharge_entity1_power_var }}<<"
|
||||
|
||||
# action: notify.example_gmail_com
|
||||
# data:
|
||||
# message: "test"
|
||||
|
||||
8
bubble_card/config.yaml
Normal file
8
bubble_card/config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
migration:
|
||||
done: true
|
||||
sources:
|
||||
entity_count: 4
|
||||
yaml_count: 0
|
||||
written_count: 4
|
||||
migrated_at: '2026-02-04T22:54:45.633Z'
|
||||
version: 1
|
||||
7
bubble_card/modules/default.yaml
Normal file
7
bubble_card/modules/default.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
default:
|
||||
name: Default
|
||||
version: ''
|
||||
creator: ''
|
||||
description: Empty and enabled by default. Add your custom styles and/or JS templates here to apply them to all cards by pressing the <ha-icon icon="mdi:pencil"></ha-icon> button above.
|
||||
code: ''
|
||||
is_global: true
|
||||
33
bubble_card/modules/icon_container_color.yaml
Normal file
33
bubble_card/modules/icon_container_color.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
icon_container_color:
|
||||
name: 'Example: Customize the icon container color'
|
||||
version: v1.2
|
||||
creator: Clooos
|
||||
description: |
|
||||
A list of predefined colors to customize the icon container color.
|
||||
Configure this module via the editor or in YAML, for example:
|
||||
<br><br>
|
||||
<code-block><pre>
|
||||
icon_container_color:
|
||||
color: light-blue
|
||||
</pre></code-block>
|
||||
supported:
|
||||
- calendar
|
||||
- pop-up
|
||||
- cover
|
||||
- button
|
||||
- media-player
|
||||
- climate
|
||||
- select
|
||||
code: |
|
||||
.bubble-icon-container,
|
||||
.bubble-day-chip {
|
||||
opacity: 1 !important;
|
||||
--bubble-icon-background-color: var(--${this.config.icon_container_color?.color}-color) !important;
|
||||
}
|
||||
editor:
|
||||
- name: color
|
||||
label: Color
|
||||
selector:
|
||||
ui_color:
|
||||
include_none: true
|
||||
link: https://github.com/Clooos/Bubble-Card/discussions/1231
|
||||
88
bubble_card/modules/izequbes_custom_colors.yaml
Normal file
88
bubble_card/modules/izequbes_custom_colors.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
izequbes_custom_colors:
|
||||
name: IzeQubes Custom Colors
|
||||
version: v1.0
|
||||
creator: IzeQube
|
||||
description: |
|
||||
Allows the user to change the accent color of the card with the standard Home Assistant predefined colors.
|
||||
This change only effects the card if the entity is "turned on".
|
||||
|
||||
The user can also override the icon color and background background of the icon container.
|
||||
|
||||
Last but not least the user can change the opacity of both the card background color as the icon.
|
||||
unsupported:
|
||||
- horizontal-buttons-stack
|
||||
- separator
|
||||
code: |
|
||||
${(() => {
|
||||
// Icon Color
|
||||
let bubbleIcon = card.querySelector(".bubble-icon");
|
||||
if(bubbleIcon && this.config.izequbes_custom_colors.main_icon) {
|
||||
if(!!this.config.izequbes_custom_colors.main_icon.icon_opacity) {
|
||||
bubbleIcon.style.opacity = this.config.izequbes_custom_colors.main_icon.icon_opacity;
|
||||
}
|
||||
if(!!this.config.izequbes_custom_colors.main_icon.icon_color) {
|
||||
bubbleIcon.style.color = `var(--${this.config.izequbes_custom_colors.main_icon.icon_color}-color)`;
|
||||
}
|
||||
}
|
||||
|
||||
// Icon Background
|
||||
let bubbleIconContainer = card.querySelector(".bubble-icon-container");
|
||||
if(bubbleIconContainer && this.config.izequbes_custom_colors.main_icon) {
|
||||
if(!!this.config.izequbes_custom_colors.main_icon.background_color) {
|
||||
bubbleIconContainer.style.background = `var(--${this.config.izequbes_custom_colors.main_icon.background_color}-color)`;
|
||||
}
|
||||
}
|
||||
|
||||
// Card Color
|
||||
if(this.config.izequbes_custom_colors.card) {
|
||||
if(!!this.config.izequbes_custom_colors.card.background_color) {
|
||||
card.style.setProperty('--bubble-accent-color', `var(--${this.config.izequbes_custom_colors.card.background_color}-color)`);
|
||||
}
|
||||
if(!!this.config.izequbes_custom_colors.card.opacity) {
|
||||
card.querySelector(".bubble-button-background").style.opacity = this.config.izequbes_custom_colors.card.opacity;
|
||||
}
|
||||
}
|
||||
|
||||
})()}
|
||||
editor:
|
||||
- name: main_icon
|
||||
type: expandable
|
||||
title: Main Icon Color Settings
|
||||
icon: mdi:list-box-outline
|
||||
schema:
|
||||
- type: string
|
||||
name: background_color
|
||||
label: Background Color
|
||||
selector:
|
||||
ui_color: {}
|
||||
- name: icon_color
|
||||
label: Icon Color
|
||||
selector:
|
||||
ui_color: {}
|
||||
- name: icon_opacity
|
||||
label: Icon Opacity
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.1
|
||||
mode: slider
|
||||
- name: card
|
||||
type: expandable
|
||||
title: Card Color Settings
|
||||
icon: mdi:list-box-outline
|
||||
schema:
|
||||
- name: background_color
|
||||
label: Background Color
|
||||
selector:
|
||||
ui_color:
|
||||
include_none: true
|
||||
- name: opacity
|
||||
label: Opacity
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.1
|
||||
mode: slider
|
||||
link: https://github.com/Clooos/Bubble-Card/discussions/1246
|
||||
75
bubble_card/modules/progress_bar.yaml
Normal file
75
bubble_card/modules/progress_bar.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
progress_bar:
|
||||
name: Progress Bar
|
||||
version: 1.1.1
|
||||
creator: inukiwi
|
||||
description: Show a progress bar on "State" buttons, much like how sliders appear. Also supports different colors for custom conditions.
|
||||
supported:
|
||||
- button
|
||||
code: |-
|
||||
.bubble-button-background {
|
||||
${card.state = this.config.progress_bar?.custom_entity ? hass.states[this.config.progress_bar?.custom_entity].state : state};
|
||||
${card.percentage = (card.state - this.config.progress_bar?.min_value) / (this.config.progress_bar?.max_value - this.config.progress_bar?.min_value) * 100};
|
||||
${card.color = this.config.progress_bar?.progress_color};
|
||||
${card.color = this.config.progress_bar?.conditional_colors?.condition_1 && checkConditionsMet([].concat(this.config.progress_bar?.conditional_colors?.condition_1), hass) ? this.config.progress_bar?.conditional_colors?.condition_color_1 : card.color };
|
||||
${card.color = this.config.progress_bar?.conditional_colors?.condition_2 && checkConditionsMet([].concat(this.config.progress_bar?.conditional_colors?.condition_2), hass) ? this.config.progress_bar?.conditional_colors?.condition_color_2 : card.color };
|
||||
opacity: 1 !important;
|
||||
background:
|
||||
linear-gradient(
|
||||
to right,
|
||||
var(--${card.color}-color)
|
||||
${card.percentage}%,
|
||||
transparent
|
||||
${card.percentage}%
|
||||
);
|
||||
}
|
||||
editor:
|
||||
- name: min_value
|
||||
label: Minimum value
|
||||
required: true
|
||||
default: 0
|
||||
selector:
|
||||
number:
|
||||
mode: box
|
||||
- name: max_value
|
||||
label: Maximum value
|
||||
required: true
|
||||
default: 100
|
||||
selector:
|
||||
number:
|
||||
mode: box
|
||||
- name: progress_color
|
||||
label: Progress Color
|
||||
required: true
|
||||
default: '#00ff00'
|
||||
selector:
|
||||
ui_color:
|
||||
include_state: true
|
||||
- name: custom_entity
|
||||
label: Custom state entity
|
||||
selector:
|
||||
entity: {}
|
||||
- type: expandable
|
||||
name: conditional_colors
|
||||
title: Conditional colors
|
||||
icon: mdi:tune
|
||||
expanded: false
|
||||
schema:
|
||||
- name: condition_1
|
||||
label: Condition 1 (use color below if met)
|
||||
selector:
|
||||
condition: {}
|
||||
- name: condition_color_1
|
||||
label: Condition 1 color (only used if condition 1 is defined)
|
||||
selector:
|
||||
ui_color:
|
||||
include_state: true
|
||||
- name: condition_2
|
||||
label: Condition 2 (use color below if met)
|
||||
selector:
|
||||
condition: {}
|
||||
- name: condition_color_2
|
||||
label: Condition 2 color (only used if condition 2 is defined)
|
||||
selector:
|
||||
ui_color:
|
||||
include_state: true
|
||||
link: https://github.com/Clooos/Bubble-Card/discussions/1634
|
||||
@@ -3,11 +3,13 @@ default_config:
|
||||
|
||||
# packages directory
|
||||
homeassistant:
|
||||
packages: !include_dir_named packages
|
||||
packages: !include_dir_named packages_dir
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
extra_module_url:
|
||||
- /local/community/kiosk-mode/kiosk-mode.js
|
||||
|
||||
# Inclusions
|
||||
automation: !include automations.yaml
|
||||
@@ -19,6 +21,7 @@ light: !include lights.yaml
|
||||
climate: !include climates.yaml
|
||||
binary_sensor: !include binary_sensors.yaml
|
||||
template: !include templates.yaml
|
||||
mqtt: !include mqtt.yaml
|
||||
|
||||
# DO NOT remove - Sets MariaDB as database
|
||||
recorder:
|
||||
@@ -31,7 +34,7 @@ recorder:
|
||||
logger:
|
||||
default: info
|
||||
logs:
|
||||
custom_components.mikrotik_router: debug
|
||||
custom_components.mikrotik_router: info
|
||||
|
||||
# influxdb: !include influxdb_feed.yaml
|
||||
|
||||
@@ -45,98 +48,16 @@ logbook:
|
||||
- sensor.date_time_iso
|
||||
- sensor.date_time_utc
|
||||
|
||||
# Zigbee Network Map not Working
|
||||
# mqtt:
|
||||
# sensor:
|
||||
# - name: Zigbee2mqtt Networkmap
|
||||
# # if you change base_topic of Zigbee2mqtt, change state_topic accordingly
|
||||
# state_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
# value_template: >-
|
||||
# {{ now().strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
# # again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly
|
||||
# json_attributes_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
# json_attributes_template: "{{ value_json.data.value | tojson }}"
|
||||
mqtt:
|
||||
- sensor:
|
||||
- name: HP_power
|
||||
unit_of_measurement: "W"
|
||||
unique_id: mon_hp_pw
|
||||
state_topic: monitoring/hw/heatpump
|
||||
value_template: >-
|
||||
{{ value_json.power | int }}
|
||||
- name: HP_max_power
|
||||
unit_of_measurement: "W"
|
||||
unique_id: mon_hp_max_pw
|
||||
state_topic: monitoring/hw/heatpump
|
||||
value_template: >-
|
||||
{{ value_json.hp_max_power | int }}
|
||||
- name: ACS_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_acs_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.acs | int }}
|
||||
- name: Heating_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_heating_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.heating | int }}
|
||||
- name: Solar_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_solar_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.solar | int }}
|
||||
- name: SE_AC_voltage
|
||||
unit_of_measurement: "V"
|
||||
unique_id: mon_se_ac_voltage
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.ac_v | int) / 100 }}
|
||||
- name: SE_AC_current
|
||||
unit_of_measurement: "A"
|
||||
unique_id: mon_se_ac_current
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.ac_i | int) / 100 }}
|
||||
- name: SE_DC_voltage
|
||||
unit_of_measurement: "V"
|
||||
unique_id: mon_se_dc_voltage
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.dc_v | int) / 100 }}
|
||||
- name: SE_DC_current
|
||||
unit_of_measurement: "A"
|
||||
unique_id: mon_se_dc_current
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.dc_i | int) / 100 }}
|
||||
- name: SE_Heatsink_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_se_ht_temperature
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.hs_t | int) / 100 }}
|
||||
- name: SE_Total_power
|
||||
unit_of_measurement: "MW"
|
||||
unique_id: mon_se_tot_p
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.w_tot | int) / 1000000 }}
|
||||
- name: Zigbee2mqtt Networkmap
|
||||
unique_id: zigbee2mqtt_bridge_network_map
|
||||
# if you change base_topic of Zigbee2mqtt, change state_topic accordingly
|
||||
state_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
value_template: >-
|
||||
{{ now().strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
# again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly
|
||||
json_attributes_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
json_attributes_template: "{{ value_json.data.value | tojson }}"
|
||||
|
||||
# add additional cards
|
||||
lovelace:
|
||||
mode: yaml
|
||||
resource_mode: yaml
|
||||
# dashboards:
|
||||
# lovelace:
|
||||
# mode: yaml
|
||||
# filename: ui-lovelace.yaml
|
||||
# title: Overview
|
||||
# icon: mdi:view-dashboard
|
||||
# show_in_sidebar: true
|
||||
resources:
|
||||
- url: /local/community/zigbee2mqtt-networkmap/zigbee2mqtt-networkmap.js
|
||||
type: module
|
||||
@@ -150,3 +71,9 @@ lovelace:
|
||||
type: module
|
||||
- url: /hacsfiles/Bubble-Card/bubble-card.js
|
||||
type: module
|
||||
- url: /local/community/kiosk-mode/kiosk-mode.js
|
||||
type: module
|
||||
- url: /local/community/thomasloven/state-switch.js
|
||||
type: module
|
||||
- url: /hacsfiles/lovelace-layout-card/layout-card.js
|
||||
type: module
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
blueprint:
|
||||
name: Dual Sensor Sunset and Luminescence Motion-activated Light
|
||||
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: 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:
|
||||
dont_disturb_condition:
|
||||
name: dont_disturb_light_control
|
||||
description: Controls if lamp brightness has to be reduced to not disturb
|
||||
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:
|
||||
# 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: "{{ ( 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"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
then:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion-detected
|
||||
then:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_condition }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: states('input_number.dont_disturb_light_brightness')
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data:
|
||||
transition: 10
|
||||
target: !input light_target
|
||||
default:
|
||||
# the motion light is always active
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion-detected
|
||||
then:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_condition }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: states('input_number.dont_disturb_light_brightness')
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data:
|
||||
transition: 10
|
||||
target: !input light_target
|
||||
|
||||
mode: single
|
||||
@@ -1,164 +0,0 @@
|
||||
blueprint:
|
||||
name: Tris Sensor Sunset and Luminescence Motion-activated Light
|
||||
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: Tiziano Trabattoni
|
||||
input:
|
||||
motion_entity_uno:
|
||||
name: Motion Sensor (Sensore Uno)
|
||||
description: Sensore Uno
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
motion_entity_due:
|
||||
name: Motion Sensor (Sensore Due)
|
||||
description: Sensore Due
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
device_class: motion
|
||||
domain: binary_sensor
|
||||
motion_entity_tre:
|
||||
name: Motion Sensor (Sensore Tre)
|
||||
description: Sensore tre
|
||||
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:
|
||||
|
||||
dont_disturb_condition:
|
||||
name: dont_disturb_light_control
|
||||
description: Controls if lamp brightness has to be reduced to not disturb
|
||||
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
|
||||
# use_dont_disturb: !input dont_disturb_nighttime
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- !input motion_entity_uno
|
||||
- !input motion_entity_due
|
||||
- !input motion_entity_tre
|
||||
to: "on"
|
||||
id: motion-detected
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- !input motion_entity_uno
|
||||
- !input motion_entity_due
|
||||
- !input motion_entity_tre
|
||||
to: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: !input no_motion_wait
|
||||
id: motion-cleared
|
||||
|
||||
conditions: []
|
||||
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- 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: "{{ ( 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"
|
||||
before: sunrise
|
||||
before_offset: "+01:00:00"
|
||||
then:
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion-detected
|
||||
then:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_condition }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: states('dont_disturb_light_brightness')
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
|
||||
else:
|
||||
- action: light.turn_off
|
||||
target: !input light_target
|
||||
metadata: {}
|
||||
data:
|
||||
transition: 10
|
||||
|
||||
default:
|
||||
# the motion light is always active
|
||||
- if:
|
||||
- condition: trigger
|
||||
id:
|
||||
- motion-detected
|
||||
then:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ dont_disturb_condition }}"
|
||||
then:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: states('dont_disturb_light_brightness')
|
||||
color_temp_kelvin: 2500
|
||||
else:
|
||||
- action: light.turn_on
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 2500
|
||||
|
||||
else:
|
||||
- action: light.turn_off
|
||||
target: !input light_target
|
||||
data:
|
||||
transition: 10
|
||||
|
||||
mode: single
|
||||
240
mqtt.yaml
Normal file
240
mqtt.yaml
Normal file
@@ -0,0 +1,240 @@
|
||||
---
|
||||
- sensor:
|
||||
# DO NOT REMOVE: Essential for ZIGBEE2MQTT
|
||||
- name: Zigbee2mqtt Networkmap
|
||||
unique_id: zigbee2mqtt_bridge_network_map
|
||||
# if you change base_topic of Zigbee2mqtt, change state_topic accordingly
|
||||
state_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
value_template: >-
|
||||
{{ now().strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
# again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly
|
||||
json_attributes_topic: zigbee2mqtt/bridge/response/networkmap
|
||||
json_attributes_template: "{{ value_json.data.value | tojson }}"
|
||||
|
||||
# HP / Solaredge / ACS published values
|
||||
- name: HP_power
|
||||
unit_of_measurement: "W"
|
||||
unique_id: mon_hp_pw
|
||||
state_topic: monitoring/hw/heatpump
|
||||
value_template: >-
|
||||
{{ value_json.power | int }}
|
||||
- name: HP_max_power
|
||||
unit_of_measurement: "W"
|
||||
unique_id: mon_hp_max_pw
|
||||
state_topic: monitoring/hw/heatpump
|
||||
value_template: >-
|
||||
{{ value_json.hp_max_power | int }}
|
||||
- name: ACS_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_acs_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.acs | int }}
|
||||
- name: Heating_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_heating_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.heating | int }}
|
||||
- name: Solar_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_solar_temp
|
||||
state_topic: monitoring/hw/temperatures
|
||||
value_template: >-
|
||||
{{ value_json.solar | int }}
|
||||
- name: SE_AC_voltage
|
||||
unit_of_measurement: "V"
|
||||
unique_id: mon_se_ac_voltage
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.ac_v | int) / 100 }}
|
||||
- name: SE_AC_current
|
||||
unit_of_measurement: "A"
|
||||
unique_id: mon_se_ac_current
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.ac_i | int) / 100 }}
|
||||
- name: SE_DC_voltage
|
||||
unit_of_measurement: "V"
|
||||
unique_id: mon_se_dc_voltage
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.dc_v | int) / 100 }}
|
||||
- name: SE_DC_current
|
||||
unit_of_measurement: "A"
|
||||
unique_id: mon_se_dc_current
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.dc_i | int) / 100 }}
|
||||
- name: SE_Heatsink_temp
|
||||
unit_of_measurement: "'C"
|
||||
unique_id: mon_se_ht_temperature
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.hs_t | int) / 100 }}
|
||||
- name: SE_Total_power
|
||||
unit_of_measurement: "MW"
|
||||
unique_id: mon_se_tot_p
|
||||
state_topic: monitoring/se/values
|
||||
value_template: >-
|
||||
{{ (value_json.w_tot | int) / 1000000 }}
|
||||
- name: fix_hp_level_read
|
||||
unique_id: fix_hp_level_read
|
||||
state_topic: etcontroller/sw/answers
|
||||
value_template: >-
|
||||
{{ value_json['values'].level }}
|
||||
|
||||
# UPS vmonitoring entiities from upsmon running on
|
||||
# popeye for UPS TERRA
|
||||
# seneca for UPS TITAN
|
||||
# tazmania for UPS TAZMANIA
|
||||
# UPS Battery Volts
|
||||
- name: ups_terra_status
|
||||
unique_id: sensor.ups_terra_status
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TERRA' %}
|
||||
{{ value_json[0].status }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_terra_status') }}
|
||||
{% endif %}
|
||||
- name: ups_tazmania_status
|
||||
unique_id: sensor.ups_tazmania_status
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TAZMANIA' %}
|
||||
{{ value_json[0].status }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_tazmania_status') }}
|
||||
{% endif %}
|
||||
- name: ups_titan_status
|
||||
unique_id: sensor.ups_titan_status
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TITAN' %}
|
||||
{{ value_json[0].status }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_titan_status') }}
|
||||
{% endif %}
|
||||
|
||||
# UPS Battery Charge
|
||||
- name: ups_terra_charge
|
||||
unique_id: sensor.ups_terra_charge
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TERRA' %}
|
||||
{{ value_json[0].bcharge | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_terra_charge') | int }}
|
||||
{% endif %}
|
||||
- name: ups_tazmania_charge
|
||||
unique_id: sensor.ups_tazmania_charge
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TAZMANIA' %}
|
||||
{{ value_json[0].bcharge | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_tazmania_charge') | int }}
|
||||
{% endif %}
|
||||
- name: ups_titan_charge
|
||||
unique_id: sensor.ups_titan_charge
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TITAN' %}
|
||||
{{ value_json[0].bcharge | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_titan_charge') | int }}
|
||||
{% endif %}
|
||||
|
||||
# UPS Time left before Exhaustion
|
||||
- name: ups_terra_timeleft
|
||||
unique_id: sensor.ups_terra_timeleft
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "Min."
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TERRA' %}
|
||||
{{ (value_json[0].timeleft | int) }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_terra_timeleft') }}
|
||||
{% endif %}
|
||||
- name: ups_tazmania_timeleft
|
||||
unique_id: sensor.ups_tazmania_timeleft
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "Min."
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TAZMANIA' %}
|
||||
{{ value_json[0].timeleft | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_tazmania_timeleft') }}
|
||||
{% endif %}
|
||||
- name: ups_titan_timeleft
|
||||
unique_id: sensor.ups_titan_timeleft
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "Min."
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TITAN' %}
|
||||
{{ value_json[0].timeleft | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_titan_timeleft') }}
|
||||
{% endif %}
|
||||
|
||||
# UPS Battery Volts
|
||||
- name: ups_terra_battv
|
||||
unique_id: sensor.ups_terra_battv
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "V"
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TERRA' %}
|
||||
{{ value_json[0].battv | float }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_terra_battv') }}
|
||||
{% endif %}
|
||||
- name: ups_tazmania_battv
|
||||
unique_id: sensor.ups_tazmania_battv
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "V"
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TAZMANIA' %}
|
||||
{{ value_json[0].battv | float }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_tazmania_battv') }}
|
||||
{% endif %}
|
||||
- name: ups_titan_battv
|
||||
unique_id: sensor.ups_titan_battv
|
||||
state_topic: monitoring/ups/status
|
||||
unit_of_measurement: "V"
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TITAN' %}
|
||||
{{ value_json[0].battv | float }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_titan_battv') }}
|
||||
{% endif %}
|
||||
|
||||
# UPS load percentage
|
||||
- name: ups_terra_loadpct
|
||||
unique_id: sensor.ups_terra_loadpct
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TERRA' %}
|
||||
{{ value_json[0].loadpct | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_terra_loadpct') }}
|
||||
{% endif %}
|
||||
- name: ups_tazmania_loadpct
|
||||
unique_id: sensor.ups_tazmania_loadpct
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TAZMANIA' %}
|
||||
{{ value_json[0].loadpct | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_tazmania_loadpct') }}
|
||||
{% endif %}
|
||||
- name: ups_titan_loadpct
|
||||
unique_id: sensor.ups_titan_loadpct
|
||||
state_topic: monitoring/ups/status
|
||||
value_template: >-
|
||||
{% if value_json[1].upsname == 'TITAN' %}
|
||||
{{ value_json[0].loadpct | int }}
|
||||
{% else %}
|
||||
{{ states('sensor.ups_titan_loadpct') }}
|
||||
{% endif %}
|
||||
32
scenes.yaml
32
scenes.yaml
@@ -0,0 +1,32 @@
|
||||
- id: '1765640519696'
|
||||
name: Luminarie
|
||||
entities:
|
||||
light.presa_smart_1:
|
||||
supported_color_modes:
|
||||
- onoff
|
||||
color_mode: onoff
|
||||
friendly_name: Presa-Smart-1
|
||||
supported_features: 0
|
||||
state: 'on'
|
||||
light.presa_smart_2:
|
||||
supported_color_modes:
|
||||
- onoff
|
||||
color_mode: onoff
|
||||
friendly_name: Presa-Smart-2
|
||||
supported_features: 0
|
||||
state: 'on'
|
||||
light.presa_smart_11:
|
||||
supported_color_modes:
|
||||
- onoff
|
||||
color_mode: onoff
|
||||
friendly_name: Presa-Smart-11
|
||||
supported_features: 0
|
||||
state: 'on'
|
||||
icon: mdi:ceiling-fan-light
|
||||
metadata:
|
||||
light.presa_smart_1:
|
||||
entity_only: true
|
||||
light.presa_smart_2:
|
||||
entity_only: true
|
||||
light.presa_smart_11:
|
||||
entity_only: true
|
||||
|
||||
94
sensors.yaml
94
sensors.yaml
@@ -1,52 +1,46 @@
|
||||
---
|
||||
#### Scala-Taverna motion custom Sensor
|
||||
- platform: template
|
||||
sensors:
|
||||
scala_taverna_motion:
|
||||
unique_id: scala_taverna_motion
|
||||
friendly_name: Scala Taverna Motion Sensor
|
||||
value_template: >-
|
||||
{% if states('binary_sensor.presenza_bassa_scala_taverna_occupancy') == 'on' or states('binary_sensor.presenza_alta_scala_taverna_occupancy') == 'on' %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
icon_template: mdi:motion-sensor
|
||||
# ---
|
||||
# IMPORTANT NOTE: all sensors here having templates have been migrated/fixed to template.yaml as per Deprecation of platform: Template
|
||||
|
||||
evcharge_total_power:
|
||||
unique_id: evcharge_total_power
|
||||
friendly_name: EVcharge total power
|
||||
unit_of_measurement: "kW"
|
||||
value_template: >-
|
||||
{{ ( ( (states('sensor.evcharge_front_power') | float) + (states('sensor.evcharge_back_power') | float) ) / 1000 ) }}
|
||||
# - platform: template
|
||||
# sensors:
|
||||
# evcharge_total_power:
|
||||
# unique_id: evcharge_total_power
|
||||
# friendly_name: EVcharge total power
|
||||
# unit_of_measurement: "kW"
|
||||
# value_template: >-
|
||||
# {{ ( ( (states('sensor.evcharge_front_power') | float) + (states('sensor.evcharge_back_power') | float) ) / 1000 ) }}
|
||||
# hp_power_kw:
|
||||
# unique_id: hp_power_kw
|
||||
# friendly_name: Heating Pump power
|
||||
# unit_of_measurement: "kW"
|
||||
# value_template: >-
|
||||
# {{ ( (states('sensor.hp_power') | float ) / 1000 ) }}
|
||||
# home_only_power:
|
||||
# unique_id: home_only_power
|
||||
# unit_of_measurement: "kW"
|
||||
# friendly_name: Home Power without HP Pump and EVcharge
|
||||
# value_template: >-
|
||||
# {{ (states('sensor.pw_load_power') | float) - (states('sensor.evcharge_total_power') | float) - ((states('sensor.hp_power') | float ) / 1000) }}
|
||||
# ev_heat_power:
|
||||
# unique_id: ev_heat_power
|
||||
# unit_of_measurement: "kW"
|
||||
# friendly_name: HP Pump and EVcharge Power
|
||||
# value_template: >-
|
||||
# {{ (states('sensor.evcharge_total_power') | float) + ((states('sensor.hp_power') | float ) / 1000) }}
|
||||
# entities_count:
|
||||
# friendly_name: "Number of Entities"
|
||||
# value_template: >-
|
||||
# {{ states | rejectattr('state', 'eq', 'unavailable') | list | count}}
|
||||
# na_entities_count:
|
||||
# friendly_name: "Number of NA Entities"
|
||||
# value_template: >-
|
||||
# {{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count }}
|
||||
# holiday:
|
||||
# friendly_name: "Holiday"
|
||||
# value_template: >-
|
||||
# {% if states.calendar.holidays_in_italy.state == 'on' %}
|
||||
# {{ states.calendar.holidays_in_italy.attributes.message }}
|
||||
# {% else %}
|
||||
# none
|
||||
# {% endif %}
|
||||
|
||||
hp_power_kw:
|
||||
unique_id: hp_power_kw
|
||||
friendly_name: Heating Pump power
|
||||
unit_of_measurement: "kW"
|
||||
value_template: >-
|
||||
{{ ( (states('sensor.hp_power') | float ) / 1000 ) }}
|
||||
|
||||
home_only_power:
|
||||
unique_id: home_only_power
|
||||
unit_of_measurement: "kW"
|
||||
friendly_name: Home Power without HP Pump and EVcharge
|
||||
value_template: >-
|
||||
{{ (states('sensor.pw_load_power') | float) - (states('sensor.evcharge_total_power') | float) - ((states('sensor.hp_power') | float ) / 1000) }}
|
||||
|
||||
entities_count:
|
||||
friendly_name: "Number of Entities"
|
||||
value_template: >-
|
||||
{{ states | rejectattr('state', 'eq', 'unavailable') | list | count}}
|
||||
na_entities_count:
|
||||
friendly_name: "Number of NA Entities"
|
||||
value_template: >-
|
||||
{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count }}
|
||||
holiday:
|
||||
friendly_name: "Holiday"
|
||||
value_template: >-
|
||||
{% if states.calendar.holidays_in_italy.state == 'on' %}
|
||||
{{ states.calendar.holidays_in_italy.attributes.message }}
|
||||
{% else %}
|
||||
none
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Storage for Bubble Card Modules
|
||||
---
|
||||
|
||||
|
||||
# IMPORTANT NOTE: all sensors here having templates have been migrated/fixed to HERE from other as per Deprecation of platform: Template
|
||||
|
||||
# Storage for Bubble Card Modules
|
||||
- trigger:
|
||||
- trigger: event
|
||||
event_type: bubble_card_update_modules
|
||||
@@ -10,3 +14,58 @@
|
||||
attributes:
|
||||
modules: "{{ trigger.event.data.modules }}"
|
||||
last_updated: "{{ trigger.event.data.last_updated }}"
|
||||
|
||||
#### Return true if current time is within from and to time
|
||||
- binary_sensor:
|
||||
- unique_id: dont_disturb_nighttime
|
||||
default_entity_id: binary_sensor.dont_disturb_nighttime
|
||||
state:
|
||||
"{% set from = state_attr('input_datetime.dont_disturb_nighttime_from','timestamp')
|
||||
%} {% set to = state_attr('input_datetime.dont_disturb_nighttime_to','timestamp')
|
||||
%} {% set cur = ( now().hour * 3600 + now().minute * 60 ) %} {{ (cur < to or
|
||||
from <= cur) if from > to else from <= cur < to }}"
|
||||
name: dont_disturb_nighttime
|
||||
|
||||
###### power sensors (Essential for all dashboards)
|
||||
- sensor:
|
||||
- unique_id: evcharge_total_power
|
||||
unit_of_measurement: kW
|
||||
default_entity_id: sensor.evcharge_total_power
|
||||
name: EVcharge total power
|
||||
state: "{{ ( ( (states('sensor.evcharge_front_power') | float) + (states('sensor.evcharge_back_power') | float) ) / 1000 ) }}"
|
||||
|
||||
- sensor:
|
||||
- unique_id: hp_power_kw
|
||||
unit_of_measurement: kW
|
||||
default_entity_id: sensor.hp_power_kw
|
||||
name: Heating Pump power
|
||||
state: "{{ ( (states('sensor.hp_power') | float ) / 1000 ) }}"
|
||||
|
||||
- sensor:
|
||||
- unique_id: home_only_power
|
||||
unit_of_measurement: kW
|
||||
default_entity_id: sensor.home_only_power
|
||||
name: Home Power without HP Pump and EVcharge
|
||||
state: "{{ (states('sensor.pw_load_power') | float) - (states('sensor.evcharge_total_power') | float) - ((states('sensor.hp_power') | float ) / 1000) }}"
|
||||
|
||||
- sensor:
|
||||
- unique_id: ev_heat_power
|
||||
unit_of_measurement: kW
|
||||
default_entity_id: sensor.ev_heat_power
|
||||
name: HP Pump and EVcharge Power
|
||||
state: "{{ (states('sensor.evcharge_total_power') | float) + ((states('sensor.hp_power') | float ) / 1000) }}"
|
||||
|
||||
- sensor:
|
||||
- default_entity_id: sensor.entities_count
|
||||
name: Number of Entities
|
||||
state: "{{ states | rejectattr('state', 'eq', 'unavailable') | list | count}}"
|
||||
|
||||
- sensor:
|
||||
- default_entity_id: sensor.na_entities_count
|
||||
name: Number of NA Entities
|
||||
state: "{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count }}"
|
||||
|
||||
- sensor:
|
||||
- default_entity_id: sensor.holiday
|
||||
name: Holiday
|
||||
state: "{% if states.calendar.holidays_in_italy.state == 'on' %} {{ states.calendar.holidays_in_italy.attributes.message }} {% else %} none {% endif %}"
|
||||
|
||||
Reference in New Issue
Block a user