Selector switch format Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
fvdp80
Posts: 70
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Selector switch format

Post by fvdp80 »

I have all my selector switches shown as buttons instead of a drop down list through config['selector_instead_of_buttons'] = 0.
But there's still one selector switch showing as drop down. What am I doing wrong?

Config

Code: Select all


var config = {}
	config['language'] = 'nl_NL';
	config['domoticz_ip'] = 'http://xxx:8080';
	config['app_title'] = 'Dashticz V3';
	config['domoticz_refresh'] = '5';
	config['dashticz_refresh'] = '60';
	config['use_favorites'] = 0;  //Request all Domoticz Devices, not only favorites
	config['auto_positioning'] = 0;  // Use 0 this if you have defined your own columns
	config['timeformat'] = 'DD-MM-YY HH:mm'
	config['calendarlanguage'] = 'nl_NL';
	config['selector_instead_of_buttons'] = 0;
	config['evohome_status'] = 'auto';
	config['evohome_boost_zone'] = 60;
	config['auto_swipe_back_after'] = 0;

//Vuilnis
	config['garbage_company'] = 'mijnafvalwijzer';
	config['garbage_zipcode'] = '4761GX';
	config['garbage_street'] = 'De Knip';
	config['garbage_housenumber'] = '82';
	config['garbage_maxitems'] = '3';
	config['garbage_width'] = '4';
	config['garbage'] = {
    	gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/garbage/kliko_green.png'},
    	pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/garbage/kliko_orange.png'},
    	papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/garbage/kliko_blue.png'},
	};

//OpenWeather
	config['owm_api'] ='xxx';
	config['owm_city'] = 'Zevenbergen';
	config['owm_name'] = '';
	config['owm_country'] = 'nl';
	config['static_weathericons'] = 1;
	config['owm_cnt'] = '3';
	config['owm_days'] = true;
	config['owm_lang'] = 'nl';
	config['owm_min'] = true;
	config['static_weathericons'] = false;

//Buttons
	var buttons = {}
    	buttons.buienradar = {key: 'buienradar', width:12, isimage:true, refreshimage:60000, btnimage: 'http://api.buienradar.nl/image/1.0/RadarMapNL'}

//Frames
	var frames = {}
	frames.buienradar = {refreshiframe:300000, width:12, height:350, frameurl:"https://gadgets.buienradar.nl/gadget/zoommap/?lat=xxxxx&lng=xxxxx&overname=2&zoom=13&naam=xxxx&size=2&voor=1"}

//Definition of blocks
	var blocks = {}

	blocks['s1'] = {width: 6}
	blocks['s1']['title'] = 'Hal';
	blocks['s1']['hide_data'] = true;

	blocks[10] = {width: 6}
	blocks[10]['title'] = 'Eettafel';
	blocks[10]['hide_data'] = true;
	blocks[10]['last_update'] = false;

	blocks[32] = {width: 6}
	blocks[32]['title'] = 'Nachtlamp Ivey';
	blocks[32]['hide_data'] = true;
	blocks[32]['last_update'] = false;

	blocks['80_1'] = {width: 6}
	blocks['80_1']['title'] = 'Temperatuur';
	blocks['80_1']['hide_data'] = true;
	blocks['80_1']['last_update'] = false;

	
	blocks['80_2'] = {width: 6}
	blocks['80_2']['title'] = 'Luchtvochtigheid';
	blocks['80_2']['hide_data'] = true;
	blocks['80_2']['last_update'] = false;


	blocks[1] = {width: 4}
	blocks[1]['title'] = 'Frank';
	blocks[1]['hide_data'] = false;
	blocks[1]['last_update'] = false;
	blocks[1]['icon'] = 'fas fa-home'
	blocks[1]['textOn'] = 'Thuis'
	blocks[1]['textOff'] = 'Niet Thuis'

	blocks[33] = {width: 4}
	blocks[33]['title'] = 'Kirsten';
	blocks[33]['hide_data'] = false;
	blocks[33]['last_update'] = false;
	blocks[33]['icon'] = 'fas fa-home'
	blocks[33]['textOn'] = 'Thuis'
	blocks[33]['textOff'] = 'Niet Thuis'

	blocks[21] = {width: 4}
	blocks[21]['title'] = 'Voordeur';
	blocks[21]['hide_data'] = false;
	blocks[21]['last_update'] = false;
	blocks[21]['iconOn'] = 'fas fa-unlock'
	blocks[21]['iconOff'] = 'fas fa-lock'

	blocks[31] = {width: 4}
	blocks[31]['title'] = 'Vakantiemodus';
	blocks[31]['hide_data'] = true;
	blocks[31]['icon'] = 'fas fa-plane-departure'

	blocks['s2'] = {width: 6}
	blocks['s2']['title'] = 'Alles uit';
	blocks['s2']['hide_data'] = true;
	blocks['s2']['icon'] = 'fas fa-bed';

//Evohome
	blocks[35] = {width: 4}
	blocks[35]['title'] = 'Evohome';
	blocks[35]['hide_data'] = true;

	blocks[36] = {width: 4}
	blocks[36]['title'] = 'Woonkamer';
	blocks[36]['hide_data'] = true;

	blocks[37] = {width: 4}
	blocks[37]['title'] = 'Slaapkamer';
	blocks[37]['hide_data'] = true;

	blocks[38] = {width: 4}
	blocks[38]['title'] = 'Travis';
	blocks[38]['hide_data'] = true;

	blocks[39] = {width: 4}
	blocks[39]['title'] = 'Ivey';
	blocks[39]['hide_data'] = true;

	blocks[40] = {width: 4}
	blocks[40]['title'] = 'Badkamer';
	blocks[40]['hide_data'] = true;

