Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
britkat1980 committed Jul 30, 2023
1 parent 34ddfd5 commit a362ef0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
6 changes: 4 additions & 2 deletions GivTCP/GivLUT.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ class GivLUT:
invippkl=GiV_Settings.cache_location+"/invIPList.pkl"


if "TZ" in os.environ:
if hasattr(GiV_Settings,'timezone'): # If in Addon, use the HA Supervisor timezone
timezone=zoneinfo.ZoneInfo(key=GiV_Settings.timezone)
elif "TZ" in os.environ: # Otherwise use the ENV (for Docker)
timezone=zoneinfo.ZoneInfo(key=os.getenv("TZ"))
else:
timezone=zoneinfo.ZoneInfo(key="Europe/London")
timezone=zoneinfo.ZoneInfo(key="Europe/London") # Otherwise Assume everyone is in UK!

# Standard values for devices
maxInvPower=11000
Expand Down
2 changes: 1 addition & 1 deletion buildx.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:2.3.20 -t britkat/giv_tcp-dev:latest --push .
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:2.3.24 -t britkat/giv_tcp-dev:latest --push .
::docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:latest --push .
::docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-ma:latest -t britkat/giv_tcp-ma:2.2.0 --push .
4 changes: 2 additions & 2 deletions startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def getInvDeets(HOST):
headers={'Content-Type':'application/json',
'Authorization': 'Bearer {}'.format(access_token)})
info=result.json()
SuperTimezone=info['timezone']
logger.info("Supervisor Timezone: "+str(info['timezone']))
SuperTimezone=info['data']['timezone']
logger.info("Supervisor Timezone: "+str(SuperTimezone))

#Get Host Details
url="http://supervisor/network/info"
Expand Down
18 changes: 15 additions & 3 deletions translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ configuration:
INVERTOR_AIO_1:
name: Inverter 1 - Is it an AIO?
description: >-
Does this firmware need the new modubs connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
Does this Inverter need the new modbus connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
INVERTOR_AC_1:
name: Inverter 1 - Is it on old firmware?
description: >-
Does this Inverter need the old modbus connection to work, only applies to old firmware releases. If unsure, leave it as False/off
HADEVICEPREFIX:
name: Inverter 1 - Home Assistant Entity Prefix
description: >-
Expand All @@ -31,7 +35,11 @@ configuration:
INVERTOR_AIO_2:
name: Inverter 2 - Is it an AIO?
description: >-
Does this firmware need the new modubs connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
Does this Inverter need the new modbus connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
INVERTOR_AC_2:
name: Inverter 2 - Is it on old firmware?
description: >-
Does this Inverter need the old modbus connection to work, only applies to old firmware releases. If unsure, leave it as False/off
HADEVICEPREFIX_2:
name: Inverter 2 - Home Assistant Entity Prefix
description: >-
Expand All @@ -47,7 +55,11 @@ configuration:
INVERTOR_AIO_3:
name: Inverter 3 - Is it an AIO?
description: >-
Does this firmware need the new modubs connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
Does this Inverter need the new modbus connection to work, only applies to AIO and future firmware releases. If unsure, leave it as False/off
INVERTOR_AC_3:
name: Inverter 3 - Is it on old firmware?
description: >-
Does this Inverter need the old modbus connection to work, only applies to old firmware releases. If unsure, leave it as False/off
HADEVICEPREFIX_3:
name: Inverter 3 - Home Assistant Entity Prefix
description: >-
Expand Down

0 comments on commit a362ef0

Please sign in to comment.