Xiaomi Gateway subdevice support & AqaraHT + SensorHT devices (#36539)
* Gateway subdevice support & AqaraHT + SensorHT devices * Gateway subdevice support & AqaraHT + SensorHT devices * Add starkillerOG to codeowners as proposed by @rytilahti in this issue: https://github.com/home-assistant/core/issues/36516 * add starkillerOG to xiaomi_miio * fix config flow tests * Update CODEOWNERS * Update manifest.json * prosess revieuw comments * fix missing import * use proper pressure unit hPa * subdevice --> sub_device Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * subdevice --> sub_device Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * use key acces instead of get Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * subdevice --> sub_device Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * subdevice --> sub_device Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * subdevice --> sub_device Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * subdevice --> sub_device * use dataclass instead of namedtuple * update to newest python-miio functions (not yet released) * Move device info to entitie * remove unused variable * improve default names * SensorHT does not support pressure * bump python-miio to 0.5.2 * bump python-miio to 0.5.2 * bump python-miio to 0.5.2 * Fix missing brackets Co-authored-by: Teemu R. <tpr@iki.fi> Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
4 files changed
+158
-2
No files matched your search
@@ -21,6 +21,7 @@ TEST_GATEWAY_ID = TEST_MAC
|
||||
TEST_HARDWARE_VERSION = "AB123"
|
||||
TEST_FIRMWARE_VERSION = "1.2.3_456"
|
||||
TEST_ZEROCONF_NAME = "lumi-gateway-v3_miio12345678._miio._udp.local."
|
||||
TEST_SUB_DEVICE_LIST = []
|
||||
|
||||
|
||||
def get_mock_info(
|
||||
@@ -111,6 +112,9 @@ async def test_config_flow_gateway_success(hass):
|
||||
with patch(
|
||||
"homeassistant.components.xiaomi_miio.gateway.gateway.Gateway.info",
|
||||
return_value=mock_info,
|
||||
), patch(
|
||||
"homeassistant.components.xiaomi_miio.gateway.gateway.Gateway.discover_devices",
|
||||
return_value=TEST_SUB_DEVICE_LIST,
|
||||
), patch(
|
||||
"homeassistant.components.xiaomi_miio.async_setup_entry", return_value=True
|
||||
):
|
||||
@@ -151,6 +155,9 @@ async def test_zeroconf_gateway_success(hass):
|
||||
with patch(
|
||||
"homeassistant.components.xiaomi_miio.gateway.gateway.Gateway.info",
|
||||
return_value=mock_info,
|
||||
), patch(
|
||||
"homeassistant.components.xiaomi_miio.gateway.gateway.Gateway.discover_devices",
|
||||
return_value=TEST_SUB_DEVICE_LIST,
|
||||
), patch(
|
||||
"homeassistant.components.xiaomi_miio.async_setup_entry", return_value=True
|
||||
):
|
||||
|
||||
Reference in new issue
Block a user