@filcole When restarting HA with you lastest changes on github got an error in custom_components.sensor.nissan_leaf.
File “/usr/src/app/homeassistant/loader.py”, line 117, in _load_file module = importlib.import_module(path) File “/usr/local/lib/python3.6/importlib/init.py”, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 994, in _gcd_import File “<frozen importlib._bootstrap>”, line 971, in _find_and_load File “<frozen importlib._bootstrap>”, line 955, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 665, in _load_unlocked File “<frozen importlib._bootstrap_external>”, line 678, in exec_module File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed File “/config/custom_components/sensor/nissan_leaf.py”, line 11, in <module> from homeassistant.components.nissan_leaf import ( ModuleNotFoundError: No module named ‘homeassistant.components.nissan_leaf’
What I did next was to create “HASSIO\config\custom_components” (you need to ssh in to HA or use samba )
The next trick is to open all the “nissan_leaf.py” files and replace “from homeassistant.components.nissan_leaf import (” with: " from …nissan_leaf import ("
So I’ve been making some more fixes to the nissan_leaf component. It now exposes on attributes the next scheduled update, the time of the last attempted update was started, if an update is in progress, and the last date that the battery, climate and location were updated.
There’s also a new service that can be called to manually trigger an update. nissan_leaf.update, that must be passed the VIN number of the car (in case of multiple cars)
I think this might be improved/changed in future because I don’t like using the vin number. Have choices between the nickname of the car, or an entity_id from home assistant.
So the HomeAssistant core developers have had a review of the pull request and have requested some changes reasonable changes before this pull request can be reviewed again.
Thanks, I did it the old way (sensor, binary_sensor and switch folders with nissan_leaf.py) in it from the latest branch.
It did not work because of the missing “pycarwings2”, how do I install pycarwings2?
Should it install automatically?
I expect the same behavior with the “this post files”. Or not?
Update:
so I guess it should install automatically, however it might take too long so raspberry gives up: