Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] Ping and Weather custom sensor + ColoredFlat Theme #510

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Psykotik
Copy link

@Psykotik Psykotik commented May 5, 2024

Hello,
I've added two sensors :

  • Ping sensor
  • Weather sensor

and one theme :

  • ColoredFlat

Ping Sensor

The ping sensor is used to know the latency of our network connection, and is based on the simple ping livrary from python (added to requirements.txt).
It is using the "custom sensor" not-so-new architecture to allow the tracking of ping.
pros: easy to do and maintain
cons: the ping module cannot (for the moment) have it's own interval, making it strange/difficult to use if there are multiple custom sensor that need different interval.

Weather Sensor

Added a weather sensor, first using also the custom sensor module, but due to the interval of custom sensor, I had to change the way to do it and create a "real sensor".
Modifications are based on the fork https://github.com/GaryStar/turing-smart-screen-python/tree/feature/names-alert-weather from @GaryStar with modifications.
The weather sensor has it's own setup in config.yaml, and need an api key from OneCall 3.0 api openweathermap.org. It's free for the first daily 1000 api calls, so it's enough for a daily use even if the program is running 24/7 if the interval is setuped >90s (note the API refresh rate seems to be more like 10 to 20 minutes, so it's perfect.

New Theme : Colored Flat

preview

I don't know if it's the right way to do it, or even if it will be interesting for other, but I added my personnal theme called Colored Flat, that features the new weather component, and Ping component with line_graphs ping history

Psykotik added 10 commits May 5, 2024 17:16
Added personnal theme, name not good but it's mine. .xcf file for GIMP (or other tool i don't know) if needed to change the wallpaper
+ removed weather data print in console
All line_graphs for cpu, gpu, net, ping etc. are now an historic of 120s for consistency
Updated theme_example.yaml to reflect new weather sensor
Updated theme.yaml to relfect changes on weather sensor and positionning
updated the weather sensor to have different modules instead of one text string.
Now it has 5 differents informations : temperature, felt temperature, humidity, weather condition description, and update time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant