Changes timezonefinder defaults to use timezonefinder==6.2.0 instead of timezonefinderL==4.0.2 and TimezoneFinderL class instead of TimezoneFinder class. This fixes the startup problem caused by an import error due to timezonefinderL no longer working with the lates release of importlib-resources.
Note that if your composite configuration manually specifies the timezonefinderL package you will need to change the config accordingly (since you’re overriding the defaults.) E.g., change the tz_finder, and possibly tz_finder_class, options, or simply remove them.
I am still getting an error after Version 2.8.3 update.
First, it takes forever to start HA, it stays on Starting composite message. After HA reloads, composite is not loaded. I see this in the error logs:
Unable to install package timezonefinder==6.2.0: error: subprocess-exited-with-error × Building wheel for h3 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Traceback (most recent call last): File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup cmkr = cmaker.CMaker(cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__ self.cmake_version = get_cmake_version(self.cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version raise SKBuildError(msg) from err Problem with the CMake installation, aborting build. CMake executable is /tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for h3 ERROR: Could not build wheels for h3, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.1.2 -> 23.2 [notice] To update, run: pip install --upgrade pip
Thanks. device_or_utc or device_or_local should now work, and you must choose one of them if you want it to determine time zone from device location.
I can see by the error message that it’s trying to install v6.2.0 of timezonefinder, which is what I would expect given your configuration. I don’t know why that’s not working on your system. I tested this myself on HA OS, 2023.7.2 and it worked fine.
If you use device_or_local, does it fail on every HA restart? And by that, I mean a full restart, not just a config reload. I wonder if you’re experiencing some sort of temporary python package install issue.
That’s because it only tries to install and import timezonefinder if device_or_utc or device_or_local is used.
I doubt that will have any effect. There is some reason why your system is having a problem trying to install the timezonefinder Python package which I can’t explain. I’ve never seen the type of error you’re seeing (i.e., error building wheel for h3 (pyproject.toml).) I have no idea why that is happening, or what to do about it.
The composite integration is different in the way it handles this sort of thing. Normally a required package is specified in the manifest.json file and HA takes care of installing it. But since I wanted to avoid having this package (and its required packages) installed if the user wasn’t using the time zone lookup feature, and because there are two different timezonefinder package options, the composite integration handles installing the desired package. But now that the timezonefinderL package is no longer usable, maybe I should just change the composite integration to use the standard method to have the timezonefinder package installed, whether or not it’s used. Hmm…
I’m going to completely uninstall and reinstall the package to see if that has anything to do with it. If I am the only one with the issue, then it has to be something unique to my setup I am guessing, although I would have no idea what or where to even start looking LOL.
Fair enough. Let me know how it goes, and feel free to private message me if you like.
If you can’t get it to work, I could try creating a beta release that installs the package the standard way. Then you could try that out and see if it helps.
I am not really sure what device_or_local or device really does anyway. Am I better off just leaving it as local and call it good, or is there another reason to use device_or_local?
FWIW, at least two other people have reported the same errors trying to install timezonefinder. Can you tell me, what is the hardware platform on which you are running HA?
Ok, thanks. That’s another tick in the “doesn’t work on ARM” column.
I know you don’t need the time zone determination feature, but could you try an experiment for me, to hopefully help solve this for others that do? If so, could you temporarily add the following to your composite config, change the time_as option back to device_or_local, restart, and let me know how it works?
timezonefinder>=6 changed its build infrastructure and started using the h3 package, which seems to break on ARM targets. Going back to version 5.2.0 of timezonefinder seems to avoid those problems.
I just came across this and TRIED it but didn’t have luck with what I was trying to achieve. I have two sets of keys and each one has their own BLE tracker which HA sees just fine as a device_tracker. I was trying to combine them into a single device and if ONE of the two is gone it would flag the whole composite device_tracker to not_home. Any thoughts?