Skip to content

Commit

Permalink
v2.0.1
Browse files Browse the repository at this point in the history
release
  • Loading branch information
dave_albright committed Mar 29, 2023
1 parent 1e8deca commit afc56d2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Home-Assistant-Wundergroundpws v2.X.X
**_V2 is not released and still under development. Use at your own risk.._**


Home Assistant custom integration for Weather Underground personal weather station users.
Includes a native Home Assistant Weather Entity and a variety of weather sensors.
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v2.0.1
add user-agent to config_flow (error on docker installation)

v2.0.0
Redesign sensors - BREAKING CHANGE - no upgrade path from earlier versions
move integration to config_flow
2 changes: 1 addition & 1 deletion custom_components/wundergroundpws/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Home-Assistant-Wundergroundpws v2.X.X
**_V2 is not released and still under development. Use at your own risk.._**


Home Assistant custom integration for Weather Underground personal weather station users.
Includes a native Home Assistant Weather Entity and a variety of weather sensors.
Expand Down
5 changes: 4 additions & 1 deletion custom_components/wundergroundpws/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ async def async_step_user(self, user_input=None):

pws_id = user_input[CONF_PWS_ID]
api_key = user_input[CONF_API_KEY]
headers = {'Accept-Encoding': 'gzip'}
headers = {
'Accept-Encoding': 'gzip',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
}
try:
if user_input[CONF_API_KEY] is None or user_input[CONF_API_KEY] == "":
errors["base"] = "invalid_api_key"
Expand Down
5 changes: 4 additions & 1 deletion custom_components/wundergroundpws/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ async def _async_update_data(self) -> dict[str, Any]:

async def get_weather(self):
"""Get weather data."""
headers = {'Accept-Encoding': 'gzip'}
headers = {
'Accept-Encoding': 'gzip',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
}
try:
with async_timeout.timeout(10):
url = self._build_url(_RESOURCECURRENT)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/wundergroundpws/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "wundergroundpws",
"name": "Wundergroundpws",
"version": "2.0.0",
"version": "2.0.1",
"documentation": "https://github.com/cytech/Home-Assistant-wundergroundpws/tree/v2.X.X",
"issue_tracker": "https://github.com/cytech/Home-Assistant-wundergroundpws/issues/",
"requirements": [],
Expand Down

0 comments on commit afc56d2

Please sign in to comment.