## DIMMER SWITCH PHILIPS PER LAMPADINA HUE ##
- id: dimmer_hue_brightness_up
alias: Dimmer Hue Luminosità on
trigger:
platform: state
entity_id: sensor.0x0017880104ec3ec1_action
to: up-press
condition:
- condition: state
entity_id: light.0x0017880102fe3dfb_light
state: 'on'
action:
- service: light.turn_on
data_template:
brightness: "{% if state_attr('light.0x0017880102fe3dfb_light' , 'brightness')\
\ | int < 205 %}\n {{state_attr('light.0x0017880102fe3dfb_light' , 'brightness')\
\ + 51}}\n {% else %}\n 255\n{% endif %}\n"
entity_id:
- light.0x0017880102fe3dfb_light
# - delay: 0:01
# - service: notify.telegram_notification
# data_template:
# message: Luminosità up {{state_attr('light.0x0017880102fe3dfb_light' , 'brightness')}}
# title: Dimmer Philips
- id: dimmer_hue_brightness_down
alias: Dimmer Hue Luminosità down
trigger:
- entity_id: sensor.0x0017880104ec3ec1_action
platform: state
to: down-press
condition:
- condition: state
entity_id: light.0x0017880102fe3dfb_light
state: 'on'
action:
- data_template:
brightness: "{% if state_attr('light.0x0017880102fe3dfb_light' , 'brightness')\
\ | int > 62 %}\n {{state_attr('light.0x0017880102fe3dfb_light' , 'brightness')\
\ - 51}}\n {% else %}\n 10\n{% endif %}\n"
entity_id:
- light.0x0017880102fe3dfb_light
service: light.turn_on
# - delay: 0:01
# - data_template:
# message: Luminosità down {{state_attr('light.0x0017880102fe3dfb_light' , 'brightness')}}
# title: Dimmer Philips
# service: notify.telegram_notification
- id: dimmer_hue_on
alias: Dimmer Hue ON
trigger:
platform: state
entity_id: sensor.0x0017880104ec3ec1_action
to: on-press
action:
- service: light.turn_on
entity_id:
- light.0x0017880102fe3dfb_light
- id: dimmer_hue_off
alias: Dimmer Hue OFF
trigger:
platform: state
entity_id: sensor.0x0017880104ec3ec1_action
to: off-press
action:
- service: light.turn_off
entity_id:
- light.0x0017880102fe3dfb_light
##-- FINE DIMMER SWITCH PHILIPS PER LAMPADINA HUE --##
Comments