Skip to content

Commit

Permalink
change deprecated getFloat to get_float.
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Apr 16, 2022
1 parent cdae1ef commit d403383
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octoprint_tplinksmartplug/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def on_event(self, event, payload):
self._autostart_file = None
return
# Print Started Event
if event == Events.PRINT_STARTED and self._settings.getFloat(["cost_rate"]) > 0:
if event == Events.PRINT_STARTED and self._settings.get_float(["cost_rate"]) > 0:
self.print_job_started = True
self._tplinksmartplug_logger.debug(payload.get("path", None))
for plug in self._settings.get(["arrSmartplugs"]):
Expand Down Expand Up @@ -720,7 +720,7 @@ def on_event(self, event, payload):
self._tplinksmartplug_logger.debug("hours: %s" % hours)
power_used = self.print_job_power * hours
self._tplinksmartplug_logger.debug("power used: %s" % power_used)
power_cost = power_used * self._settings.getFloat(["cost_rate"])
power_cost = power_used * self._settings.get_float(["cost_rate"])
self._tplinksmartplug_logger.debug("power total cost: %s" % power_cost)

self._storage_interface = self._file_manager._storage(payload.get("origin", "local"))
Expand Down

0 comments on commit d403383

Please sign in to comment.