Skip to content

Commit b29e56f

Browse files
committed
Update README to include HomeAssistant support and add timezone handling in main execution -fix Docker: Zeitzone Logger UTC? #3
1 parent fdac070 commit b29e56f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Configuration is described here [CONFIG_README](src/CONFIG_README.md)
9999

100100
## Usage
101101

102-
The application will start fetching energy data from OpenHAB and processing it according to the defined logic in `src/eos_connect.py`. You can access the web interface at `http://localhost:8081`.
102+
The application will start fetching energy data from OpenHAB or HomeAssistant and processing it according to the defined logic in `src/eos_connect.py`. You can access the web interface at `http://localhost:8081`.
103103

104104
## Contributing
105105

src/eos_connect.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,16 @@ def get_optimize_response():
749749

750750

751751
if __name__ == "__main__":
752+
try:
753+
tz = os.environ['TZ']
754+
logger.info("[MAIN] host system time zone is %s", tz)
755+
except KeyError:
756+
logger.info(
757+
"[MAIN] host system time zone was not set. Setting to %s",
758+
config_manager.config['time_zone']
759+
)
760+
os.environ['TZ'] = config_manager.config['time_zone']
761+
752762
# initial config
753763
# set_config_value("latitude", 48.812)
754764
# set_config_value("longitude", 8.907)

0 commit comments

Comments
 (0)