How to use the pyatmo.InvalidHome function in pyatmo

To help you get started, we’ve selected a few pyatmo 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 home-assistant / home-assistant / homeassistant / components / netatmo / climate.py View on Github external
def setup(self):
        """Retrieve HomeData by NetAtmo API."""
        try:
            self.homedata = pyatmo.HomeData(self.auth)
            self.home_id = self.homedata.gethomeId(self.home)
        except TypeError:
            _LOGGER.error("Error when getting home data")
        except AttributeError:
            _LOGGER.error("No default_home in HomeData")
        except pyatmo.NoDevice:
            _LOGGER.debug("No thermostat devices available")
        except pyatmo.InvalidHome:
            _LOGGER.debug("Invalid home %s", self.home)

pyatmo

Simple API to access Netatmo weather station data from any Python 3 script. Designed for Home Assistant (but not only)

MIT
Latest version published 3 months ago

Package Health Score

75 / 100
Full package analysis