Skip to content

Conversation

@ScottyDoesKnow
Copy link

@ScottyDoesKnow ScottyDoesKnow commented Dec 13, 2025

Adds option to show apparent (feels like) temperature instead of current temperature.

## Notes to Reviewer

A matching config site change would be required to set the option (hence the draft request, the feature is done though), I don't think there's any way for me to make that change. I'm also not sure if I made this change in the best way, I just added a bool in DynamicSettings that lets Apparent Temperature overwrite Current Temperature and use the same widget. I first started by creating a new widget, but it seemed like a lot of unnecessary code duplication.

Feel free to let me know if you see anything wrong, or want me to do anything in a different way. I just threw this together, and have only made some simple non-watchface apps before so I could easily have done something wrong.

I did build and install it on my watch with the boolean hardcoded to true and the temperature dropped from -4C to -11C so it seems to be working.

I'm also looking at making a Quiet Time widget that might also require config site changes, in case you wanted to wait for that.

@tilden
Copy link
Member

tilden commented Dec 14, 2025

Thanks for the MR!

Your JS code seems correct -- just like uv index, it can just always populate the value, and then it can be controlled from the settings page. (By the way, if you want to do local testing on the settings page, you can do so by checking out the gh-pages branch -- it's on my roadmap to make that process less obtuse, but it's not quite there yet.)

That said, DynamicSettings isn't really the best place for this; it is intended more like for settings that aren't controlled directly by the user but are instead calculated based on widget choices, etc. (Maybe I should have picked a better name!) You probably should create a new normal boolean setting called like "useFeelsLikeTemp" that controls whether or not the feels like temperature is shown in the current weather widget.

More specifically, you actually shouldn't need to increment settingsVersion for this as long as you add the new setting to the end of the settings struct. (It uses a trick where it directly reads the stored struct from memory, so any new settings at the end just end up set to their defaults.)

@ScottyDoesKnow
Copy link
Author

ScottyDoesKnow commented Dec 14, 2025

Ah, I see. I somehow just saw the dynamicsettings and the legacy settings, so I put it in dynamic. I've fixed that and also gave updating the config page a go, though I don't have an easy way to test the config page changes.

@ScottyDoesKnow ScottyDoesKnow marked this pull request as ready for review December 15, 2025 15:22
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.

2 participants