I’m looking for help with a Home Assistant automation. I’d like to know how to save the current settings for the LED notification effect and color when changing them temporarily. When the event is over, I want to restore them to what they were previously.
You probably need to create trigger-based template sensors into which to store the state of the LED bar and individual LEDs whenever they change. You would store the previous values that you want to return to using the old_state.state of the events when the LEDs change. Then you would refer to these template sensors to restore the state when you’re done with your temporary LED status.
I have my Inovelli Blues integrated via MQTT, so I don’t know what it might look like in Z-Wave, Matter, or ZHA.
The overall LED bar is in this sensor:
![]()
If the state is empty, it’s at default values.
The individual LEDs if you change them individually are in this sensor:
![]()
I generally update all of the individual LEDs in order, so mine almost always shows the value of LED 7.
The events for the individual LEDs look like this (all 7 events shown):
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 1, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.561168+00:00"
last_reported: "2026-07-25T16:14:19.561168+00:00"
last_updated: "2026-07-25T16:14:19.561168+00:00"
context:
id: 01KYD0WPD93P8H58VH1RZ1JA67
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 2, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.576762+00:00"
last_reported: "2026-07-25T16:14:19.576762+00:00"
last_updated: "2026-07-25T16:14:19.576762+00:00"
context:
id: 01KYD0WPDRA2263V69BYCKFQMY
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.576762+00:00"
context:
id: 01KYD0WPDRA2263V69BYCKFQMY
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 2, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.576762+00:00"
last_reported: "2026-07-25T16:14:19.576762+00:00"
last_updated: "2026-07-25T16:14:19.576762+00:00"
context:
id: 01KYD0WPDRA2263V69BYCKFQMY
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 3, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.595339+00:00"
last_reported: "2026-07-25T16:14:19.595339+00:00"
last_updated: "2026-07-25T16:14:19.595339+00:00"
context:
id: 01KYD0WPEBRC8VG9YHVHXQR28R
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.595339+00:00"
context:
id: 01KYD0WPEBRC8VG9YHVHXQR28R
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 3, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.595339+00:00"
last_reported: "2026-07-25T16:14:19.595339+00:00"
last_updated: "2026-07-25T16:14:19.595339+00:00"
context:
id: 01KYD0WPEBRC8VG9YHVHXQR28R
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 4, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.608314+00:00"
last_reported: "2026-07-25T16:14:19.608314+00:00"
last_updated: "2026-07-25T16:14:19.608314+00:00"
context:
id: 01KYD0WPERRPG2WWRWN1E3MTM1
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.608314+00:00"
context:
id: 01KYD0WPERRPG2WWRWN1E3MTM1
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 4, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.608314+00:00"
last_reported: "2026-07-25T16:14:19.608314+00:00"
last_updated: "2026-07-25T16:14:19.608314+00:00"
context:
id: 01KYD0WPERRPG2WWRWN1E3MTM1
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 5, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.622343+00:00"
last_reported: "2026-07-25T16:14:19.622343+00:00"
last_updated: "2026-07-25T16:14:19.622343+00:00"
context:
id: 01KYD0WPF6GN6BQ6QPHEAQRSXZ
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.622343+00:00"
context:
id: 01KYD0WPF6GN6BQ6QPHEAQRSXZ
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 5, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.622343+00:00"
last_reported: "2026-07-25T16:14:19.622343+00:00"
last_updated: "2026-07-25T16:14:19.622343+00:00"
context:
id: 01KYD0WPF6GN6BQ6QPHEAQRSXZ
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 6, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.639148+00:00"
last_reported: "2026-07-25T16:14:19.639148+00:00"
last_updated: "2026-07-25T16:14:19.639148+00:00"
context:
id: 01KYD0WPFQ4760JXEHHGDF46V6
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.639148+00:00"
context:
id: 01KYD0WPFQ4760JXEHHGDF46V6
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 6, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.639148+00:00"
last_reported: "2026-07-25T16:14:19.639148+00:00"
last_updated: "2026-07-25T16:14:19.639148+00:00"
context:
id: 01KYD0WPFQ4760JXEHHGDF46V6
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 7, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.671417+00:00"
last_reported: "2026-07-25T16:14:19.671417+00:00"
last_updated: "2026-07-25T16:14:19.671417+00:00"
context:
id: 01KYD0WPGQMJC4VMWGPDZE0NME
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.671417+00:00"
context:
id: 01KYD0WPGQMJC4VMWGPDZE0NME
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
old_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: "{'color': 135, 'duration': 255, 'effect': 'solid', 'led': 7, 'level': 30}"
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:13:44.804064+00:00"
last_reported: "2026-07-25T16:13:44.804064+00:00"
last_updated: "2026-07-25T16:13:44.804064+00:00"
context:
id: 01KYD0VMF48V4DWFHYG2RH08SR
parent_id: null
user_id: null
new_state:
entity_id: sensor.living_room_fan_light_dimmer_individual_led_effect
state: >-
{'color': 0, 'duration': 255, 'effect': 'clear_effect', 'led': 1, 'level':
0}
attributes:
friendly_name: Living Room Fan Light Dimmer Individual led effect
last_changed: "2026-07-25T16:14:19.561168+00:00"
last_reported: "2026-07-25T16:14:19.561168+00:00"
last_updated: "2026-07-25T16:14:19.561168+00:00"
context:
id: 01KYD0WPD93P8H58VH1RZ1JA67
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2026-07-25T16:14:19.561168+00:00"
context:
id: 01KYD0WPD93P8H58VH1RZ1JA67
parent_id: null
user_id: null
Thinking about this a little more…
Since you’re probably setting the LED bars in automations based upon the status of other entities in Home Assistant, the simplest solution would be to have an automation that listens for changes to any of the entities you’re basing your notifications on. Based upon the states of those combined entities you set your LEDs accordingly. No need to return to the prior state because you’d always be setting the LED bars according to conditions as they are now.
What I suggested above might be overly complex. Probably necessary if you have something other than Home Assistant changing the LED bars.
Thanks for the replies. All of my dimmers and switches are White series. Let me provide a typical use case.
I have several switches in smart bulb mode that I use to power and control smart fans. They show the fan is on with the falling LED effect. When there is lightning in the area, I have an automation that cuts power to the fans and lights the LEDs solid red. When the storm passes, the automation turns off the LEDs and resets the color and effect to default values. These LED changes are done as a group. When power is applied back to fans, they resume their precious state, but the LEDs are now off for the fans that are running.
To complicate things even further, one of these switches also displays a notification to let me know when a pool feature is on. The order of importance is lightening disable, pool feature, and fan running.
It sounds like you already have automation(s) to do most of this, you just need something to tie all the logic together. I’ll give you a sample automation that I would use in theory to handle this. It will be non-working pseudocode that you should be able to adapt to your particular entities to make it work.
I would create one automation that triggers on any of:
- lightning
- pool feature
- fan
Then I would have actions to set the LED bar according to the priority of each entity’s state.
Keep in mind, I do not know what script or blueprint you may be using to set your LED bar. What I’m showing in my pseudocode below is guaranteed not to work since I don’t have any such script as script.set_led_notification. You’ll need to modify it to work with whatever script or blueprint you are using. I’m basically just giving you the suggested format for the automation logic.
alias: LED Notification - Lightning, Pool, Fan
description: >-
Update Notification LEDs to indicate, in order of priority, Lightning, Pool, Fan.
triggers:
- trigger: state
entitiy_id: binary_sensor.lightning
- trigger: state
entity_id: switch.pool_feature
- trigger: state
entity_id: fan.my_fan
actions:
- if:
- condition: state
entity_id: binary_sensor.lightning
state: "on"
then:
- action: script.set_led_notification
entitiy_id: switch.my_switch
effect: solid
color: red
duration: 255
elif:
- condition: state
entity_id: switch.pool_feature
state: "on"
then:
- action: script.set_led_notification
entitiy_id: switch.my_switch
effect: solid
color: blue
duration: 255
elif:
- condition: state
entity_id: fan.my_fan
state: "on"
then:
- action: script.set_led_notification
entitiy_id: switch.my_switch
effect: falling
color: white
duration: 255
else:
- action: script.set_led_notification
entitiy_id: switch.my_switch
effect: "off"
color: white
duration: 255
# "Turning off notification because there are no active conditions."
mode: restart