Skip to content

Commit

Permalink
Added air purifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Nov 18, 2023
1 parent f742d6a commit 175bcb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wideboy/scenes/default/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
GridTileVPN,
GridTileTransmission,
GridTileDS920Plus,
GridTileLoungeAirPM2,
GridTileSpeedtestDownload,
GridTileSpeedtestUpload,
GridTileSpeedtestPing,
Expand Down Expand Up @@ -212,6 +213,7 @@ def setup(self):
# SENSORS

hass_grid_sensors_entities = [
GridTileLoungeAirPM2(),
GridTileDS920Plus(),
]

Expand Down
9 changes: 9 additions & 0 deletions wideboy/scenes/default/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ def process(self, state):
# SENSORS


class GridTileLoungeAirPM2(HomeAssistantEntityGridTile):
icon = MaterialIcons.MDI_AC_UNIT

def process(self, state):
value = int(state.get("sensor.core_300s_pm2_5", 0))
self.visible = value > 0
self.label = f"{value}"


class GridTileBinCollection(HomeAssistantEntityGridTile):
icon = MaterialIcons.MDI_DELETE

Expand Down

0 comments on commit 175bcb6

Please sign in to comment.