//Bioscoop
	blocks[47] = {width: 4}
	blocks[47]['title'] = 'Film kijken';
	blocks[47]['hide_data'] = true;
	blocks[47]['icon'] = 'fas fa-film'

	blocks[60] = {width: 4}
	blocks[60]['title'] = 'Ventilator'; 
	blocks[60]['hide_data'] = true;
	blocks[60]['icon'] = 'fas fa-fan'

	blocks[2] = {width: 4}
	blocks[2]['title'] = 'Verlichting';
	blocks[2]['hide_data'] = true;
	blocks[2]['icon'] = 'far fa-lightbulb'

	blocks[58] = {width: 12}
	blocks[58]['title'] = 'Shield';
	blocks[58]['hide_data'] = true;

	blocks[79] = {width: 12}
	blocks[79]['title'] = 'Airco';
	blocks[79]['hide_data'] = true;

	blocks['77_1'] = {width: 6}
	blocks['77_1']['title'] = 'Temperatuur';
	blocks['77_1']['hide_data'] = true;
	blocks['77_1']['last_update'] = false;

	blocks['77_2'] = {width: 6}
	blocks['77_2']['title'] = 'Luchtvochtigheid';
	blocks['77_2']['hide_data'] = true;
	blocks['77_2']['last_update'] = false;

	blocks[57] = {width: 12}
	blocks[57]['title'] = 'Verlichting';
	blocks[57]['hide_data'] = true;

	blocks[78] = {width: 12}
	blocks[78]['title'] = 'Receiver';
	blocks[78]['hide_data'] = true;


// Titels
	blocks['title_lampen'] = {}
	blocks['title_lampen']['type'] = 'blocktitle'
	blocks['title_lampen']['title'] = 'Lampen / schakelaars'

	blocks['title_bios'] = {}
	blocks['title_bios']['type'] = 'blocktitle'
	blocks['title_bios']['title'] = 'Bioscoop'

	blocks['title_verw'] = {}
	blocks['title_verw']['type'] = 'blocktitle'
	blocks['title_verw']['title'] = 'Verwarming'

	blocks['title_div'] = {}
	blocks['title_div']['type'] = 'blocktitle'
	blocks['title_div']['title'] = 'Diverse'

	blocks['title_receiver'] = {}
	blocks['title_receiver']['type'] = 'blocktitle'
	blocks['title_receiver']['title'] = 'Receiver'


//Definition of columns
	columns = {}

	columns[1] = {
  	blocks: ['title_lampen', 10, 's1', 32, 's2', 'title_bios', 47, 2, 60, 79, '77_1', '77_2', 58],
  	width: 4
	}

	columns[2] = {
  	blocks : ['title_verw', 35, 36, 37, 38, 39, 40, 'title_div', 31, 1, 33, 21, 'garbage'],
  	width: 5
	}

	columns[3] = {
  	blocks : ['sunrise','80_1', '80_2', 'weather_owm', buttons.buienradar],
  	width: 3
	}

	columns[4] = {
  	blocks : [57, 78],
  	width: 4
	}

	columns[5] = {
  	blocks : [],
  	width: 4
	}

	columns[6] = {
  	blocks : [],
  	width: 4
	}


//Definition of screens
	screens = {}
	screens[1] = 
	{
 	columns: [1, 2, 3]
	}
	
	screens[2] = 
	{
 	columns: [4, 5, 6]
	}

Attachments
Dashticz.png
Dashticz.png (175.97 KiB) Viewed 644 times
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by Lokonli »

That's a bit strange indeed.

What are the device types and subtypes of the two devices?

You can request them via:

Code: Select all

http://<domoticz ip:port>/json.htm?type=devices&rid=57
http://<domoticz ip:port>/json.htm?type=devices&rid=78
[code]

Which exact Dashticz and Domoticz versions are you running?
fvdp80
Posts: 70
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Re: Selector switch format

Post by fvdp80 »

Device 57:
"Type" : "Light/Switch"
"SubType" : "Switch"

Device 78:
"Type" : "Light/Switch"
"SubType" : "Selector Switch"

Domoticz version: 2020.1 (build 11942)
Dashticz version: 3.4.4 beta
Last edited by fvdp80 on Monday 20 April 2020 11:16, edited 1 time in total.
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by Lokonli »

There is an option in Domoticz to choose the button display style for each device. Can you check those?
fvdp80
Posts: 70
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Re: Selector switch format

Post by fvdp80 »

That was it! Changed it and the buttons are shown the right way in Dashticz.

Thx!
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by HansieNL »

Thanks a lot. I’ve just changed it to drop down. Saves a lot of space.
Image
I wanna enlarge the dropdown box. Can someone tell me what code to use for that.
Blah blah blah
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by Lokonli »

Add the following to custom.css:

Code: Select all

.col-data select {
     font-size: 150%;
     width: 100%
 }
This will increase the font size to 150% of the regular font size, and changes the width of the dropdown box as well. You can also fill in a number (in pixels) but then it won't scale anymore with the width of the block.
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by HansieNL »

Thx a lot. Looks a lot better now...
Image

Code: Select all

.block_438 .icon {
    width: 85%;
    height: auto; 
}
.block_438 .title,
.block_438 br:nth-child(2) {		
    display: none;
}
.block_438 .col-data select {
     font-size: 150%;
     width: 100%;
     background-color: rgb(242,242,242);
 }
Blah blah blah
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by Lokonli »

Intriguing block. What are the other options? ;)

Sent from my SM-A320FL using Tapatalk

User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Selector switch format

Post by HansieNL »

Lokonli wrote: Monday 20 April 2020 23:50 Intriguing block. What are the other options? ;)

Sent from my SM-A320FL using Tapatalk
:lol: :lol:
Blah blah blah
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest