How to use aiopvapi - 4 common examples

To help you get started, we’ve selected a few aiopvapi 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 / hunterdouglas_powerview / scene.py View on Github external
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
    """Set up home assistant scene entries."""

    hub_address = config.get(HUB_ADDRESS)
    websession = async_get_clientsession(hass)

    pv_request = AioRequest(hub_address, loop=hass.loop, websession=websession)

    _scenes = await Scenes(pv_request).get_resources()
    _rooms = await Rooms(pv_request).get_resources()

    if not _scenes or not _rooms:
        _LOGGER.error("Unable to initialize PowerView hub: %s", hub_address)
        return
    pvscenes = (
        PowerViewScene(hass, PvScene(_raw_scene, pv_request), _rooms)
        for _raw_scene in _scenes[SCENE_DATA]
    )
    async_add_entities(pvscenes)
github home-assistant / home-assistant / homeassistant / components / hunterdouglas_powerview / scene.py View on Github external
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
    """Set up home assistant scene entries."""

    hub_address = config.get(HUB_ADDRESS)
    websession = async_get_clientsession(hass)

    pv_request = AioRequest(hub_address, loop=hass.loop, websession=websession)

    _scenes = await Scenes(pv_request).get_resources()
    _rooms = await Rooms(pv_request).get_resources()

    if not _scenes or not _rooms:
        _LOGGER.error("Unable to initialize PowerView hub: %s", hub_address)
        return
    pvscenes = (
        PowerViewScene(hass, PvScene(_raw_scene, pv_request), _rooms)
        for _raw_scene in _scenes[SCENE_DATA]
    )
    async_add_entities(pvscenes)
github home-assistant / home-assistant / homeassistant / components / hunterdouglas_powerview / scene.py View on Github external
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
    """Set up home assistant scene entries."""

    hub_address = config.get(HUB_ADDRESS)
    websession = async_get_clientsession(hass)

    pv_request = AioRequest(hub_address, loop=hass.loop, websession=websession)

    _scenes = await Scenes(pv_request).get_resources()
    _rooms = await Rooms(pv_request).get_resources()

    if not _scenes or not _rooms:
        _LOGGER.error("Unable to initialize PowerView hub: %s", hub_address)
        return
    pvscenes = (
        PowerViewScene(hass, PvScene(_raw_scene, pv_request), _rooms)
        for _raw_scene in _scenes[SCENE_DATA]
    )
    async_add_entities(pvscenes)
github home-assistant / home-assistant / homeassistant / components / hunterdouglas_powerview / scene.py View on Github external
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
    """Set up home assistant scene entries."""

    hub_address = config.get(HUB_ADDRESS)
    websession = async_get_clientsession(hass)

    pv_request = AioRequest(hub_address, loop=hass.loop, websession=websession)

    _scenes = await Scenes(pv_request).get_resources()
    _rooms = await Rooms(pv_request).get_resources()

    if not _scenes or not _rooms:
        _LOGGER.error("Unable to initialize PowerView hub: %s", hub_address)
        return
    pvscenes = (
        PowerViewScene(hass, PvScene(_raw_scene, pv_request), _rooms)
        for _raw_scene in _scenes[SCENE_DATA]
    )
    async_add_entities(pvscenes)

aiopvapi

Powerview blinds API wrapper

BSD-3-Clause
Latest version published 9 months ago

Package Health Score

50 / 100
Full package analysis