ioBroker.js-controller icon indicating copy to clipboard operation
ioBroker.js-controller copied to clipboard

Create frequently used variables

Open GermanBluefox opened this issue 6 years ago • 9 comments

isDay isNight time => (without seconds) hour => minutes => date => dow dowText ?? Something else.

GermanBluefox avatar Jun 27 '19 11:06 GermanBluefox

Interesting idea ... but under which "instance"? jscontroller do not have any. maybe "system.0"?

What is "dow"?

Apollon77 avatar Jun 27 '19 12:06 Apollon77

What about time with seconds? Users could use that to trigger scripts and actions. I think that would provide a nice alternative to CRON.

@Apollon77 I guess dow means dayOfWeek and I prefer the longer, explicit word for it.

I'll think about some more variables we could use.

AlCalzone avatar Jun 27 '19 12:06 AlCalzone

seconds will never be accurate and you would have one state update per second ... i would also go with minute granularity. then you still can trigger on "minute change"

Apollon77 avatar Jun 27 '19 12:06 Apollon77

Sun position based on geo coordinates

Apollon77 avatar Jul 18 '19 21:07 Apollon77

@GermanBluefox YOu started that now in javascript adapter, or ?! So still relevant here for controller?

Apollon77 avatar Apr 09 '20 07:04 Apollon77

I think, we should shift it to Javascript. But scenes could win from implementation in js-controller.

GermanBluefox avatar Apr 10 '20 15:04 GermanBluefox

Haven’t read about scenes in this issue. So what do you exactly mean by scenes?

foxriver76 avatar Jun 09 '20 14:06 foxriver76

@GermanBluefox ?

foxriver76 avatar Jan 03 '21 14:01 foxriver76

I mean adapter 'scenes'. Now only javascript has similar variables, but for scenes it could be usefull to to use isDay, isNight.

GermanBluefox avatar Jan 03 '21 14:01 GermanBluefox