Giter Club home page Giter Club logo

Comments (11)

nyordanov avatar nyordanov commented on August 25, 2024 1

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:

  1. Auto approvals based on car location (if the button works, that is)
  2. 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 on charge from 55% to 80%)

from homeassistant-ohme.

Begie1605 avatar Begie1605 commented on August 25, 2024 1

Had the same problem, and with beta release it works now....

from homeassistant-ohme.

dan-r avatar dan-r commented on August 25, 2024 1

Resolved by #81

from homeassistant-ohme.

dan-r avatar dan-r commented on August 25, 2024

Interesting - was there a car plugged in when you saw this?

from homeassistant-ohme.

nyordanov avatar nyordanov commented on August 25, 2024

Yes

from homeassistant-ohme.

dan-r avatar dan-r commented on August 25, 2024

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.

nyordanov avatar nyordanov commented on August 25, 2024

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.

dan-r avatar dan-r commented on August 25, 2024

@nyordanov think I've figured it out. Would you mind trying out v0.8.3-beta.3? (beta instructions)

from homeassistant-ohme.

simonjharris avatar simonjharris commented on August 25, 2024

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.

dmsims avatar dmsims commented on August 25, 2024

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.

dan-r avatar dan-r commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.