Hello, thank you very much for the help.
That I could solve.
Now I have another problem. I’m still not testing it with the lamp since I do not know how to control it.
But visually it does not work.
When I choose a color it performs several updates and ends up changing the color as it adds one or the end of rgb.
I can not find a way to correct it.
If anyone has an idea please help.
Thank you
L1 is a name of lamp
gRGB is a group
Updating L1 state from 0,0,0 to 26,100,100 (color orange)
Updating gRGB state from 0 to 100
Updating L1 state from 26,100,100 to OFF
Updating L1 state from OFF to 26,100,0 (other color)
Updating gRGB state from 100 to 0
<div class="section" ng-init="hueColors = [ { hsb: '0,0,0', hex: '#fff' }, { hsb: '254,204,47', hex: '#fecc2f' }, { hsb: '46,46,100', hex: '#f9a228' }, { hsb: '26,100,100', hex: '#f6621f' }, { hsb: '0,100,100', hex: '#db3838' }, { hsb: '273,100,100', hex: '#a363d9' }, { hsb: '201,100,100', hex: '#40a4d8' }, { hsb: '177,100,100', hex: '#33beb8' }, { hsb: '140,100,100', hex: '#b2c225' } ]">
<div class="sectionIconContainer"><div class="sectionIcon"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#light_bulb"></use></svg></div></div>
<div class="title"><div class="name">Lights</div><div class="summary">ON: {{ ( filtered | filter: { state: 'ON' } ).length }} of {{filtered.length}}</div></div>
<div class="controls">
<div ng-repeat="item in itemsInGroup('gRGB') | filter:query as filtered">
<div class="widget" ng-if="item.type=='Color' && (itemValue(item.name)=='OFF' || itemValue(item.name)=='0') && itemValue(item.name + '_color')!='N/A'" ng-click="showHueSelect = !showHueSelect">
<div class="icon off"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#off"></use></svg></div>
<div class="name">
<div class="hue" ng-style="{'background': 'rgb(' + itemValue(item.name) + ')'}"></div>
<div class="hueSelect" ng-init="showHueSelect = false" ng-show="showHueSelect">
<div class="hueSelectItem"></div>
<div class="hueSelectOptions">
<a href="" ng-click="sendCmd(item.name, color.hsb)" ng-repeat="color in hueColors" ng-style="{ 'background': color.hex }"></a>
<div ng-init="slider = { value: 0, options: { floor: 0, ceil: 100, step: 1, showSelectionBar: true } };"></div>
<rzslider rz-slider-model="slider.value" rz-slider-options="slider.options" ng-click="sendCmd(item.nam, slider.value)"></rzslider>
</div>
</div>
{{item.label}} {{itemValue(item.name)}}
</div>
</div>
<div class="widget" ng-if="item.type=='Color' && (itemValue(item.name)==' ON ' || itemValue(item.name)>'0') && itemValue(item.name + '_color')=='N/A'" ng-click="showHueSelect = !showHueSelect">
<div class="icon on"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#on"></use></svg></div>
<div class="name">
<div class="hue" ng-style="{'background': 'rgb(' + itemValue(item.name) + ')'}"></div>
<div class="hueSelect" ng-init="showHueSelect = false" ng-show="showHueSelect">
<div class="hueSelectItem"></div>
<div class="hueSelectOptions">
<a href="" ng-click="sendCmd(item.name, 'OFF')">
<svg viewBox="0 0 48 48" style="stroke: white; stroke-width: 3px;"><use xlink:href="/static/matrix-theme/matrixicons.svg#cross-line"></use></svg>
</a>
<a href="" ng-click="sendCmd(item.name, color.hsb)" ng-repeat="color in hueColors" ng-style="{ 'background': color.hex }"></a>
<div ng-init="slider = { value: item.name, options: { floor: 0, ceil: 100, step: 1, showSelectionBar: true } };"></div>
<rzslider rz-slider-model="slider.value" rz-slider-options="slider.options" ng-click="sendCmd(item.nam, slider.value)"></rzslider>
</div>
</div>
{{item.label}} ; {{itemValue(item.name)}}
</div>
</div>
<div class="widget" ng-if="item.type=='Switch' && itemValue(item.name)=='OFF'" ng-click="sendCmd(item.name, 'ON')">
<div class="icon off" ><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#off"></use></svg></div>
<div class="name">{{item.label}}</div>
</div>
<div class="widget" ng-if="item.type=='Switch' && itemValue(item.name)=='ON'" ng-click="sendCmd(item.name, 'OFF')">
<div class="icon on" ><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#on"></use></svg></div>
<div class="name">{{item.label}}</div>
</div>
<div class="widget" ng-if="item.type=='Switch' && itemValue(item.name)=='NULL'" ng-click="sendCmd(item.name, 'ON')">
<div class="icon off" ><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/matrixicons.svg#none"></use></svg></div>
<div class="name">{{item.label}}</div>
</div>
</div>
</div>
</div>