mirror of https://github.com/home-assistant/core
Add support for deconz radios to zha component (#20167)
* Add support for deconz radios * Update check_zigpy_connection()
This commit is contained in:
parent
85404783d6
commit
b557157ea1
|
@ -39,7 +39,8 @@ REQUIREMENTS = [
|
||||||
'bellows==0.7.0',
|
'bellows==0.7.0',
|
||||||
'zigpy==0.2.0',
|
'zigpy==0.2.0',
|
||||||
'zigpy-xbee==0.1.1',
|
'zigpy-xbee==0.1.1',
|
||||||
'zha-quirks==0.0.6'
|
'zha-quirks==0.0.6',
|
||||||
|
'zigpy-deconz==0.0.1'
|
||||||
]
|
]
|
||||||
|
|
||||||
DEVICE_CONFIG_SCHEMA_ENTRY = vol.Schema({
|
DEVICE_CONFIG_SCHEMA_ENTRY = vol.Schema({
|
||||||
|
@ -120,6 +121,11 @@ async def async_setup_entry(hass, config_entry):
|
||||||
from zigpy_xbee.zigbee.application import ControllerApplication
|
from zigpy_xbee.zigbee.application import ControllerApplication
|
||||||
radio = zigpy_xbee.api.XBee()
|
radio = zigpy_xbee.api.XBee()
|
||||||
radio_description = "XBee"
|
radio_description = "XBee"
|
||||||
|
elif radio_type == RadioType.deconz.name:
|
||||||
|
import zigpy_deconz.api
|
||||||
|
from zigpy_deconz.zigbee.application import ControllerApplication
|
||||||
|
radio = zigpy_deconz.api.Deconz()
|
||||||
|
radio_description = "Deconz"
|
||||||
|
|
||||||
await radio.connect(usb_path, baudrate)
|
await radio.connect(usb_path, baudrate)
|
||||||
hass.data[DATA_ZHA][DATA_ZHA_RADIO] = radio
|
hass.data[DATA_ZHA][DATA_ZHA_RADIO] = radio
|
||||||
|
|
|
@ -57,6 +57,7 @@ class RadioType(enum.Enum):
|
||||||
|
|
||||||
ezsp = 'ezsp'
|
ezsp = 'ezsp'
|
||||||
xbee = 'xbee'
|
xbee = 'xbee'
|
||||||
|
deconz = 'deconz'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def list(cls):
|
def list(cls):
|
||||||
|
|
|
@ -118,6 +118,10 @@ async def check_zigpy_connection(usb_path, radio_type, database_path):
|
||||||
import zigpy_xbee.api
|
import zigpy_xbee.api
|
||||||
from zigpy_xbee.zigbee.application import ControllerApplication
|
from zigpy_xbee.zigbee.application import ControllerApplication
|
||||||
radio = zigpy_xbee.api.XBee()
|
radio = zigpy_xbee.api.XBee()
|
||||||
|
elif radio_type == RadioType.deconz.name:
|
||||||
|
import zigpy_deconz.api
|
||||||
|
from zigpy_deconz.zigbee.application import ControllerApplication
|
||||||
|
radio = zigpy_deconz.api.Deconz()
|
||||||
try:
|
try:
|
||||||
await radio.connect(usb_path, DEFAULT_BAUDRATE)
|
await radio.connect(usb_path, DEFAULT_BAUDRATE)
|
||||||
controller = ControllerApplication(radio, database_path)
|
controller = ControllerApplication(radio, database_path)
|
||||||
|
|
|
@ -1743,6 +1743,9 @@ zhong_hong_hvac==1.0.9
|
||||||
# homeassistant.components.media_player.ziggo_mediabox_xl
|
# homeassistant.components.media_player.ziggo_mediabox_xl
|
||||||
ziggo-mediabox-xl==1.1.0
|
ziggo-mediabox-xl==1.1.0
|
||||||
|
|
||||||
|
# homeassistant.components.zha
|
||||||
|
zigpy-deconz==0.0.1
|
||||||
|
|
||||||
# homeassistant.components.zha
|
# homeassistant.components.zha
|
||||||
zigpy-xbee==0.1.1
|
zigpy-xbee==0.1.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue