SmartBlocks
SmartBlocks copied to clipboard
Weather Forecast 2.2
✂️ Copy of your #42SmartBlock from Roam
Download this file and import the enclosed JSON into your Roam Graph. Weather Forecast v2.2.zip
📋 Describe the SmartBlock
This is an enhanced version of the Weather Cards SmartBlock. Version 2.0 shows the weather for the next 3 days, along with any weather alerts or special weather statements active at the time. You now also update the forecast at the click of a button, or change to another location by clicking the Change button. This version is also faster and more reliable than the earlier version.
Changes in this version:
- Added setting
weatherDirectToDefault
. Setting this to 'yes' will use the value in theweatherDefaultLocation
setting and bypass the prompt on the first run. The prompt will appear when pressing theChange
button regardless of this setting. - Added setting
weatherUnits
. Set this toimperial
ormetric
as desired. - Added day of week to weather cards.
✅ Describe any prerequisites or dependencies that are required for this SmartBlock
These prerequisites are also listed in the SmartBlock.
- You will need an API Key from https://openweathermap.org/api for this to work.
- You will need to copy the CSS blocks found in the SmartBlock to your roam/css page.
📷 Screenshot of your #42SmartBlock workflow/template from Roam
💡 Additional Info
See it in action. (The delays you will see are from me entering location information in an off-screen pop-up.) https://www.loom.com/share/30cdac47b11b4f9ab348d76b4b607a0d
HI David, thank you for the great smartblock!
I am having some trouble with the short code setting, the block will not fire when I enter wvg
into the prompt
it works when I use westlake village, ca, us
please see attached and let me know if you can suggest a solution.
Also, is there a way to set the default location and avoid the prompt altogether?
Thanks again!
HI David, thank you for the great smartblock! I am having some trouble with the short code setting, the block will not fire when I enter
wvg
into the prompt it works when I usewestlake village, ca, us
please see attached and let me know if you can suggest a solution.Also, is there a way to set the default location and avoid the prompt altogether?
Thanks again!
Hi, @jeffrappaport. Try removing the spaces after the commas. So, westlake villiage,ca,us
should work. Let me know if it still doesn't.
I will also put in some code to account for this in the future.
I can add an option to skip the prompt. I assume only on first run, not on Change
. Sound good?
I can have both of these changes up within the hour, I should think.
@jeffrappaport Correction. The issue with wvg is that it must end with a semi-colon:
wvg: westlake village, ca, us;
The semi-colon, followed by a line-break, is what I use to delimit one favorite from another.
thanks David. I removed the line" Enter your favorite locations on separate lines below as aalias
, and it worked!
Hi David, Nice update to your original block. Only issues I see is the name of the day2 shows as tomorrow. It would be good to retrieve the day name from dayjs if possible. Second one is this is only showing US units. Is there a way to show international units? Cheers, Mark
@mlava I should be able to do that.
@mlava I think this version (2.2) does what you need.
I added a setting to choose between imperial and metric measures.
I replaced Today
, Tomorrow
, and the other Tomorrow
with day of week, month, year: e.g., Tuesday, Mar 9, 2021
.
Wow, that was fast. Am away from computer but will download later today. Cheers!
On Wed, 10 Mar 2021, 9:30 am eatondpe, [email protected] wrote:
@mlava https://github.com/mlava I think this version (2.2) does what you need. I added a setting to choose between imperial and metric measures. I replaced Today, Tomorrow, and the other Tomorrow with day of week, month, year: e.g., Tuesday, Mar 9, 2021.
[image: image] https://user-images.githubusercontent.com/67427527/110546805-fb3b1800-80fc-11eb-8920-e684036d8329.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/roamhacker/SmartBlocks/issues/211#issuecomment-794542653, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUKIPT725VZCA3YLLGZNHTTC2HONANCNFSM4Y3R5P7Q .
Hi David, unable to upload 2.2 I tried deleting prior blocks, but no luck
@jeffrappaport Did you delete the page that was created when you did the earlier import?
@eatondpe yes
@jeffrappaport OK. Do you have or can you create another graph you can import this into? And then copy everything on the page and paste it into the graph where you want to use it?
@eatondpe worked! thank you
I'd love to use this, but https://openweathermaps.org/api has been down for a few days now. I wonder if there's an alternative.
@kmaustral @eatondpe there is a typo in the readme file The site is https://openweathermap.org/api not openweathermaps.org/api (no 's')
Thanks, @jeffrappaport. This has now been corrected.
@eatondpe thank you for the wonderful SmartBlock! I have it at the very top of my DNP SmartBlock
I have this issue where if I call the Weather SmartBlock from another SmartBlock, the execution of the SmartBlock stops when the Weather SmartBlock is returned. Anyone know how to address this?
I encountered the same issue. Resolved it by turning the weathersmartblock into a button https://roamresearch.com/#/app/roamhacker/page/-y5HVWAXw
Is this still functional? I am not able to get this to work even after trying all the suggestions above. But I also don't see any posts since March. So, not sure if the problem is on my end or what.