Scrounger / ioBroker.vis-materialdesign

ioBroker Material Design Widgets are based on Google's material design guidelines. The adapter uses different libraries.
https://forum.iobroker.net/topic/42185/test-adapter-material-design-widgets-v0-5-x
MIT License
59 stars 39 forks source link

[Theme Editor]: color theme umschalten #129

Open Scrounger opened 3 years ago

Scrounger commented 3 years ago

Checkbox zum umschalten zwischen light und dark theme über Editor https://forum.iobroker.net/topic/39522/test-adapter-material-design-widgets-v0-4-0-beta/42

cdellasanta commented 3 years ago

I've added this in a script:

setState('vis-materialdesign.0.colors.darkTheme', !isAstroDay()); // On script startup
schedule({astro: 'sunrise'}, () => setState('vis-materialdesign.0.colors.darkTheme', false));
schedule({astro: 'sunset'}, () => setState('vis-materialdesign.0.colors.darkTheme', true));

But you probably should make this user-configurable in your adapter config.

Scrounger commented 3 years ago

@cdellasanta: Still had this idea too. But this is not a 'classic' daemon adapter with an instance. Means there is no main.js file, where i can listen to astro time changes. This must be done by a script, like its in your comment.

Only possible solution is, to add a checkbox in the adapter settings.