Skip to content

Commit

Permalink
Merge pull request #44 from andrey-git:auto-off
Browse files Browse the repository at this point in the history
Add auto off
  • Loading branch information
gjohansson-ST authored May 6, 2023
2 parents 71818cb + 9afdd77 commit c2c1e33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pysensibo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ async def async_get_devices_data(self) -> SensiboData:
humidity = measure.get("humidity")
location = dev["location"]["id"]
location_name = dev["location"]["name"]
auto_off = dev["autoOffEnabled"]
auto_off_minutes = dev["autoOffMinutes"]

# Add in new sensors for AirQ + Element model
tvoc = measure.get("tvoc")
Expand Down Expand Up @@ -379,9 +381,11 @@ async def async_get_devices_data(self) -> SensiboData:
rcda=rcda,
location_id=location,
location_name=location_name,
anti_mold_running = anti_mold_running,
anti_mold_enabled = anti_mold_enabled,
anti_mold_fan_time = anti_mold_fan_time
anti_mold_running=anti_mold_running,
anti_mold_enabled=anti_mold_enabled,
anti_mold_fan_time=anti_mold_fan_time,
auto_off=auto_off,
auto_off_minutes=auto_off_minutes,
)

return SensiboData(raw=data, parsed=device_data)
Expand Down
2 changes: 2 additions & 0 deletions pysensibo/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ class SensiboDevice:
anti_mold_running: bool | None
anti_mold_enabled: bool | None
anti_mold_fan_time: int | None
auto_off: bool
auto_off_minutes: int | None


@dataclass
Expand Down

0 comments on commit c2c1e33

Please sign in to comment.