Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Nov 6, 2023
1 parent e4e0f5c commit 8e52ed9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wideboy/scenes/default/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ class TileBatteryDischargeRemainingTime(HomeAssistantEntityTile):

def process(self, state):
value = state.get("sensor.delta_2_max_downstairs_discharge_remaining_time", 0)
hours, mins = value // 60, value % 60
self.visible = value > 0
self.label = f"{value:.0f}m"
self.label = f"{hours:.0f}m{mins:.0f}m"


class TileBatteryChargeRemainingTime(HomeAssistantEntityTile):
Expand All @@ -212,8 +213,9 @@ class TileBatteryChargeRemainingTime(HomeAssistantEntityTile):

def process(self, state):
value = state.get("sensor.delta_2_max_downstairs_charge_remaining_time", 0)
hours, mins = value // 60, value % 60
self.visible = value > 0
self.label = f"{value:.0f}m"
self.label = f"{hours:.0f}m{mins:.0f}m"


class TileBatteryAcInPower(HomeAssistantEntityTile):
Expand Down

0 comments on commit 8e52ed9

Please sign in to comment.