Add timezone to info call (#1146)

This commit is contained in:
Pascal Vizeli 2019-07-04 18:20:46 +02:00 committed by GitHub
parent 0a34f427f8
commit 0a3a752b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
API.md
View File

@ -730,7 +730,8 @@ return:
"arch": "arch",
"supported_arch": ["arch1", "arch2"],
"channel": "stable|beta|dev",
"logging": "debug|info|warning|error|critical"
"logging": "debug|info|warning|error|critical",
"timezone": "Europe/Zurich"
}
```

View File

@ -14,6 +14,7 @@ from ..const import (
ATTR_MACHINE,
ATTR_SUPERVISOR,
ATTR_SUPPORTED_ARCH,
ATTR_TIMEZONE,
)
from ..coresys import CoreSysAttributes
from .utils import api_process
@ -37,4 +38,5 @@ class APIInfo(CoreSysAttributes):
ATTR_SUPPORTED_ARCH: self.sys_arch.supported,
ATTR_CHANNEL: self.sys_updater.channel,
ATTR_LOGGING: self.sys_config.logging,
ATTR_TIMEZONE: self.sys_timezone,
}