Skip to content

Commit

Permalink
Merge pull request #4 from epenet/dev
Browse files Browse the repository at this point in the history
Update Platform_Schema
Fixes #3
  • Loading branch information
epenet authored Sep 4, 2019
2 parents b308d97 + 24e7e52 commit 2b21a12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions custom_components/resolvbus/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"domain": "resolvbus",
"name": "Resol VBUS",
"documentation": "https://github.com/epenet/hassResolVbus",
"dependencies": [],
"codeowners": ["@epenet"],
"requirements": ["pyserial-asyncio==0.4"]
}
10 changes: 6 additions & 4 deletions custom_components/resolvbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_NAME): cv.string,
vol.Optional(CONF_NAME): cv.string,
vol.Required(CONF_NAME): cv.string,
vol.Required(CONF_NAME): cv.string,
vol.Optional('ttyPort'): cv.string,
vol.Optional('filterSource'): cv.string,
vol.Optional('filterDestination'): cv.string,
vol.Optional('filterCommand'): cv.string,
vol.Optional('attributes'): vol.All(cv.ensure_list),
})


Expand Down Expand Up @@ -124,7 +126,7 @@ async def async_update(self):
elif self._ttyPort is not None:
buffer = await self.async_readFromSerial(self._ttyPort, self._filterSource, self._filterDestination, self._filterCommand)
self.process_buffer(buffer)
except VBUSPacketException as e:
except Exception as e:
_LOGGER.error("Update failed: %s" % e)

async def async_readFromSerial(self, port, source=None, destination=None, command=None):
Expand Down

0 comments on commit 2b21a12

Please sign in to comment.