-
Notifications
You must be signed in to change notification settings - Fork 4
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
Mfa token config flow #11
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Olivier Mehani <[email protected]>
…acts fixes: LeighCurran#6 Signed-off-by: Olivier Mehani <[email protected]>
Tariffs 31, 41, 61 and 62 are a wild guess, and totally untested. fixes: LeighCurran#6 some more Signed-off-by: Olivier Mehani <[email protected]>
Neither STATE_CLASS_TOTAL_INCREASING nor STATE_CLASS_MEASUREMENT work well for the ca. 9am reset that seems to happen for daily summary data. The `last_reset` time is set to whenever a value changes. This means this is liable to a bug where a value will be missed it it is the same as the previous day. Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
The AuroraApi proxies everything to the session, or swallows the error transparently. This is not the behaviour that the Throttle wrapper expects, as it needs to use a _throttle attribute on the wrapped object. We add a special case in the proxy juuuuust for this. Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Signed-off-by: Olivier Mehani <[email protected]>
Waiting for LeighCurran/AuroraPlus#1 to be merged. Signed-off-by: Olivier Mehani <[email protected]>
This is useful for the T140 feed-in, which is negative, when HA expect a positive return value. Signed-off-by: Olivier Mehani <[email protected]>
Usage: 1. obtain an `access_token` following instructions at [0] 2. update the secrets to use an empty username (`''`), and the `access_token` as the password [0] https://github.com/shtrom/AuroraPlus/tree/oauth-mfa-token\#obtain-a-token Signed-off-by: Olivier Mehani <[email protected]>
Fixes Traceback (most recent call last): File /usr/src/homeassistant/homeassistant/loader.py, line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File /usr/src/homeassistant/homeassistant/loader.py, line 859, in _import_platform return importlib.import_module(f{self.pkg_path}.{platform_name}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File /usr/local/lib/python3.11/importlib/init.py, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File , line 1204, in _gcd_import File , line 1176, in _find_and_load File , line 1147, in _find_and_load_unlocked File , line 690, in _load_unlocked File , line 940, in exec_module File , line 241, in _call_with_frames_removed File /config/custom_components/auroraplus/sensor.py, line 39, in from homeassistant_historical_sensor import ( File /usr/local/lib/python3.11/site-packages/homeassistant_historical_sensor/init.py, line 39, in raise SystemError(msg) SystemError: Running HomeAssistant 2024.1.2, Minimum required version >=2023.6.0 See [0], [1] [0] ldotlopez/ha-historical-sensor#12 [1] https://github.com/LeighCurran/AuroraPlus/pull/3\#issuecomment-1884213483 Signed-off-by: Olivier Mehani <[email protected]>
Nicer entities names Update README for Config Flow Move AuroraApi to... api Signed-off-by: Olivier Mehani <[email protected]>
@LeighCurran I thought I had this PR around before, but can't find it. I now added a ConfigFlow module, so the token can be renewed in the UI, along with nice notifications when it gets outdated. It's updating to v2.0.0 due to breaking change in the entity names (needing re-adding to the energy dashboard), and the change in configuration method (for which I haven't added a migration step). @slothking87 wanna give it a try, if you're game? |
There is a persistent, but
I haven't gotten to the bottom of it yet, but I suspect this has to do with using the historical sensor, and HA trying to update the current (non-existent) reading. @ldotlopez, perhaps you have seen a similar issue before (the issue also happens with 2.0.0rc6)? |
@shtrom Yes, I have this issue too. For me, It surfaces when two historical sensors are enabled for the same integration. I spent so many hours in this issue that gives me headaches to think about it. Historical-sensors consists of two main parts: handling historical states and handling (import) historical statistics. For importing statistics H-A has an API, but it doesn't for the first one. For this reason historical-sensors manipulates the DB "directly" (using SQLalchemy and some helper functions from the recorder component). The problem is that H-A recently added some layer on top of the DB that I was unable to made work with historical states. The only solution I can see now is to remove the handling of historical states and just transform upstream data into statistics. |
Yep, cool, @ldotlopez. Thanks for the details! What do you mean by “remove the handling of historical states and just transform upstream data into statistics”? This sounds like dropping the use of ha-historical-sensors? Or is this just something like disabling stats, but not raw data input? I remember struggling to get stats working, but can't recall the details. In any case, we can't do that here, as we never get immediate data, just full-day hourly data, the next day. It's ok, though, with a restart, the problem clears and everything works, so I'll look at a way to make the config update make HA ask for a reboot. |
Sorry - Been away and forgot to have a look. |
Based on #9, fixes #10.