|  Developer
Updated on December 2, 2022

isSunState

  • Triggering periodically corresponding sunset/sunrise event. It’s possible to set the special days of the week or days of the month. The time offset after/before sunset or sunrise could be used. Also the ranges till/from midnight could be used.
Edit
Field Type Required Description
blockOptions.method.args.sunstate string + The name of argument defines sun state. The possible names of argument: , . The value of field defines time offset direction. The possible values: , or . The means event is triggered in sunset/sunrise time. The or means time offset is added before or after sunset/sunrise time. The time offset is defined in parameter.
blockOptions.method.args.time string The time offset in hms_interval
blockOptions.method.args.weekdays string Argument declaration of weekday array. The value should be in block with name. The weekday array contains integer numbers. The possible values are 1..7 range. Type . See Item Value Type.
blockOptions.method.args.days string Argument declaration of day array. The value should be in block with name. The day array contains integer numbers. The possible values are 1..31 range. If day is set to 31 then event works in each month where 31st day is present. Type . See Item Value Type.
blockOptions.method.args.range string Possible values: – all time after defined moment till midnight of current day; – all time after midnight till defined moment; – just once at defined moment of time (not range). Default value: . This feature is available since version.
Edit
				
					"when" : [{
   "blockOptions":{
      "method":{
         "args":{  
            "sunstate":"sunrise",
            "time":"time",
            "days":"days",
            "range":"range"
         },
         "name":"isSunState"
      }
   },
   "blockType":"when",
   "fields":[
      {
         "name":"sunrise",
         "type":"string",
         "value":"before"
      },
      {
         "name":"time",
         "type":"hms_interval",
         "value":"10:30"
      },
      { 
          "name": "days",
          "type": "int_array",
          "value": [ 1, 5, 12 ]
      },       
      {
         "name":"range",
         "type":"token",
         "value":"after"
      }
   ]
}]