Skip to content

Commit

Permalink
Python code is blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh authored and github-actions[bot] committed Apr 28, 2024
1 parent f0b1bf3 commit 898e250
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions terrariumEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, version):
"too_late": 0,
"systemd": sdnotify.SystemdNotifier(),
"asyncio": terrariumAsync(),
"cache" : terrariumCache(),
"cache": terrariumCache(),
}

# Create a salt for encryption. And set it as environment variable
Expand Down Expand Up @@ -1908,7 +1908,7 @@ def get_power_usage_water_flow(self):
@property
def total_power_and_water_usage(self):
cacheKey = "total_power_water"
data = self.__engine['cache'].get_data(cacheKey)
data = self.__engine["cache"].get_data(cacheKey)
if data is not None:
return data

Expand Down Expand Up @@ -1937,6 +1937,6 @@ def total_power_and_water_usage(self):

result = {"total_watt": data[0][1], "total_flow": data[0][2], "duration": data[0][3]}
# Cache for 1 hour, which is the same amount of forcing new relay data to the database
self.__engine['cache'].set_data(cacheKey, result, 3600)
self.__engine["cache"].set_data(cacheKey, result, 3600)

return result

0 comments on commit 898e250

Please sign in to comment.