Skip to content

Commit

Permalink
Add version in manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
tykarol committed Apr 10, 2021
1 parent 4b2db42 commit 45736ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion custom_components/viomi_vacuum_v8/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "viomi_vacuum_v8",
"name": "Viomi Vacuum V8",
"version": "1.0.0",
"version": "1.2.0",
"documentation": "https://github.com/tykarol/home-assistant-viomi-vacuum-v8",
"requirements": [
"construct==2.10.59",
Expand Down
10 changes: 2 additions & 8 deletions custom_components/viomi_vacuum_v8/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,8 @@ 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])

try:
miio_device = Device(host, token)
device_info = miio_device.info()
except DeviceException:
raise PlatformNotReady

vacuum = Vacuum(host, token)
device = ViomiVacuumRobot(name, vacuum)
device = ViomiVacuumEntity(name, vacuum)
hass.data[DATA_KEY][host] = device

async_add_entities([device], update_before_add=True)
Expand Down Expand Up @@ -223,7 +217,7 @@ async def async_service_handler(service):
)


class ViomiVacuumRobot(StateVacuumEntity):
class ViomiVacuumEntity(StateVacuumEntity):
"""Representation of a Viomi Vacuum V8 robot."""

def __init__(self, name, vacuum):
Expand Down

0 comments on commit 45736ea

Please sign in to comment.