---
title: Running the selected channel of the LED RGBW module with the last value
description: Starting the lighting to the last selected value.
---

[Skip to content](https://knowledgebase.grenton.com/en/running-the-selected-channel-of-the-led-rgbw-module-with-the-last-value#main-content)

English

Show submenu for translations

[New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://knowledgebase.grenton.com/wsparcie?hsLang=en)

![Logo\_Grenton\_Main\_2020\_RGB\_v1.0-1.png\]](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_Main_2020_RGB_v1.0-1.png?width=200&height=94&name=Logo_Grenton_Main_2020_RGB_v1.0-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new)
- [Customer portal](https://knowledgebase.grenton.com/wsparcie)
- [Trainings](https://www.grenton.com/cooperation/trainings.html)

[Trainings](https://www.grenton.com/cooperation/trainings.html)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledgebase.grenton.com/en?hsLang=en)
2. [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en)
3. [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)

# Running the selected channel of the LED RGBW module with the last value

**Note:** The tutorial presents a way to control a selected channel of the RGBW LED module - the control of the Dimmer module can be realized in an analogous way.

If you want to start e.g. the selected channel of the RGBW LED module on the last set value (greater than 0) you should:

\* create a *LED\_R\_last\_value* user feature:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157044632originalSG-dz2t0-BMpNVVu--bferWt5hc0ADIkfQ.png)

Note: Enter *0* as the initial value. After a power failure or configuration upload, the *LED\_R\_last\_value *feature will take the value 0.

\* create a script, e.g. *LED\_R\_last*, that assigns the channel value to the user feature:

```
if(CLU->LED_strip->RedValue>0) then CLU->LED_R_last_value=CLU->LED_strip->RedValue end
```

\* assign the* LED\_R\_last *script to the *OnValueChange *event in the LED RGBW module:  
![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156679694original3MJx15Z0ggVxLKZmzLk-od4gTzMzlIF19g.png)

\* create a script, (*LED\_R\_switch*) that sets the appropriate values for the selected channel:

```
if(CLU->LED_R_last_value==0) then CLU->LED_strip->SetRedValue(255) else if(CLU->LED_R_last_value>0) then if(CLU->LED_strip->RedValue==CLU->LED_R_last_value) then CLU->LED_strip->SetRedValue(0) else CLU->LED_strip->SetRedValue(CLU->LED_R_last_value) end end end
```

\* assign a* LED\_R\_switch* script to* OnClick* event of the selected button:  
![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156680026original55YM9jR8gRf0zj2hUYTz0chQ-0TSl2UgEQ.png)

Additionally, you can configure the brightening/dimming of the selected channel using the *OnHold* event and the *HoldRedValue* command. The configuration created in this way should be sent to the CLU.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/support.grenton.plensupportsolutionsarticles35000192675-running-the-selected-channel-of-the-led-rgbw-module-with-the-last-valuehit.gif)

- [Installation guidelines](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#main-content)

    - [How to Prepare Electrical Installation](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#how-to-prepare-electrical-installation)
- [Reference devices](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#main-content)

    - [Integrated Device](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#integrated-device)
- [Most Common Mistakes](https://knowledgebase.grenton.com/en/most-common-mistakes?hsLang=en)
- [Electrical Installation](https://knowledgebase.grenton.com/en/electrical-installation?hsLang=en)
- [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en#main-content)

    - [Gate Modbus](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-modbus)
    - [Training](https://knowledgebase.grenton.com/en/manuals?hsLang=en#training)
    - [SW Applications](https://knowledgebase.grenton.com/en/manuals?hsLang=en#sw-applications)
    - [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)
    - [Smart Panel](https://knowledgebase.grenton.com/en/manuals?hsLang=en#smart-panel)
    - [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)
    - [myGrenton interfaces](https://knowledgebase.grenton.com/en/manuals?hsLang=en#mygrenton-interfaces)
    - [Virtual Objects](https://knowledgebase.grenton.com/en/manuals?hsLang=en#virtual-objects)
    - [Gate Alarm](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-alarm)
- [Intercom](https://knowledgebase.grenton.com/en/intercom?hsLang=en)
- [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#main-content)

    - [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#faq)
    - [About Grenton](https://knowledgebase.grenton.com/en/faq?hsLang=en#about-grenton)
- [Price list and documents](https://knowledgebase.grenton.com/en/price-list-and-documents?hsLang=en)

[![Grenton logo](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png?width=400&height=100&name=Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png "Grenton logo")](http://grenton.com)

<https://www.facebook.com/grenton.smart.home> <https://www.instagram.com/grenton_smart_home/> <https://www.youtube.com/channel/UCFNNI-dgO1cm81kCrSr1bzg> <https://www.linkedin.com/company/grenton>

Copyright © 2026, Grenton Sp.z o.o.