Here is mine for Color lights, the aproach should work for dimmers as well. I think you can use nf-if.type=“Dimmer” to identify the type of light if you can’t find a generic control for both.
<div class="section" ng-init="hueColors = [ { hsb: '0,0,100', hex: '#fff' }, { hsb: '74,78,100', hex: '#fecc2f' }, { hsb: '46,100,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('gLightColor') | filter:query as filtered ">
<div class="widget" ng-if="item.type=='Color' && itemValue(item.name).split(',')[2]== 0" 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 + '_rgb') + ')'}"></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, itemValue('SceneOffColor'))"><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><a href="" ng-click="sendCmd(item.name, itemValue('SceneColor'))"><svg viewBox="0 0 48 48" style="stroke: white; stroke-width: 3px;"><use xlink:href="/static/matrix-theme/matrixicons.svg#on"></use></svg></a>
<div ng-init="slider = { value: itemValue(item.name).split(',')[2], 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.name, slider.value)"></rzslider>
<div ng-init='cpicker = {
"name": item.name,
"item": itemValue(item.name + '_rgb'),
"style": "aCKolor"
};slider = {
"name": "",
"item": itemValue(item.name),
"value": itemValue(item.name).split(',')[2],
"floor": 0,
"ceil": 100,
"step": 1,
"unit": "",
"vertical": false
};switch = {
"name": "",
"item": itemValue(item.name),
"hidelabel": true,
"hideicon": false,
"hideonoff": true
}'>
<style>
.cl-switch .switch {
position: absolute;
top: 0;
width: 100%;
}
</style>
<widget-colorpicker ng-model="cpicker"></widget-colorpicker>
<widget-slider ng-model="cslider" ng-click="sendCmd(item.name, cslider.value)"></widget-slider>
</div>
</div>
</div>{{item.label}} </div>
</div>
<div class="widget" ng-if="item.type=='Color' && itemValue(item.name).split(',')[2]!=0" 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 + '_rgb') + ')'}"></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, itemValue('SceneOffColor'))"><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><a href="" ng-click="sendCmd(item.name, itemValue('SceneColor'))"><svg viewBox="0 0 48 48" style="stroke: white; stroke-width: 3px;"><use xlink:href="/static/matrix-theme/matrixicons.svg#on"></use></svg></a>
<div ng-init="slider = { value: itemValue(item.name).split(',')[2], 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.name, slider.value)"></rzslider>
<div ng-init='cpicker = {
"name": item.name,
"item": itemValue(item.name + '_rgb'),
"style": "aCKolor"
};slider = {
"name": "item.name",
"item": itemValue(item.name),
"value": itemValue(item.name).split(',')[2],
"floor": 0,
"ceil": 100,
"step": 1,
"unit": "",
"vertical": false
};switch = {
"name": "item.name",
"item": itemValue(item.name),
"hidelabel": true,
"hideicon": false,
"hideonoff": true
}'>
<style>
.cl-switch .switch {
position: absolute;
top: 0;
width: 100%;
}
</style>
<widget-colorpicker ng-model="cpicker"></widget-colorpicker>
<widget-slider ng-model="cslider.value" ng-click="sendCmd(item.name, cslider.value)"></widget-slider>
</div>
</div>
</div> {{item.label }}</div>
</div>
</div>
</div>
</div>