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

Fix NoneType value for blade.reset_at property #598

Merged
merged 1 commit into from
May 6, 2024

Conversation

mk-maddin
Copy link
Contributor

Fix issue where "reset_at" blade property exists but is of none type (this e.g. happens with model "Landroid S500 (WR105SI.1)").

ERROR (MainThread) [homeassistant.util.logging] Exception in handle_update when dispatching 'landroid_cloud_update_alt': ()
Traceback (most recent call last):
File "/config/custom_components/landroid_cloud/device_base.py", line 1035, in handle_update
new_val = self.entity_description.value_fn(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/landroid_cloud/sensor.py", line 117, in <lambda>
round(landroid.blades["reset_at"] / 60, 2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

@MTrab MTrab added bug Something isn't working patch For patch versions labels May 6, 2024
@MTrab MTrab merged commit bf2b3cc into MTrab:master May 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch For patch versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants