fix query_server_time
This commit is contained in:
parent
4db6a97733
commit
7087c2356c
3
main.py
3
main.py
@ -367,7 +367,8 @@ class GadgetbridgeMQTTPublisher:
|
|||||||
|
|
||||||
def query_server_time(self, cursor) -> Any:
|
def query_server_time(self, cursor) -> Any:
|
||||||
"""Return current server time in ISO 8601 format for Home Assistant timestamp"""
|
"""Return current server time in ISO 8601 format for Home Assistant timestamp"""
|
||||||
return datetime.now().isoformat()
|
# .astimezone() adds the system's local timezone offset (e.g., +01:00)
|
||||||
|
return datetime.now().astimezone().isoformat()
|
||||||
|
|
||||||
def get_sensor_data(self) -> Dict[str, Any]:
|
def get_sensor_data(self) -> Dict[str, Any]:
|
||||||
"""Query all sensors and return their values as a dict"""
|
"""Query all sensors and return their values as a dict"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user