Skip to content

Commit

Permalink
Merge pull request #30 from KrzysztofHajdamowicz/fix/2022.3.0
Browse files Browse the repository at this point in the history
Rename Vacuum to ViomiVacuum (HA 2022.3.0 compatibility)
  • Loading branch information
KrzysztofHajdamowicz authored Mar 8, 2022
2 parents 47cbc75 + 92f8195 commit 0bba5b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions custom_components/miio2/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"domain": "miio2",
"name": "Xiaomi miio vacuum STYJ02YM",
"version": "2021.8.0",
"version": "2022.3.3",
"documentation": "https://github.com/KrzysztofHajdamowicz/home-assistant-vacuum-styj02ym",
"requirements": [
"construct==2.10.56",
"python-miio==0.5.9.1"
"python-miio==0.5.11"
],
"dependencies": [],
"codeowners": ["@nqkdev", "@KrzysztofHajdamowicz"],
Expand Down
6 changes: 3 additions & 3 deletions custom_components/miio2/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial
import logging

from miio import DeviceException, Vacuum # pylint: disable=import-error
from miio import ViomiVacuum, DeviceException # pylint: disable=import-error
import voluptuous as vol

from homeassistant.components.vacuum import (
Expand Down Expand Up @@ -195,7 +195,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=

# Create handler
_LOGGER.info("Initializing with host %s (token %s...)", host, token[:5])
vacuum = Vacuum(host, token)
vacuum = ViomiVacuum(host, token)

mirobo = MiroboVacuum2(name, vacuum)
hass.data[DATA_KEY][host] = mirobo
Expand Down Expand Up @@ -295,7 +295,7 @@ def fan_speed_list(self):
return list(sorted(FAN_SPEEDS.keys(), key=lambda s: FAN_SPEEDS[s]))

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the specific state attributes of this vacuum cleaner."""
attrs = {}
if self.vacuum_state is not None:
Expand Down

0 comments on commit 0bba5b0

Please sign in to comment.