46 lines
1015 B
YAML
46 lines
1015 B
YAML
blueprint:
|
|
name: Example blueprint
|
|
domain: automation
|
|
input:
|
|
brightness:
|
|
selector:
|
|
number:
|
|
min: 1
|
|
max: 100
|
|
name: Luminosità
|
|
required: true
|
|
mode:
|
|
selector:
|
|
select:
|
|
options:
|
|
- always
|
|
- if_lower
|
|
- if_higher
|
|
name: Condizione
|
|
default: always
|
|
current_brightness:
|
|
selector:
|
|
number:
|
|
min: 0
|
|
max: 100
|
|
name: Intesità corrente
|
|
ip_address:
|
|
selector:
|
|
text: {}
|
|
name: Indirizzo IP
|
|
required: true
|
|
sequence:
|
|
- if:
|
|
- condition: template
|
|
value_template: >-
|
|
{{mode == 'always' or (mode == 'if_lower' and current_brighness <
|
|
brightness) or (mode == 'if_higher' and current_brighness >
|
|
brightness)}}
|
|
then:
|
|
- action: rest_command.shelly_rgbw_brightness
|
|
metadata: {}
|
|
data:
|
|
ip_address: "{{ ip_address }}"
|
|
brightness: "{{ brightness }}"
|
|
|