Comments (11)
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:
- Auto approvals based on car location (if the button works, that is)
- Automatically set target percentage based on car SoC and avoid Ohme's flaky integration with VW's API (e.g.,
add 25%
instead of relying oncharge from 55% to 80%
)
from homeassistant-ohme.
Had the same problem, and with beta release it works now....
from homeassistant-ohme.
Resolved by #81
from homeassistant-ohme.
Interesting - was there a car plugged in when you saw this?
from homeassistant-ohme.
Yes
from homeassistant-ohme.
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?
from homeassistant-ohme.
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.
from homeassistant-ohme.
@nyordanov think I've figured it out. Would you mind trying out v0.8.3-beta.3? (beta instructions)
from homeassistant-ohme.
Beta release working for me too π
One minor issue is that it's disabling the price cap, but I can't see anything in the logs so might just be something on Ohme's end.
from homeassistant-ohme.
Cam here because I could not set the time - get this error with b3
Logger: custom_components.ohme.api_client
Source: custom_components/ohme/api_client.py:109
integration: Ohme (documentation, issues)
First occurred: 18:13:44 (2 occurrences)
Last logged: 18:14:02
Ohme API response error: /v1/chargeSessions/ohmeapp9oj6a/rule?enableMaxPrice=false&targetTs=1718306640000&enablePreconditioning=false&toPercent=100.0&preconditionLengthMins=None, 400; {"timestamp":1718298824487,"status":400,"error":"Bad Request","message":"Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "None"","path":"/v1/chargeSessions/ohmeapp9oj6a/rule"}
from homeassistant-ohme.
Thanks all for testing that, I'll release it as stable - apologies for not getting round to it sooner!
from homeassistant-ohme.
Related Issues (20)
- Connected car details HOT 5
- Energy Page Integration HOT 10
- App doesnβt show change password for Apple users HOT 3
- Charge session times in GMT not BST after DST change HOT 5
- integration stops wroking HOT 5
- Price cap doesn't support setting price cap limits under 1p (such as 0.1, or -3) HOT 3
- Would it be possible to inform Ohme of car charge level via this integration? HOT 4
- Energy usage difference between app and sensor HOT 5
- Custom tariff support HOT 3
- Battery SoC and Energy sensor values incorrect values HOT 18
- Slot Active sensor incorrect state HOT 2
- Upgrade to HA Core 2024.7.0 gives "Detected code that calls async_forward_entry_setup for integration ohme with title" HOT 2
- Strange behavior - charger getting enabled without trigger HOT 1
- charger charging when not wanted HOT 1
- Target Percentage changes not updating in the app HOT 2
- Max chars for Charge Slots HOT 3
- Error message when trying to change target percentage
- Unknown error occurred during setup (worked once then stopped) HOT 6
- HACS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-ohme.