Add smog warning type for Environment Canada #200
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is currently a Smog Warning being issued by Environment Canada, which is not supported by the card.
This change adds support for this warning.
Here's the error I was getting before this change:
![error-screenshot](https://private-user-images.githubusercontent.com/52664/250270597-1e2bd380-5a43-4056-986e-9374396e298d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzODUzNzgsIm5iZiI6MTcxODM4NTA3OCwicGF0aCI6Ii81MjY2NC8yNTAyNzA1OTctMWUyYmQzODAtNWE0My00MDU2LTk4NmUtOTM3NDM5NmUyOThkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDE3MTExOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJjYzQ3OTVlYTU3ZTE2OTk5OTRhYTFiNjM0ZDE3ZGQwZDM5NjAyZDQ3YmZhMTk5MDkyMWM1MGRiMDBhNDE2NDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kQL-YGyfu6mDLgOjuIEym7AcBpAK4962kcP7RExKuZI)
Here's what it looks like after this change:
![after-edit-screenshot](https://private-user-images.githubusercontent.com/52664/250270595-4d1c199b-577d-4970-9d48-178283973ce2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzODUzNzgsIm5iZiI6MTcxODM4NTA3OCwicGF0aCI6Ii81MjY2NC8yNTAyNzA1OTUtNGQxYzE5OWItNTc3ZC00OTcwLTlkNDgtMTc4MjgzOTczY2UyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDE3MTExOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlZmIzZDY3ZDIxMWRhODMwZDViNWIwN2JhN2ViOTAzZmViYjA1MTdkNzBjNjIzNjU0ZjllMzFkODE0NmJhYWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Kj4P32rEmQa-LGRgJwKUF0sxMy52kV2ZBzOa4W7Rpzk)
This works for English, but I was unable to figure out how to test it for French (there doesn't seem to be a language setting for the Environment Canada integration?).
The title of the French warning on the website is "Avertissement de smog en vigueur pour" so I'm guessing the warning would be "Avertissement De Smog" and this set the French to just "Smog" too, but that's just a guess.