Voici ma config:
light:
- platform: template
lights:
light_buanderie:
unique_id: light_buanderie
friendly_name: "Lumière buanderie"
level_template: "{{ state_attr('light.lumiere_buanderie', 'brightness')|int(0) }}"
value_template: "{{ is_state('light.lumiere_buanderie_on_off', 'on') }}"
temperature_template: "{{ state_attr('light.lumiere_buanderie', 'color_temp')|int(153)}}"
#color_template: "{{ state_attr('light.lumiere_buanderie', 'hs_color')|float }}"
effect_list_template: "{{ state_attr('light.lumiere_buanderie', 'effect_list') }}"
effect_template: "{{ state_attr('light.lumiere_buanderie', 'effect') }}"
turn_on:
- service: light.turn_on
entity_id:
- light.lumiere_buanderie_on_off
- service: light.turn_on
entity_id:
- light.lumiere_buanderie
turn_off:
- service: light.turn_off
entity_id:
- light.lumiere_buanderie
- service: light.turn_off
entity_id:
- light.lumiere_buanderie_on_off
set_level:
- service: light.turn_on
entity_id:
- light.lumiere_buanderie_on_off
- service: light.turn_on
data_template:
entity_id:
- light.lumiere_buanderie
brightness: "{{ brightness | int(0) }}"
set_temperature:
- service: light.turn_on
entity_id:
- light.lumiere_buanderie_on_off
- service: light.turn_on
data_template:
entity_id:
- light.lumiere_buanderie
color_temp: "{{ color_temp }}"
set_effect:
- service: light.turn_on
entity_id:
- light.lumiere_buanderie_on_off
- service: light.turn_on
data_template:
entity_id:
- light.lumiere_buanderie
effect: "{{ effect }}"
supports_transition_template: "{{ true }}"
Mon ampoule, c’est l’entité « light.lumiere_buanderie ».
Le micro-module ç’est l’entité « light.lumiere_buanderie_on_off ».
PS: Mes ampoules ne font pas les couleurs.