Skip to content

Commit

Permalink
added badges
Browse files Browse the repository at this point in the history
  • Loading branch information
marq24 committed Nov 28, 2023
1 parent 17ba166 commit ed5b308
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ link, Tibber will we grant you and me a bonus of 50,-€ for each of us. This bo
(not for your power bill) - e.g. to buy a Tibber Bridge. If you are already a Tibber customer and have not used an
invitation link yet, you can also enter one afterward in the Tibber App.

Please consider [using my personal Tibber invitation link to joind Tibber today](https://invite.tibber.com/6o0kqvzf) or
Enter the following code: 6o0kqvzf (six, oscar, zero, kilo, quebec, victor, zulu, foxtrot) afterwards in the Tibber
Please consider [using my personal Tibber invitation link to join Tibber today](https://invite.tibber.com/6o0kqvzf) or
Enter the following code: 6o0kqvzf (six, oscar, zero, kilo, quebec, victor, zulu, foxtrot) afterward in the Tibber
App - TIA!

---
Expand Down Expand Up @@ -296,4 +296,4 @@ look into the [current developer documentation section](./DEVELOPER_DOCUMENTATIO

[paypal]: https://paypal.me/marq24

[paypalbadge]: https://img.shields.io/badge/paypal-me-blue.svg?style=for-the-badge&logo=paypal&logoColor=ccc
[paypalbadge]: https://img.shields.io/badge/paypal-me-blue.svg?style=for-the-badge&logo=paypal&logoColor=ccc
6 changes: 3 additions & 3 deletions custom_components/senec/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ async def _test_connection_webapi(self, user: str, pwd: str, master_plant:int):
self._device_serial = senec_web_client.serial_number
self._device_version = None # senec_web_client.firmwareVersion

_LOGGER.info("Successfully connect to mein-senec.de with '%s'", user)
_LOGGER.info(f"Successfully connect to mein-senec.de with '{user}'")
return True
else:
self._errors[CONF_USERNAME] = "login_failed"
self._errors[CONF_PASSWORD] = "login_failed"
_LOGGER.warning("Could not connect to mein-senec.de with '%s', check credentials", user)
_LOGGER.warning(f"Could not connect to mein-senec.de with '{user}', check credentials (! _is_authenticated)")
except (OSError, HTTPError, Timeout, ClientResponseError):
self._errors[CONF_USERNAME] = "login_failed"
self._errors[CONF_PASSWORD] = "login_failed"
_LOGGER.warning("Could not connect to mein-senec.de with '%s', check credentials", user)
_LOGGER.warning(f"Could not connect to mein-senec.de with '{user}', check credentials (exception)")
return False

async def async_step_user(self, user_input=None):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/senec/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/marq24/ha-senec-v3/issues",
"requirements": ["xmltodict>=0.12.0", "packaging>=21.0"],
"version": "3.0.9"
"version": "3.1.1"
}
10 changes: 5 additions & 5 deletions custom_components/senec/pysenec_ha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
# 14: "CHARGE",
# 43: "CAPACITY TEST: CHARGE",
# 71: "OFFPEAK-CHARGE",
BAT_STATUS_CHARGE = {4, 5, 8, 10, 11, 12, 14, 43, 71}
BAT_STATUS_CHARGE = {4, 5, 8, 10, 11, 12, 14, 23, 24, 25, 33, 43, 71}

# 16: "DISCHARGE",
# 17: "PV + DISCHARGE",
# 18: "GRID + DISCHARGE"
# 21: "OWN CONSUMPTION"
# 44: "CAPACITY TEST: DISCHARGE",
# 97: "SAFETY DISCHARGE",
BAT_STATUS_DISCHARGE = {16, 17, 18, 21, 44, 97}
BAT_STATUS_DISCHARGE = {16, 17, 18, 21, 29, 44, 97}

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -1881,14 +1881,14 @@ def __init__(self, user, pwd, websession, master_plant_number: int = 0, options:

self.websession: aiohttp.websession = websession
if version.parse(aiohttp.__version__) < version.parse("3.9.0"):
_LOGGER.info(
f"CookieJar patch required cause aiohttp version is below 3.9.0 (current lib version is: {aiohttp.__version__})")
_LOGGER.info(f"aiohttp version is below 3.9.0 (current version is: {aiohttp.__version__}) - CookieJar need to be patched")
loop = aiohttp.helpers.get_running_loop(websession.loop)
senec_jar = MySenecCookieJar(loop=loop);
senec_jar = MySenecCookieJar(loop=loop)
if hasattr(websession, "_cookie_jar"):
old_jar = getattr(websession, "_cookie_jar")
senec_jar.update_cookies(old_jar._host_only_cookies)
setattr(self.websession, "_cookie_jar", senec_jar)
_LOGGER.info(f"CookieJar patch applied...")

self._master_plant_number = master_plant_number

Expand Down

0 comments on commit ed5b308

Please sign in to comment.