This widget can do Switch, Dimming and Color picking all in the one space saving design.
Click on the tiny knob and the modal control appears allowing a change to be made.
Click on the colored dot and the colour picker opens up in a modal allowing a change to be made.
Click anywhere else and the item turns on or off.
Since the controls that you don’t want can be hidden, you can use this to still control Fans, power outlets or anything else you wish.
TIP: You can change the shadow to any colour you like so this feature could be used to have all lights as 1 colour and all power outlets coloured with a different shadow. The shaddow format config is used for this and a post below explains its use.
The rgba is what you want to play with, those four numbers are the red,green,blue values with the last number being the transparency amount. 0.8 is 80% solid and 20% see through.
You can use online color pickers to help you choose.
I went this way so you can change the shadow colour or any aspect of the shadow on groups of controls. You may want fans to be one colour and lights to be another.
Many Other ways you can play with the shadow are here:
New changes to the widget and the css files just uploaded and did some work to make the widget display better between large screens, tablets and mobile devices. Not perfect yet due to reusing of the basic widgets don’t allow % based resizing and also some don’t allow any resizing via css. Will look at it some more after moving to openhab 3.
finally i’ve tried everything and it’s almost perfect! just 3 questions:
is it possible to make your widget to look like the one on the left?
i mean move the item name (and make it in bold) a little bit high and aligned to left and also add the status of the item below the item name. also if is possible to increase the icon dimensions on the top left.
anyway, you did a fantastic job! next step is to make the widget for thermostats
You can easily do all those thing if you learn CSS, it would take you a few hours at the most. Have a look at the switch-glowing lines in the css files I provided and the absolute positions are what your after. The only things that would need a change to the widget are the icon size and the status, the rest are all possible with css tweaks. You can try the two css files to see how easy it is to create a new look. You can create a third.
@rubenfuser
Widget code is updated so now you can get it 100% how u want it to be with just CSS code.
yes i have almost finished to adapt your widget just one question, ihow can i remove transaprency from active/inactive buttons? i want solid white or solid black when button are ON or OFF…
i have spent almost an hour but i didnt find a way to change font size via css.I am interested to change font size only on your widget leaving everything else as it is.Thank you.