Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to onecall API + Review #52

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Have you tried all steps under [Troublehsooting](https://github.com/scottcl88/MMM-DynamicWeather/wiki/Troubleshooting)?**
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '26 14 * * 0'
- cron: "26 14 * * 0"

jobs:
analyze:
Expand All @@ -28,40 +28,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MMM-DynamicWeather.js
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [3.0.0] - 2024-10-28

- Support OpenWeather One Call API 3.0
- Breaking change: `locationID` doesn't workmanymore
- Add linting by ESLint
- Add formating by prettier
- Format files and handle linter issues

## [2.14.1] - 2021-04-10

Expand Down
86 changes: 42 additions & 44 deletions ConfigurationOptions.md

Large diffs are not rendered by default.

76 changes: 39 additions & 37 deletions ExampleConfigurations.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,57 @@
# Example Configurations
Below are helpful configurations for you to get started. See [Configuration Options](ConfigurationOptions.md) for details of each option.

Below are helpful configurations for you to get started. See [Configuration Options](ConfigurationOptions.md) for details of each option.

Feel free to contribute to this list.

## Show hearts on Valentine's day + default real-time weather effects

````javascript
```javascript
{
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
locationID: "4140963",
effects: [
{
month: "2",
day: "14",
images: ["heart1.png", "heart2.png"],
direction: "up"
}
],
}
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
lat: "38.89511000",
lon: "-77.03637000",
effects: [
{
month: "2",
day: "14",
images: ["heart1.png", "heart2.png"],
direction: "up"
}
],
}
},
````
```

## Never show the clouds + default real-time weather effects

````javascript
```javascript
{
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
locationID: "4140963",
hideClouds: true
],
}
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
lat: "38.89511000",
lon: "-77.03637000",
hideClouds: true
}
},
````
```

## Always show the sun + default real-time weather effects

````javascript
```javascript
{
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
locationID: "4140963",
alwaysDisplay: "sun"
],
}
module: "MMM-DynamicWeather",
position: "fullscreen_above",
config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
api_key: "your_key",
lat: "38.89511000",
lon: "-77.03637000",
alwaysDisplay: "sun"
}
},
````
```
19 changes: 11 additions & 8 deletions MMM-DynamicWeather.css
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ https://codepen.io/Ravyre/pen/gXawyY
.MMM-DynamicWeather #foglayer_01,
.MMM-DynamicWeather #foglayer_02,
.MMM-DynamicWeather #foglayer_03 {
animation: foglayer_01_opacity 10s linear infinite, foglayer_moveme 10s linear infinite;
animation:
foglayer_01_opacity 10s linear infinite,
foglayer_moveme 10s linear infinite;
}

.MMM-DynamicWeather #foglayer_01 .image01,
Expand Down Expand Up @@ -432,7 +434,6 @@ Lightning
}
}


/***************************
Sunny
***************************/
Expand All @@ -441,13 +442,13 @@ Sunny
width: 100%;
position: absolute;
display: block;
opacity: .4;
opacity: 0.4;
}
.MMM-DynamicWeather .sun {
height: 100%;
width: 100%;
position: absolute;
opacity: .4;
opacity: 0.4;
}

/***************************
Expand All @@ -458,13 +459,13 @@ Moon
width: 100%;
position: absolute;
display: block;
opacity: .6;
opacity: 0.6;
}
.MMM-DynamicWeather .moon {
height: 100%;
width: 100%;
position: absolute;
opacity: .6;
opacity: 0.6;
}

/***************************
Expand Down Expand Up @@ -546,7 +547,8 @@ Flower
animation-delay: 10s;
}
@keyframes flowerBg {
0%, 10% {
0%,
10% {
background-image: url("images/FLOWER_1.png");
height: 250px;
}
Expand Down Expand Up @@ -574,7 +576,8 @@ Flower
background-image: url("images/FLOWER_7.png");
height: 650px;
}
80%, 100% {
80%,
100% {
background-image: url("images/FLOWER_8.png");
height: 650px;
}
Expand Down
Loading