Bonjour,
Je désire effectuer un allumage progressif de lumières. J’ai pour cela écrit un script pour faire mes tests.
Actuellement, j’ai des automations qui fonctionnent pour les allumages et extinctions.
Renseigner votre problème
Il semblerait que la transition paramétrée pour faire la progressivité ne soit pas prise en compte.
La lampe pilotée pour ce test est une Livarno RGB en Zigbee. A terme, j’ai créé un groupe pour en piloter plusieurs.
Mon script généré par l’éditeur
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lampe_liv05
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: light.turn_on
metadata: {}
data:
color_temp_kelvin: 2996
transition: 20
brightness_step_pct: 50
target:
entity_id: light.lampe_liv05
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.lampe_liv05
data: {}
alias: Sphères allumage progressif
description: ""
Ma configuration
[center]## System Information
version
core-2026.2.3
installation_type
Home Assistant OS
dev
false
hassio
true
docker
true
container_arch
amd64
user
root
virtualenv
false
python_version
3.13.11
os_name
Linux
os_version
6.12.67-haos
arch
x86_64
timezone
Europe/Paris
config_dir
/config
Home Assistant Community Store
GitHub API
ok
GitHub Content
ok
GitHub Web
ok
HACS Data
ok
GitHub API Calls Remaining
5000
Installed Version
2.0.5
Stage
running
Available Repositories
2759
Downloaded Repositories
9
Home Assistant Cloud
logged_in
false
can_reach_cert_server
ok
can_reach_cloud_auth
ok
can_reach_cloud
ok
Home Assistant Supervisor
host_os
Home Assistant OS 17.1
update_channel
stable
supervisor_version
supervisor-2026.02.2
agent_version
1.8.1
docker_version
29.1.3
disk_total
109.3 GB
disk_used
6.6 GB
nameservers
192.168.20.254
healthy
true
supported
true
host_connectivity
true
supervisor_connectivity
true
ntp_synchronized
true
virtualization
board
generic-x86-64
supervisor_api
ok
version_api
ok
installed_addons
File editor (5.8.0), Terminal & SSH (10.0.1), Mosquitto broker (6.5.2), MQTT Explorer (browser-1.0.1), Zigbee2MQTT (2.8.0-1)
Dashboards
dashboards
9
resources
3
views
5
mode
storage
Network Configuration
adapters
lo (disabled), enp2s0 (enabled, default, auto), wlp1s0 (disabled), hassio (disabled), docker0 (disabled), veth828c8b8 (disabled), vethe277269 (disabled), veth91251fc (disabled), veth1d43c3a (disabled), vethba3a29b (disabled), veth8b2c3a6 (disabled), vethb31c516 (disabled), vethb79bb1b (disabled), veth127d0ec (disabled), vethb39b7f0 (disabled), vethbc0338c (disabled)
ipv4_addresses
lo (127.0.0.1/8), enp2s0 (192.168.20.239/24), wlp1s0 (192.168.20.241/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), veth828c8b8 (), vethe277269 (), veth91251fc (), veth1d43c3a (), vethba3a29b (), veth8b2c3a6 (), vethb31c516 (), vethb79bb1b (), veth127d0ec (), vethb39b7f0 (), vethbc0338c ()
ipv6_addresses
lo (::1/128), enp2s0 (fe80::f978:b6e2:f3a3:e1ba/64), wlp1s0 (fe80::3d07:7d82:dd93:8dda/64), hassio (fd0c:ac1e:2100::1/48, fe80::b8a4:b5ff:fef6:d60/64), docker0 (fe80::b8bb:24ff:fe67:dd94/64), veth828c8b8 (fe80::fc6c:9fff:fead:b7c9/64), vethe277269 (fe80::402b:6bff:fed2:8e7f/64), veth91251fc (fe80::dc38:ffff:feda:a7f3/64), veth1d43c3a (fe80::3090:3dff:feb6:284f/64), vethba3a29b (fe80::4c5:eaff:febc:999f/64), veth8b2c3a6 (fe80::6c46:d3ff:fec1:a653/64), vethb31c516 (fe80::ecc0:fcff:febd:4b7f/64), vethb79bb1b (fe80::7050:a1ff:fe45:1dd9/64), veth127d0ec (fe80::7086:18ff:fee1:3040/64), vethb39b7f0 (fe80::b42a:6bff:fea9:15a7/64), vethbc0338c (fe80::bc67:e2ff:fe4f:a515/64)
announce_addresses
192.168.20.239, fe80::f978:b6e2:f3a3:e1ba
Recorder
oldest_recorder_run
7 février 2026 à 12:55
current_recorder_run
21 février 2026 à 09:27
estimated_db_size
216.94 MiB
database_engine
sqlite
database_version
3.49.2
Sonoff
version
3.9.3 (7c75c46)
cloud_online
4 / 7
local_online
3 / 3
Xiaomi Miot
component_version
1.1.2
can_reach_server
ok
can_reach_spec
ok
logged_accounts
1
total_devices
1
[/center]
Bonsoir, je trouve étrange qu’il y ait deux fois une commande light off pour quelque chose qui doit s’allumer progressivement.
Quand on lit le yaml, cela commence par une extinction, puis un délai de 2 secondes et un allumage progressif et une extinction à nouveau.
Je pense qu’il faut épurer
alias: Sphères allumage progressif
description: ""
triggers: []
conditions: []
actions:
- action: light.turn_on
metadata: {}
target:
entity_id: light.lampe_liv05
data:
transition: 20
color_temp_kelvin: 2996
brightness_pct: 50
mode: single
Bonjour,
J’ai fait cela afin de bien discerner cette gestion ponctuelle car j’ai une automation qui allume les lampes elle aussi.
Avec cette extinction de départ et celle de la fin, cela me permet de mesurer les durées.
Entre temps, j’ai trouvé ça…
ouvert 08:19AM - 05 Feb 25 UTC
fermé 05:09PM - 29 Jul 25 UTC
integration: light
stale
### The problem
Core 2025.1.4
Supervisor 2024.12.3
Operating System 14.2
Fronte… nd 20250109.2
Transistion time is fully ignonred. for light.turn_on and light.turn_off
Same result in Actions under dev tools, Scripts, Automations.
Same on Wifi lights via WLED and Zigbee2MQTT Hue lights.
This have worked without issues earlier. but im i little unsure exactly when it broke but it worked around Christmas
### What version of Home Assistant Core has the issue?
2025.1.4
### What was the last working version of Home Assistant Core?
2024.x.x
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
_No response_
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
```
### Additional information
_No response_
J’ai donc ouvert un nouveau ticket
ouvert 07:17PM - 22 Feb 26 UTC
integration: light
### The problem
When I define a transition time to turn on a light, it do not w… ork and there is no transition.
### What version of Home Assistant Core has the issue?
core-2026.2.3
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Light
### Link to integration documentation on our website
https://rc.home-assistant.io/integrations/light/
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lampe_liv05
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: light.turn_on
metadata: {}
data:
color_temp_kelvin: 2996
transition: 20
brightness_step_pct: 50
target:
entity_id: light.lampe_liv05
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.lampe_liv05
data: {}
alias: Sphères allumage progressif
description: ""
```
### Anything in the logs that might be useful for us?
```txt
No logs
```
### Additional information
_No response_
Bonjour,
J’utilise la transition, et aucun souci avec :
action: light.turn_on
metadata: {}
data:
brightness_pct: 90
color_temp_kelvin: 3984
transition: 10
target:
entity_id:
- light.0x54ef4410011ec302
Avec des ampoules aqara ZNLDP12LM, T2_E27_CCT. Toutefois les ampoules LiDL, ça n’a pas l’air de fonctionner ( testé sur Livarno Home E14 candle RGB+CCT, pas testé avec les Livarno Lux E27 bulb CCT et Livarno Home E27 bulb RGB+CCT).
ouvert 10:54PM - 02 Dec 20 UTC
fermé 12:06PM - 04 Dec 20 UTC
problem
## What happened
The new Lidl / LivarnoLux lights (see [support request](http… s://github.com/Koenkk/zigbee2mqtt/issues/5164#issue-755297003)) work in principle with m2z 1.16.2 - BUT - it would be really nice if the transition time that is provided with the command to change the color/brightness would also be used. Currently there is a short transition of 1-2s to fade from the current brightness/color to the now newly set brightness/color.
No matter what effect is used from the list as shown in Home Assistant Lovelace UI, the lights just blinks. All effects do the same.
## What did you expect to happen
If the command to change brightness/color contains a transition time, then the fade should take as long as specified. Can this be done or do these lights not support that? (as a comparison you may look at the Osram/LedVance Smart+ Spot GU10 lights, they do use the fade transition time)
I would expect that each effect does something different. Otherwise there should be just 1 effect discovered in Home Assistant.
## How to reproduce it (minimal and precise)
## Debug info
Zigbee2MQTT version: 1.16.2
Adapter hardware: CC26X2R1
Adapter firmware version: zStack3x0
Ah ok ok…
Mauvaise nouvelle alors.
J’ai troqué mes Ikea Tradfri pour ces Livano (Ikea a stoppé sa gamme Zigbee), et je me retrouve avec des impasses.
Va falloir faire du script « pourri » avec des incréments pour tenter de faire une variation lumineuse donc ?
pas trop le choix, sinon de changer de marque d’ampoule (Philips, INNR, Aqara )
J’ai même essayé par Z2M, dans les paramètres spécifiques, ça change rien
Faut pas s’étonner, c’est du Tuya.
Bonjour,
Je désire créer une automation qui allume progressivement des lapes en utilisant un script avec des variables passées en argument.
J’ai des ampoule Livarno qui ne gèrent pas la fonctionnalité de transition de « Light »
Mon automation de test et OK.
Mon script de test est OK avec des valeurs en dur, mais dès que je passe les informations en variables, plus rien ne fonctionne
Voici mon automation :
alias: Test allumage progressif
description: ""
triggers:
- trigger: time_pattern
minutes: /1
actions:
- data_template:
entity_id: light.lampe_liv05
start_brightness: 5
end_brightness: 255
duration: 20
color_temp_kelvin: 3500
action: script.lumieres_allumage_progressif
mode: single
.
Et voici mon script
alias: Lumières allumage progressif
sequence:
- action: light.turn_off
metadata: {}
target:
entity_id: "{{entity_id}}"
data: {}
- variables:
start_brightness: "{{ start_brightness }}"
brightness: "{{ start_brightness }}"
end_brightness: "{{ end_brightness }}"
duration: "{{ duration }}"
entity_loc: "{{ entity_id }}"
color_temp_kelvin: "{{ color_temp_kelvin }}"
brightness_increment: "{{ ((start_brightness - end_brightness) / (duration))|abs }}"
repeat_delay: "{{ (duration / brightness_increment) }}"
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: light.turn_on
target:
entity_id: "{{entity_id}}"
data:
brightness: "{{ start_brightness }}"
color_temp_kelvin: "{{ color_temp_kelvin }}"
- action: persistent_notification.create
metadata: {}
data:
title: Allumage progressif
message: Variable ."{{ brightness_increment }}"
- repeat:
while:
- condition: template
value_template: >-
{{ (state_attr('light.lampe_liv05', '"{{ brightness}}"')|int <=
"{{ end_brightness }}") }}
sequence:
- data:
brightness: >-
{{ (state_attr('light.lampe_liv05', '"{{ brightness}}"') | int + "{{ brightness_increment }}")|int }}
color_temp_kelvin: "{{ color_temp_kelvin }}"
action: light.turn_on
target:
entity_id: "{{entity_id}}"
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
mode: restart
icon: mdi:lightbulb
description: >-
Arguments obligatoires : start_brightness: 1..255 / end_brightness:1..255 /
duration: seconds / color_temp_kelvin:
Le massage est juste là pour debugguer.
Mon problème se trouve dans l’interprétation de ces 2 lignes :
- condition: template
value_template: >-
{{ (state_attr('light.lampe_liv05', '"{{ brightness}}"')|int <=
"{{ end_brightness }}") }}
et
- condition: template
value_template: >-
{{ (state_attr('light.lampe_liv05', '"{{ brightness}}"')|int <=
"{{ end_brightness }}") }}
Je tourne en rond depuis de nombreuses heures sur la syntaxe pour que les variables « brightness » et apparentées soient prise en compte.
A terme, il me faudra aussi remplacer « light.lampe_liv05 » par la viable "entity_id’
Merci de votre aide
Ma configuration
[center]## System Information
version
core-2026.2.3
installation_type
Home Assistant OS
dev
false
hassio
true
docker
true
container_arch
amd64
user
root
virtualenv
false
python_version
3.13.11
os_name
Linux
os_version
6.12.67-haos
arch
x86_64
timezone
Europe/Paris
config_dir
/config
Home Assistant Community Store
GitHub API
ok
GitHub Content
ok
GitHub Web
ok
HACS Data
ok
GitHub API Calls Remaining
5000
Installed Version
2.0.5
Stage
running
Available Repositories
2767
Downloaded Repositories
9
Home Assistant Cloud
logged_in
false
can_reach_cert_server
ok
can_reach_cloud_auth
ok
can_reach_cloud
ok
Home Assistant Supervisor
host_os
Home Assistant OS 17.1
update_channel
stable
supervisor_version
supervisor-2026.02.2
agent_version
1.8.1
docker_version
29.1.3
disk_total
109.3 GB
disk_used
6.6 GB
nameservers
192.168.20.254
healthy
true
supported
true
host_connectivity
true
supervisor_connectivity
true
ntp_synchronized
true
virtualization
board
generic-x86-64
supervisor_api
ok
version_api
ok
installed_addons
File editor (5.8.0), Terminal & SSH (10.0.1), Mosquitto broker (6.5.2), MQTT Explorer (browser-1.0.1), Zigbee2MQTT (2.8.0-1)
Dashboards
dashboards
9
resources
3
views
5
mode
storage
Network Configuration
adapters
lo (disabled), enp2s0 (enabled, default, auto), wlp1s0 (disabled), hassio (disabled), docker0 (disabled), veth828c8b8 (disabled), vethe277269 (disabled), veth91251fc (disabled), veth1d43c3a (disabled), vethba3a29b (disabled), veth8b2c3a6 (disabled), vethb31c516 (disabled), vethb79bb1b (disabled), veth127d0ec (disabled), vethb39b7f0 (disabled), vethbc0338c (disabled)
ipv4_addresses
lo (127.0.0.1/8), enp2s0 (192.168.20.239/24), wlp1s0 (192.168.20.241/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), veth828c8b8 (), vethe277269 (), veth91251fc (), veth1d43c3a (), vethba3a29b (), veth8b2c3a6 (), vethb31c516 (), vethb79bb1b (), veth127d0ec (), vethb39b7f0 (), vethbc0338c ()
ipv6_addresses
lo (::1/128), enp2s0 (fe80::f978:b6e2:f3a3:e1ba/64), wlp1s0 (fe80::3d07:7d82:dd93:8dda/64), hassio (fd0c:ac1e:2100::1/48, fe80::b8a4:b5ff:fef6:d60/64), docker0 (fe80::b8bb:24ff:fe67:dd94/64), veth828c8b8 (fe80::fc6c:9fff:fead:b7c9/64), vethe277269 (fe80::402b:6bff:fed2:8e7f/64), veth91251fc (fe80::dc38:ffff:feda:a7f3/64), veth1d43c3a (fe80::3090:3dff:feb6:284f/64), vethba3a29b (fe80::4c5:eaff:febc:999f/64), veth8b2c3a6 (fe80::6c46:d3ff:fec1:a653/64), vethb31c516 (fe80::ecc0:fcff:febd:4b7f/64), vethb79bb1b (fe80::7050:a1ff:fe45:1dd9/64), veth127d0ec (fe80::7086:18ff:fee1:3040/64), vethb39b7f0 (fe80::b42a:6bff:fea9:15a7/64), vethbc0338c (fe80::bc67:e2ff:fe4f:a515/64)
announce_addresses
192.168.20.239, fe80::f978:b6e2:f3a3:e1ba
Recorder
oldest_recorder_run
13 février 2026 à 07:03
current_recorder_run
23 février 2026 à 21:45
estimated_db_size
217.75 MiB
database_engine
sqlite
database_version
3.49.2
Sonoff
version
3.9.3 (7c75c46)
cloud_online
4 / 7
local_online
3 / 3
Xiaomi Miot
component_version
1.1.2
can_reach_server
ok
can_reach_spec
ok
logged_accounts
1
total_devices
1
[/center]
___
Tochy
Février 24, 2026, 7:54
8
Salut
Tu es sur que tes variables de l’automatisation sont passées au script ?
Oui…
Le message est là pour vérifier…
C’est juste les 2 parties du script qui posent souci
Un souci de quote ?
- condition: template
value_template: >-
{{ (state_attr('light.lampe_liv05', '{{ brightness }}')|int <=
'{{ end_brightness }}') }}
ou
- condition: template
value_template: >-
{{ (state_attr("light.lampe_liv05", "{{ brightness }}")|int <=
"{{ end_brightness }}") }}
Avec les quotes
2026-02-24 09:38:55.364 WARNING (MainThread) [homeassistant.components.script.lumieres_allumage_progressif] Lumières allumage progressif: Error in 'while[0]' evaluation: In 'template' condition: ValueError: Template error: int got invalid input 'None' when rendering template '{{ (state_attr('light.lampe_liv05', '{{ brightness}}')|int <= '{{ end_brightness }}') }}' but no default was specified
Avec les guillemets
2026-02-24 09:41:41.004 WARNING (MainThread) [homeassistant.components.script.lumieres_allumage_progressif] Lumières allumage progressif: Error in 'while[0]' evaluation: In 'template' condition: ValueError: Template error: int got invalid input 'None' when rendering template '{{ (state_attr('light.lampe_liv05', "{{ brightness}}")|int <= "{{ end_brightness }}") }}' but no default was specified
comme ça , avec |int(0)?
- condition: template
value_template: >-
{{ (state_attr("light.lampe_liv05", "{{ brightness }}")|int(0) <=
"{{ end_brightness }}") }}
On progresse…
2026-02-24 10:06:07.087 WARNING (MainThread) [homeassistant.components.script.lumieres_allumage_progressif] Lumières allumage progressif: Error in 'while[0]' evaluation: In 'template' condition: TypeError: '<=' not supported between instances of 'int' and 'str'
Tochy
Février 24, 2026, 9:19
14
Ajoute un |int à end_brightness ajoute en d’ailleurs partout dans tes caculs si c’est pas dejà je cas
1 « J'aime »
Bon après avoir longtemps cherché, aidé par tes conseils, et lu d’autres articles, voici ce qui fonctionne.
Il fallait créer les variables à modifier dans la boucle, et ne pas chercher à lire l’état de la lampe pour le mettre à jour ensuite.
Ainsi, je peux créer des automatisations qui « demandent » au script de faire l’allumage progressif.
Ce script permet de passer outre les limitations de certaines ampoules qui ne gèrent pas ou peu la progressivité d’allumage.
Il reste à gérer les dépassements de valeur de luminosité, mais le squelette est fonctionnel.
Automatisation (de test)
alias: Test allumage progressif
description: ""
triggers:
- trigger: time_pattern
minutes: /1
actions:
- data_template:
entity_id: light.lampe_liv05
start_brightness: 10
end_brightness: 180
duration: 60
color_temp_kelvin: 3500
action: script.lumieres_allumage_progressif
mode: single
Script
alias: Lumières allumage progressif
sequence:
- variables:
start_brightness: "{{ start_brightness }}"
brightness: "{{ start_brightness }}"
end_brightness: "{{ end_brightness }}"
duration: "{{ duration }}"
entity_loc: "{{ entity_id }}"
color_temp_kelvin: "{{ color_temp_kelvin }}"
brightness_increment: "{{ ((start_brightness - end_brightness) / (duration/2))|abs }}"
repeat_delay: "{{ (duration / brightness_increment) }}"
- repeat:
while:
- condition: template
value_template: "{{ brightness <= end_brightness }}"
sequence:
- variables:
brightness: "{{ (brightness + brightness_increment)|round(1) }}"
- data:
brightness: "{{ brightness }}"
color_temp_kelvin: "{{ color_temp_kelvin }}"
action: light.turn_on
target:
entity_id: "{{entity_id}}"
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
mode: restart
icon: mdi:lightbulb
description: >-
Arguments obligatoires : start_brightness: 1..255 / end_brightness:1..255 /
duration: seconds / color_temp_kelvin:
1 « J'aime »
Salut, j’avais utilisé un blueprint en automation.
Wake-up light alarm with sunrise effect.