Open nyordanov opened 3 weeks ago
Interesting - was there a car plugged in when you saw this?
Yes
I haven't been able to replicate this, do you have any more details you can share? Any errors in the logs beforehand? Any general network issues?
I have this other TypeError in the logs, no idea if it's related to the above and I can't reproduce it on demand like the other error:
[homeassistant.components.switch] ohme: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 707, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1293, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 530, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 291, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 414, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/ohme/number.py", line 255, in _handle_coordinator_update
self._state = self.coordinator.data["userSettings"]["chargeSettings"][0]["value"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
Other than that, all I can say is that the error on api_client.py line 203 happens every time the car is plugged in and I try to change a number or time control. But, weirdly, all these controls work just fine if the car isn't plugged in.
For example, I can change the target time from 7:00 to 7:30 with the car unplugged, and it will have stored this value next time I plug the car in. I can also change the target percentage, etc. But I get a TypeError and the value doesn't change if the car is plugged in.
I tried disabling the VW API integration since it mostly doesn't work - didn't make any difference.
I also don't have a tariff selected in the Ohme app as my tariff isn't listed.
@nyordanov think I've figured it out. Would you mind trying out v0.8.3-beta.3? (beta instructions)
Works for me now.
Weirdly, the approve charge button didn't work when I tried it (was able to approve it in the Ohme app), but looking at the code I can't see how that could be related. I'll try again next time.
Thanks a lot. With this change I can now have two automations:
add 25%
instead of relying on charge from 55% to 80%
)Had the same problem, and with beta release it works now....
What happened?
Changing the Target Percentage, Target Time, or Preconditioning results in this TypeError
To Reproduce
Drag the Target Percentage range input:
Error message:
Log Output
Home Assistant Version
Core 2024.4.3 Supervisor 2024.04.0 Operating System 12.2 Frontend 20240404.2
Integration Version
0.8.2