mirror of
https://github.com/vikt0rm/dbus-goecharger.git
synced 2025-08-01 03:04:27 +02:00
Make AC-Position configurable
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
AccessType = OnPremise
|
||||
SignOfLifeLog = 1
|
||||
Deviceinstance = 43
|
||||
# Go-e charger hardware version: 1 = v1, 2 = v2, 3 = v3
|
||||
# Go-e charger hardware version: 1 = v1, 2 = v2, 3 = v3, 4 = v4
|
||||
HardwareVersion = 4
|
||||
# Go-e charger AC-Position: 0 = AC out, 1 = AC in
|
||||
AcPosition = 0
|
||||
|
||||
[ONPREMISE]
|
||||
Host=192.168.178.51
|
||||
|
@@ -26,6 +26,7 @@ class DbusGoeChargerService:
|
||||
config = self._getConfig()
|
||||
deviceinstance = int(config['DEFAULT']['Deviceinstance'])
|
||||
hardwareVersion = int(config['DEFAULT']['HardwareVersion'])
|
||||
acPosition = int(config['DEFAULT']['AcPosition'])
|
||||
|
||||
self._dbusservice = VeDbusService("{}.http_{:02d}".format(servicename, deviceinstance), register=False)
|
||||
self._paths = paths
|
||||
@@ -61,6 +62,7 @@ class DbusGoeChargerService:
|
||||
self._dbusservice.add_path('/HardwareVersion', hardwareVersion)
|
||||
self._dbusservice.add_path('/Connected', 1)
|
||||
self._dbusservice.add_path('/UpdateIndex', 0)
|
||||
self._dbusservice.add_path('/Ac/Position', acPosition)
|
||||
|
||||
# add paths without units
|
||||
for path in paths_wo_unit:
|
||||
|
Reference in New Issue
Block a user