Read the statement by Michael Teeuw here.
Editing core modules
-
Thank you @sdetweil for helping me along. I’m working on editing the core modules to fit the config that I’d like. The problem I’m running into is that despite using the syntax that appears in the documentation, I’m getting errors.
For example, my weather module is displaying either Kelvin or Celsius and I’d like it to be imperial. According to the documentation, I think all I need to do is add:
units: “Imperial”,
to the config file and I should be golden. However, that’s not what’s happened:
{ module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", location: "Gainesville, US", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1" units: "imperial", }
For us super noobs, it might be helpful to have a sample of the config section, where a user can simply delete the lines that they don’t need.
BTW, I appreciate that will only help a very small subset of users and I’m grateful for the patience you all show us noobs.
CheapDad
-
So, I fixed my own problem but created another! For the weather module, I placed the units code and round up code as the first entries in config and it worked! Well, sort of. I do get Fahrenheit and the temperatures are rounded up, except my “feels like” output is 293 degrees!
Additionally, the time in the current weather field is about 8 hours different than the time in the time module (upper left).
The code:
{ module: "weather", position: "top_right", config: { units: "Imperial", roundTemp: "True", weatherProvider: "openweathermap", type: "current", location: "Gainesville, US", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1" } }, { module: "weather", position: "top_right", header: "Weather Forecast", config: { units: "Imperial", roundTemp: "True", weatherProvider: "openweathermap", type: "forecast", location: "Gainesville, US", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1" }
-
@cheapdad gotta have that locationID
many authors provide sample config layouts
not all, and not the base.
your welcome to edit the doc and submit updates
-
@cheapdad also like to correct your words. u are not editing any of the core FILES, you are editing the configuration for the core modules.
-
@sdetweil On the location ID, the documentation indicates that it is not needed if you have “location” entered. If using just “location” without “location ID” is causing the error, then I’ll make the switch. Interestingly, its only the “feels like” that is off. (I figured out the that time difference is sunrise/sunset.)
On config layouts, I may just do that. Generally, is there any required order of the config lines?
CheapDad
-
@cheapdad said in Editing core modules:
Generally, is there any required order of the config lines?
no… any order is fine… the modules definitions go inside the
modules: [ ]
list
order is fifo (first in, first out)by position
three in the top_left,
from top of config.js down that is the order they will appear -
@sdetweil I’ll check that out; thank you!