How to use the pytile.errors.TileError function in pytile

To help you get started, we’ve selected a few pytile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bachya / pytile / examples / test_api.py View on Github external
async def main():
    """Run."""
    async with ClientSession() as session:
        try:
            # Create a client:
            client = await async_login("", "", session=session)

            print("Showing active Tiles:")
            print(await client.tiles.all())

            print("Showing all Tiles:")
            print(await client.tiles.all(show_inactive=True))
        except TileError as err:
            print(err)
github home-assistant / home-assistant / homeassistant / components / tile / device_tracker.py View on Github external
async def async_init(self):
        """Further initialize connection to the Tile servers."""
        try:
            await self._client.async_init()
        except TileError as err:
            _LOGGER.error("Unable to set up Tile scanner: %s", err)
            return False

        await self._async_update()

        async_track_time_interval(self._hass, self._async_update, DEFAULT_SCAN_INTERVAL)

        return True
github bachya / pytile / pytile / errors.py View on Github external
"""Define package errors."""


class TileError(Exception):
    """Define a base error."""

    pass


class RequestError(TileError):
    """Define an error related to invalid requests."""

    pass


class SessionExpiredError(TileError):
    """Define an error for when a Tile app session expires."""

    pass
github bachya / pytile / pytile / errors.py View on Github external
"""Define package errors."""


class TileError(Exception):
    """Define a base error."""

    pass


class RequestError(TileError):
    """Define an error related to invalid requests."""

    pass


class SessionExpiredError(TileError):
    """Define an error for when a Tile app session expires."""

    pass

pytile

A simple Python API for Tile® Bluetooth trackers

MIT
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis

Similar packages