Skip to content

Commit

Permalink
Merge pull request #17 from niltrip/16-powerocean-nicht-mehr-auslesbar
Browse files Browse the repository at this point in the history
16 powerocean nicht mehr auslesbar
  • Loading branch information
niltrip authored Jan 7, 2025
2 parents c4dfd5e + aec1531 commit 1eafb81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ __pycache__/
# Other
.DS_Store

# HA config
config/

# C extensions
*.so

Expand Down
6 changes: 4 additions & 2 deletions custom_components/powerocean/ecoflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def fetch_data(self):

url = self.url_user_fetch
try:
headers = {"authorization": f"Bearer {self.token}"}
headers = {
"authorization": f"Bearer {self.token}",
"user-agent": "Firefox/133.0",
}
request = requests.get(self.url_user_fetch, headers=headers, timeout=30)
response = self.get_json_response(request)

Expand Down Expand Up @@ -389,7 +392,6 @@ def __get_sensors_ems_heartbeat(self, response, sensors):
"emsBpPower",
"pcsActPwr",
"pcsMeterPower",

]
data = {}
for key, value in d.items():
Expand Down
4 changes: 2 additions & 2 deletions custom_components/powerocean/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"documentation": "https://github.com/niltrip/powerocean",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/niltrip/powerocean/issues",
"version": "2024.08.27"
}
"version": "2025.01.07-pre1"
}

0 comments on commit 1eafb81

Please sign in to comment.