Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions home-assistant-plugin/custom_components/buspro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from homeassistant.const import (
EVENT_HOMEASSISTANT_STOP)

REQUIREMENTS = ['https://github.com/eyesoft/pybuspro/archive/master.zip#pybuspro==0.0.1']

_LOGGER = logging.getLogger(__name__)

DOMAIN = "buspro"
Expand Down Expand Up @@ -105,7 +107,7 @@ def __init__(self, hass, config):
def init_hdl(self):
"""Initialize of Buspro object."""
# noinspection PyUnresolvedReferences
from ..pybuspro.buspro import Buspro
from pybuspro.buspro import Buspro
self.hdl = Buspro(self.gateway_address_send_receive, self.hass.loop)
# self.hdl.register_telegram_received_all_messages_cb(self.telegram_received_cb)

Expand All @@ -123,7 +125,7 @@ async def stop(self, event):
async def service_activate_scene(self, call):
"""Service for activatign a __scene"""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices.scene import Scene
from pybuspro.devices.scene import Scene

attr_address = call.data.get(SERVICE_BUSPRO_ATTR_ADDRESS)
attr_scene_address = call.data.get(SERVICE_BUSPRO_ATTR_SCENE_ADDRESS)
Expand All @@ -133,7 +135,7 @@ async def service_activate_scene(self, call):
async def service_send_message(self, call):
"""Service for send an arbitrary message"""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices.generic import Generic
from pybuspro.devices.generic import Generic

attr_address = call.data.get(SERVICE_BUSPRO_ATTR_ADDRESS)
attr_payload = call.data.get(SERVICE_BUSPRO_ATTR_PAYLOAD)
Expand All @@ -143,7 +145,7 @@ async def service_send_message(self, call):

async def service_set_universal_switch(self, call):
# noinspection PyUnresolvedReferences
from ..pybuspro.devices.universal_switch import UniversalSwitch
from pybuspro.devices.universal_switch import UniversalSwitch

attr_address = call.data.get(SERVICE_BUSPRO_ATTR_ADDRESS)
attr_switch_number = call.data.get(SERVICE_BUSPRO_ATTR_SWITCH_NUMBER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
async def async_setup_platform(hass, config, async_add_entites, discovery_info=None):
"""Set up Buspro switch devices."""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices import Sensor
from pybuspro.devices import Sensor

hdl = hass.data[DATA_BUSPRO].hdl
devices = []
Expand Down
6 changes: 3 additions & 3 deletions home-assistant-plugin/custom_components/buspro/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
# from homeassistant.helpers.entity import Entity
from ..buspro import DATA_BUSPRO
# noinspection PyUnresolvedReferences
from ..pybuspro.devices.climate import ControlFloorHeatingStatus
from pybuspro.devices.climate import ControlFloorHeatingStatus
# noinspection PyUnresolvedReferences
from ..pybuspro.helpers.enums import OnOffStatus
from pybuspro.helpers.enums import OnOffStatus

_LOGGER = logging.getLogger(__name__)

Expand All @@ -41,7 +41,7 @@
async def async_setup_platform(hass, config, async_add_entites, discovery_info=None):
"""Set up Buspro switch devices."""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices import Climate
from pybuspro.devices import Climate

hdl = hass.data[DATA_BUSPRO].hdl
devices = []
Expand Down
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/buspro/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
async def async_setup_platform(hass, config, async_add_entites, discovery_info=None):
"""Set up Buspro light devices."""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices import Light
from pybuspro.devices import Light

hdl = hass.data[DATA_BUSPRO].hdl
devices = []
Expand Down
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/buspro/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
async def async_setup_platform(hass, config, async_add_entites, discovery_info=None):
"""Set up Buspro switch devices."""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices import Sensor
from pybuspro.devices import Sensor

hdl = hass.data[DATA_BUSPRO].hdl
devices = []
Expand Down
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/buspro/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
async def async_setup_platform(hass, config, async_add_entites, discovery_info=None):
"""Set up Buspro switch devices."""
# noinspection PyUnresolvedReferences
from ..pybuspro.devices import Switch
from pybuspro.devices import Switch

hdl = hass.data[DATA_BUSPRO].hdl
devices = []
Expand Down