Add Apparent (feels like) Temperature option#128
Add Apparent (feels like) Temperature option#128ScottyDoesKnow wants to merge 2 commits intofreakified:masterfrom
Conversation
|
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.) |
|
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. |
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.