zobnin / aiolauncher_scripts

Scripts for the AIO Launcher
https://aiolauncher.app
86 stars 20 forks source link

Add Electricity spot price widget #24

Closed dancek closed 5 months ago

dancek commented 5 months ago

This widget supports showing electricity spot price for many areas in Europe. However, there's no configuration UI yet. I'm hoping there will be native support for editing the values in prefs later, but I'm also open to implementing the configuration UI in the widget if I get some help.

The chart would be better if displayed with timestamps, but that doesn't currently work when the timestamps span two days.

dancek commented 5 months ago

Samples of how it looks folded and expanded, late in the evening so the data spans two days. The one-line representation lists hours and prices such that there's a major change from the earlier price (configurable with the oneline_threshold_* parameters). Screenshot_2024-04-29-23-07-43-50_c483b0a08a3d13961f22556f3195da20~2 Screenshot_2024-04-29-23-07-50-84_c483b0a08a3d13961f22556f3195da20~2

zobnin commented 5 months ago

Thank you for your script. Looks cool. And I will help you with configuration. But please change script directory from main to community.

dancek commented 5 months ago

Oops! Done.

I assume a configuration UI would be done by overriding on_settings and creating a dialog, but I didn't understand how to create a dialog with multiple fields.

zobnin commented 5 months ago

Thank you. About settings: yes, there is no rich ui dialog right now. But I will add it soon.

zobnin commented 4 months ago

In AIO Launcher 5.3.0, an API for automatically generating a settings window from prefs fields has been introduced. I have already added support for this in your script, so you don't need to do anything.