forked from extern/homer
Removed URL and made fixed.
This commit is contained in:
parent
dfb0b14626
commit
9e0ef05efe
@ -118,7 +118,7 @@ services:
|
|||||||
# background: red # optional color for card to set color directly without custom stylesheet
|
# background: red # optional color for card to set color directly without custom stylesheet
|
||||||
```
|
```
|
||||||
|
|
||||||
View the [Custom Services](customservices.md) file for details about all available custom services (like PiHole).
|
View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them.
|
||||||
|
|
||||||
If you choose to fetch message information from an endpoint, the output format should be:
|
If you choose to fetch message information from an endpoint, the output format should be:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Custom Services
|
# Custom Services
|
||||||
|
|
||||||
Here is an overview of all custom services that are avaiable within Homer.
|
Here is an overview of all custom services that are available within Homer.
|
||||||
|
|
||||||
## PiHole
|
## PiHole
|
||||||
|
|
||||||
@ -26,7 +26,6 @@ The following configuration is available for the OpenWeatherMap service
|
|||||||
```
|
```
|
||||||
items:
|
items:
|
||||||
- name: "Weather"
|
- name: "Weather"
|
||||||
url: "https://api.openweathermap.org/data/2.5/weather"
|
|
||||||
location: "Amsterdam" # your location.
|
location: "Amsterdam" # your location.
|
||||||
apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
|
apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
|
||||||
units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
|
units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
|
||||||
|
@ -89,7 +89,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchStatus: async function () {
|
fetchStatus: async function () {
|
||||||
const url = `${this.item.url}?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`;
|
const url = `https://api.openweathermap.org/data/2.5/weather?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`;
|
||||||
this.api = await fetch(url)
|
this.api = await fetch(url)
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.catch((e) => console.log(e));
|
.catch((e) => console.log(e));
|
||||||
|
Loading…
Reference in New Issue
Block a user