Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify meaning of filter_status property #480

Merged
merged 3 commits into from Apr 23, 2022

Conversation

ggravlingen
Copy link
Member

@ggravlingen ggravlingen commented Apr 22, 2022

Six months have passed since I installed the filter on the device and the filter_lifetime_remaining property now reports a negative value of 31 minutes. In the app, there is an indicator that the filter expires today.

I therefore propose this clarification to the filter_status property.

DeviceResponse(
  id=65554,
  name='Luftrenare',
  created_at=1634661517,
  ota_update_state=0,
  air_purifier_control=[
    AirPurifierResponse(
      id=0,
      air_quality=11,
      controls_locked=0,
      fan_speed=10,
      filter_lifetime_remaining=-31,
      filter_lifetime_total=259200,
      filter_runtime=259231,
      filter_status=1,
      leds_off=0,
      mode=1,
      motor_runtime_total=259231
   )
],

application_type=10,
blind_control=None,
device_info=DeviceInfoResponse(manufacturer='IKEA of Sweden', model_number='STARKVIND Air purifier', serial='',firmware_version='1.0.033', power_source=1, battery_level=None),
last_seen=1650565905,
light_control=None,
reachable=1,
signal_repeater_control=None,
socket_control=None
)

@ggravlingen
Copy link
Member Author

Just noticed there was a red light on the purifier which normally isn't there. After replacing the filter and pressing the reset-button, the red light is no longer lit.


This property is true when filter_lifetime_remaining is less than zero.
"""
return bool(self.raw.filter_status)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change although minor I would say. Booleans are subclass of integers so it will behave mostly the same, just the type will be different.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, a major version bump in a follow up?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good to stay consistent with semver.

@ggravlingen ggravlingen merged commit a2a3ee3 into master Apr 23, 2022
@ggravlingen ggravlingen deleted the clarity-meaning-of-filter_status branch April 23, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants