Skip to content

Commit

Permalink
fix: define available property
Browse files Browse the repository at this point in the history
It will allow us to satisfy Silver integration quality
  • Loading branch information
IATkachenko committed Dec 30, 2020
1 parent b92c03b commit 00b63f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/sleep_as_android/manifest.json
Expand Up @@ -6,5 +6,5 @@
"dependencies": ["mqtt"],
"codeowners": ["@IATkachenko"],
"config_flow": true,
"quality_scale": "No score"
"quality_scale": "silver"
}
4 changes: 4 additions & 0 deletions custom_components/sleep_as_android/sensor.py
Expand Up @@ -91,3 +91,7 @@ def unique_id(self) -> str:
def icon(self):
"""Return the icon."""
return "mdi:sleep"

@property
def available(self) -> bool:
return self.state != STATE_UNKNOWN

0 comments on commit 00b63f6

Please sign in to comment.