Comments (6)
Can you please run the command cat /etc/timezone
. This will provide the timezone that Home Assistant OS has defined. You'll need to be within the Home Assistant OS shell terminal when running the command. The env command you ran returns what the TZ variable is set to within the docker container that resides inside of the OS.
Edit: Also, run the Disregard: The Home Assistant container within Home Assistant OS doesn't use cat /etc/timezone
command within the Home Assistant container - this will let us know if the time zone in the /etc/timezone file (within the docker container) conflicts with the TZ environment variable that is defined for the HA docker container within Home Assistant OS./etc/timezone
.
Edit 2: Add tzlocal: debug
to logger
in your configuration.yaml
file, save it, then restart Home Assistant. After Home Assistant restarts, look at your full Home Assistant logs to see what/if any debug logging is returned by the tzlocal
library which this integration uses to get your system's timezone name.
Edit 3: To see if the tzlocal library is able to find the TZ env variable - In the terminal (as seen in your screenshot), run the command python -c "import os; print(os.environ.get(\"TZ\"))"
. This is the command that the tzlocal library is using under the hood to determine the timezone name.
from home-assistant-petkit.
Here is output from Home Assistant OS, it seems time zone didn't set:
There is full logs:
2023-09-22 13:11:09.575 DEBUG (MainThread) [tzlocal] Found a TZ environment: Asia/Ho_Chi_Minh
2023-09-22 13:11:09.575 DEBUG (MainThread) [tzlocal] TZ does not contain a time zone name
2023-09-22 13:11:10.849 ERROR (MainThread) [custom_components.petkit] A timezone could not be found. If you are running Home Assistant as a standalone Docker container, you must define the TZ environmental variable.
from home-assistant-petkit.
Home Assistant OS does have a timezone set (Etc/UTC), so there is no issue there.
This seems to be a bug with the tzlocal library. Based on their code, the reason it is failing is because Asia/Ho_Chi_Minh is missing from their list. So, this isn't anything wrong on your end, rather, a missing timezone in their code.
from home-assistant-petkit.
I raised an issue with the maintainer of the library, but until that is fixed on their end and a new version of tzlocal is pushed out, the Asia/Ho_Chi_Minh
timezone won't work. I do see that the Asia/Bangkok
timezone has the same offset as Asia/Ho_Chi_Minh
- In the meantime, if you set your timezone to Bangkok
via the Home Assistant GUI, you should be able to use this integration.
from home-assistant-petkit.
Disregard the comment above. I am working on implementing a Timezone option in the configuration flow where you'll be able to select Asia/Ho_Chi_Minh
as an option - this way you won't have to change your timezone in Home Assistant and we don't have to wait on the tzlocal library maintainer to update his code.
from home-assistant-petkit.
@cybersea54 Upgrade to version 0.1.10
and select Asia/Ho_Chi_Minh
as your timezone during the integration setup.
from home-assistant-petkit.
Related Issues (20)
- Cat weight HOT 3
- PETKIT Stainless Steel Cat Water Fountain HOT 1
- Avatar URLs HOT 4
- Integration not supported in UI? HOT 2
- Support for YumShare Solo HOT 13
- Litter level & weight always zero HOT 7
- Pet weight rounded on pura max HOT 3
- very sporadic updates HOT 1
- Battery state and status - Infinity Feeder HOT 3
- Would it be possible to support trackers via API pooling? HOT 5
- Eversweet Max support HOT 10
- Missing "Adsorption Enhance" switch HOT 9
- Eversweet energy usage HOT 5
- Feeding schedule HOT 2
- Update Discord invitation link please. HOT 1
- Eversweet Max HOT 6
- HA restart causes the feeder solo to trigger the meal function HOT 4
- Issues on pura max HOT 5
- Hack for local control HOT 1
- support for petkit yumshare dual-hopper with camera HOT 1
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 home-assistant-petkit.