aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDick Wolff <dckwlff@gmail.com>2021-01-13 21:27:19 +0100
committerDick Wolff <dckwlff@gmail.com>2021-01-13 21:27:19 +0100
commit9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4 (patch)
tree39cc78269c785383c6b5d565081355e1d92b12c7
parentdfb0b14626ccf42784d5e4c270ea0e2253db724c (diff)
downloadhomer-9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4.tar.gz
homer-9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4.tar.zst
homer-9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4.zip
Removed URL and made fixed.
-rw-r--r--docs/configuration.md2
-rw-r--r--docs/customservices.md3
-rw-r--r--src/components/services/OpenWeather.vue2
3 files changed, 3 insertions, 4 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index 174da4f..c88069e 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -118,7 +118,7 @@ services:
118 # background: red # optional color for card to set color directly without custom stylesheet 118 # background: red # optional color for card to set color directly without custom stylesheet
119``` 119```
120 120
121View the [Custom Services](customservices.md) file for details about all available custom services (like PiHole). 121View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them.
122 122
123If you choose to fetch message information from an endpoint, the output format should be: 123If you choose to fetch message information from an endpoint, the output format should be:
124 124
diff --git a/docs/customservices.md b/docs/customservices.md
index 7c1818e..a0b143e 100644
--- a/docs/customservices.md
+++ b/docs/customservices.md
@@ -1,6 +1,6 @@
1# Custom Services 1# Custom Services
2 2
3Here is an overview of all custom services that are avaiable within Homer. 3Here is an overview of all custom services that are available within Homer.
4 4
5## PiHole 5## PiHole
6 6
@@ -26,7 +26,6 @@ The following configuration is available for the OpenWeatherMap service
26``` 26```
27items: 27items:
28 - name: "Weather" 28 - name: "Weather"
29 url: "https://api.openweathermap.org/data/2.5/weather"
30 location: "Amsterdam" # your location. 29 location: "Amsterdam" # your location.
31 apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. 30 apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
32 units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. 31 units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue
index b1e5c57..c535a89 100644
--- a/src/components/services/OpenWeather.vue
+++ b/src/components/services/OpenWeather.vue
@@ -89,7 +89,7 @@ export default {
89 }, 89 },
90 methods: { 90 methods: {
91 fetchStatus: async function () { 91 fetchStatus: async function () {
92 const url = `${this.item.url}?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`; 92 const url = `https://api.openweathermap.org/data/2.5/weather?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`;
93 this.api = await fetch(url) 93 this.api = await fetch(url)
94 .then((response) => response.json()) 94 .then((response) => response.json())
95 .catch((e) => console.log(e)); 95 .catch((e) => console.log(e));