With this blueprint you can use a trigger to start an on_timed native frames to myhome scs bus. This is possible primary thanks to the myhome.send_message service exposed by Anotherjulien/Myhome integration
And to the
GianlucaCh/myhome-timer integration.
You need to have both installed.
This BP allow you a better user interface setting to use the native Timer of the myhome system.
blueprint:
name: "MyHome - Accendi luce con timer SCS nativo"
description: >
Automazione che accende una luce MyHome con timer nativo del bus SCS
(BTicino/Legrand) usando il frame OpenWebNet WHO=1.
Funzionamento:
- Scegli un trigger (es. input boolean, arrivo a casa, orario…)
- Scegli la luce myhome target
- Scegli la durata del timer tra le opzioni standard OWN oppure usa
la modalità "custom" per ore/min/sec arbitrari
Questo blueprint usa il servizio myhome_timer.turn_on_timed
(custom component myhome_timer) che compila e invia automaticamente
il frame corretto (es. *1*16*<APL>## per 15 min, oppure
*#1*<APL>*#2*0*15*0## per 15 min in modalità custom).
domain: automation
input:
trigger_entity:
name: "Entità trigger (es. input_boolean, binary_sensor)"
description: >
Entità il cui cambio di stato a 'on' scatena l'automazione.
Puoi sostituire il trigger nella sezione automation con qualsiasi
trigger HA standard dopo l'importazione.
selector:
entity: {}
target_light:
name: "Luce MyHome da accendere con timer"
description: >
Seleziona l'entità light myhome. Il componente preleverà
automaticamente i valori A e PL dai suoi attributi.
selector:
entity:
domain: light
integration: myhome
timer_mode:
name: "Durata timer"
description: >
Scegli tra i timer nativi OWN (§3.1 WHO=1) o 'custom' per
durata arbitraria. Se scegli 'custom', compila anche
ore/minuti/secondi qui sotto.
default: "15min"
selector:
select:
options:
- value: "0.5sec"
label: "0.5 secondi"
- value: "30sec"
label: "30 secondi"
- value: "1min"
label: "1 minuto"
- value: "2min"
label: "2 minuti"
- value: "3min"
label: "3 minuti"
- value: "4min"
label: "4 minuti"
- value: "5min"
label: "5 minuti"
- value: "15min"
label: "15 minuti"
- value: "custom"
label: "Personalizzata (usa i campi sotto)"
custom_hours:
name: "Ore (solo se timer = Personalizzata)"
default: 0
selector:
number:
min: 0
max: 255
mode: box
custom_minutes:
name: "Minuti (solo se timer = Personalizzata)"
default: 15
selector:
number:
min: 0
max: 59
mode: box
custom_seconds:
name: "Secondi (solo se timer = Personalizzata)"
default: 0
selector:
number:
min: 0
max: 59
mode: box
trigger:
- platform: state
entity_id: !input trigger_entity
to: "on"
action:
- service: myhome_timer.turn_on_timed
data:
entity_id: !input target_light
timer_mode: !input timer_mode
hours: !input custom_hours
minutes: !input custom_minutes
seconds: !input custom_seconds
mode: single
