Clean up code

This commit is contained in:
Mike Cifelli 2023-02-07 12:52:52 -05:00
parent 56342923ee
commit 47355d820d
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class SensorServer(Server):
return templates.render( return templates.render(
f'www/{path or self.default_path}', f'www/{path or self.default_path}',
datetime=util.datetime(), datetime=util.datetime(),
temperature=self.getTemperatureTextValue(), temperature=self.temperatureTextValue(),
waterStatus=self.waterTextValue(), waterStatus=self.waterTextValue(),
waterClass=self.waterCssClass() waterClass=self.waterCssClass()
) )
@ -72,7 +72,7 @@ class SensorServer(Server):
'temperature': self.mcp.get_temp() 'temperature': self.mcp.get_temp()
} }
def getTemperatureTextValue(self): def temperatureTextValue(self):
return round(self.mcp.get_temp(), 2) return round(self.mcp.get_temp(), 2)
def waterTextValue(self): def waterTextValue(self):