Page 1 of 1

Actions with daytime and nighttime

Posted: Tuesday 27 March 2018 16:04
by poudenes
Is this allow? So the script will trigger every minute (for some actions that will be done at nighttime)
And when device will be uses it will only triggered when daytime or nighttime.

Code: Select all

on = {
	    timer = {'every minutes at nighttime'},
		devices = {
		           [LogitechOff] = { 'at nighttime' },
		           [LogitechAppleTV] = { 'at nighttime' },
		           [LogitechTV] = { 'at nighttime' },
		           [LogitechDay] = { 'at daytime' },
		           iPhonePeter,
		           iPhoneKay,
		           [KodiStatus] = { 'at nighttime' },
		           BulbMasterBedroom
		           }
	},

Re: Actions with daytime and nighttime

Posted: Wednesday 28 March 2018 22:40
by waaren
for dzVents 2.4.1:

Code: Select all

return {
	on = {  
		devices = 
			{ 
				['LogitechOff'] = {'at nighttime'} , 
				['LogitechDay'] = {'at daytime'} ,
				['LogitechAppleTV'] = {'at nighttime'} ,
				'BulbMasterBedroom' 
			} ,

		timer = 
			{ 
				'every minute at nighttime' 
			}
          },

	execute = function(domoticz, device)
		-- Your code
	end	
}	

Re: Actions with daytime and nighttime

Posted: Wednesday 28 March 2018 22:46
by poudenes
Yes I know the whole script. Was wondering if I can give multiple devices different day time night options :)


Verzonden vanaf mijn iPhone met Tapatalk Pro

Re: Actions with daytime and nighttime

Posted: Wednesday 28 March 2018 23:21
by waaren
Short answer: Yes

Re: Actions with daytime and nighttime

Posted: Thursday 29 March 2018 10:56
by poudenes
:D Thanks !