Bump aioswitcher to 4.0.0 (#123260)
* Bump aioswitcher to 4.0.0 * switcher fix version * swithcer fix test * switcher fix testspull/123485/head
parent
8e34a0d3c7
commit
57da71c537
|
@ -137,6 +137,7 @@ class SwitcherThermostatButtonEntity(
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with SwitcherType2Api(
|
async with SwitcherType2Api(
|
||||||
|
self.coordinator.data.device_type,
|
||||||
self.coordinator.data.ip_address,
|
self.coordinator.data.ip_address,
|
||||||
self.coordinator.data.device_id,
|
self.coordinator.data.device_id,
|
||||||
self.coordinator.data.device_key,
|
self.coordinator.data.device_key,
|
||||||
|
|
|
@ -169,6 +169,7 @@ class SwitcherClimateEntity(
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with SwitcherType2Api(
|
async with SwitcherType2Api(
|
||||||
|
self.coordinator.data.device_type,
|
||||||
self.coordinator.data.ip_address,
|
self.coordinator.data.ip_address,
|
||||||
self.coordinator.data.device_id,
|
self.coordinator.data.device_id,
|
||||||
self.coordinator.data.device_key,
|
self.coordinator.data.device_key,
|
||||||
|
|
|
@ -29,7 +29,7 @@ from .coordinator import SwitcherDataUpdateCoordinator
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
API_SET_POSITON = "set_position"
|
API_SET_POSITON = "set_position"
|
||||||
API_STOP = "stop"
|
API_STOP = "stop_shutter"
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
|
@ -98,6 +98,7 @@ class SwitcherCoverEntity(
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with SwitcherType2Api(
|
async with SwitcherType2Api(
|
||||||
|
self.coordinator.data.device_type,
|
||||||
self.coordinator.data.ip_address,
|
self.coordinator.data.ip_address,
|
||||||
self.coordinator.data.device_id,
|
self.coordinator.data.device_id,
|
||||||
self.coordinator.data.device_key,
|
self.coordinator.data.device_key,
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["aioswitcher"],
|
"loggers": ["aioswitcher"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["aioswitcher==3.4.3"],
|
"requirements": ["aioswitcher==4.0.0"],
|
||||||
"single_config_entry": true
|
"single_config_entry": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,7 @@ class SwitcherBaseSwitchEntity(
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with SwitcherType1Api(
|
async with SwitcherType1Api(
|
||||||
|
self.coordinator.data.device_type,
|
||||||
self.coordinator.data.ip_address,
|
self.coordinator.data.ip_address,
|
||||||
self.coordinator.data.device_id,
|
self.coordinator.data.device_id,
|
||||||
self.coordinator.data.device_key,
|
self.coordinator.data.device_key,
|
||||||
|
|
|
@ -374,7 +374,7 @@ aiosolaredge==0.2.0
|
||||||
aiosteamist==1.0.0
|
aiosteamist==1.0.0
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==3.4.3
|
aioswitcher==4.0.0
|
||||||
|
|
||||||
# homeassistant.components.syncthing
|
# homeassistant.components.syncthing
|
||||||
aiosyncthing==0.5.1
|
aiosyncthing==0.5.1
|
||||||
|
|
|
@ -356,7 +356,7 @@ aiosolaredge==0.2.0
|
||||||
aiosteamist==1.0.0
|
aiosteamist==1.0.0
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==3.4.3
|
aioswitcher==4.0.0
|
||||||
|
|
||||||
# homeassistant.components.syncthing
|
# homeassistant.components.syncthing
|
||||||
aiosyncthing==0.5.1
|
aiosyncthing==0.5.1
|
||||||
|
|
|
@ -38,6 +38,10 @@ DUMMY_MAC_ADDRESS1 = "A1:B2:C3:45:67:D8"
|
||||||
DUMMY_MAC_ADDRESS2 = "A1:B2:C3:45:67:D9"
|
DUMMY_MAC_ADDRESS2 = "A1:B2:C3:45:67:D9"
|
||||||
DUMMY_MAC_ADDRESS3 = "A1:B2:C3:45:67:DA"
|
DUMMY_MAC_ADDRESS3 = "A1:B2:C3:45:67:DA"
|
||||||
DUMMY_MAC_ADDRESS4 = "A1:B2:C3:45:67:DB"
|
DUMMY_MAC_ADDRESS4 = "A1:B2:C3:45:67:DB"
|
||||||
|
DUMMY_TOKEN_NEEDED1 = False
|
||||||
|
DUMMY_TOKEN_NEEDED2 = False
|
||||||
|
DUMMY_TOKEN_NEEDED3 = False
|
||||||
|
DUMMY_TOKEN_NEEDED4 = False
|
||||||
DUMMY_PHONE_ID = "1234"
|
DUMMY_PHONE_ID = "1234"
|
||||||
DUMMY_POWER_CONSUMPTION1 = 100
|
DUMMY_POWER_CONSUMPTION1 = 100
|
||||||
DUMMY_POWER_CONSUMPTION2 = 2780
|
DUMMY_POWER_CONSUMPTION2 = 2780
|
||||||
|
@ -60,6 +64,7 @@ DUMMY_PLUG_DEVICE = SwitcherPowerPlug(
|
||||||
DUMMY_IP_ADDRESS1,
|
DUMMY_IP_ADDRESS1,
|
||||||
DUMMY_MAC_ADDRESS1,
|
DUMMY_MAC_ADDRESS1,
|
||||||
DUMMY_DEVICE_NAME1,
|
DUMMY_DEVICE_NAME1,
|
||||||
|
DUMMY_TOKEN_NEEDED1,
|
||||||
DUMMY_POWER_CONSUMPTION1,
|
DUMMY_POWER_CONSUMPTION1,
|
||||||
DUMMY_ELECTRIC_CURRENT1,
|
DUMMY_ELECTRIC_CURRENT1,
|
||||||
)
|
)
|
||||||
|
@ -72,6 +77,7 @@ DUMMY_WATER_HEATER_DEVICE = SwitcherWaterHeater(
|
||||||
DUMMY_IP_ADDRESS2,
|
DUMMY_IP_ADDRESS2,
|
||||||
DUMMY_MAC_ADDRESS2,
|
DUMMY_MAC_ADDRESS2,
|
||||||
DUMMY_DEVICE_NAME2,
|
DUMMY_DEVICE_NAME2,
|
||||||
|
DUMMY_TOKEN_NEEDED2,
|
||||||
DUMMY_POWER_CONSUMPTION2,
|
DUMMY_POWER_CONSUMPTION2,
|
||||||
DUMMY_ELECTRIC_CURRENT2,
|
DUMMY_ELECTRIC_CURRENT2,
|
||||||
DUMMY_REMAINING_TIME,
|
DUMMY_REMAINING_TIME,
|
||||||
|
@ -86,6 +92,7 @@ DUMMY_SHUTTER_DEVICE = SwitcherShutter(
|
||||||
DUMMY_IP_ADDRESS4,
|
DUMMY_IP_ADDRESS4,
|
||||||
DUMMY_MAC_ADDRESS4,
|
DUMMY_MAC_ADDRESS4,
|
||||||
DUMMY_DEVICE_NAME4,
|
DUMMY_DEVICE_NAME4,
|
||||||
|
DUMMY_TOKEN_NEEDED4,
|
||||||
DUMMY_POSITION,
|
DUMMY_POSITION,
|
||||||
DUMMY_DIRECTION,
|
DUMMY_DIRECTION,
|
||||||
)
|
)
|
||||||
|
@ -98,6 +105,7 @@ DUMMY_THERMOSTAT_DEVICE = SwitcherThermostat(
|
||||||
DUMMY_IP_ADDRESS3,
|
DUMMY_IP_ADDRESS3,
|
||||||
DUMMY_MAC_ADDRESS3,
|
DUMMY_MAC_ADDRESS3,
|
||||||
DUMMY_DEVICE_NAME3,
|
DUMMY_DEVICE_NAME3,
|
||||||
|
DUMMY_TOKEN_NEEDED3,
|
||||||
DUMMY_THERMOSTAT_MODE,
|
DUMMY_THERMOSTAT_MODE,
|
||||||
DUMMY_TEMPERATURE,
|
DUMMY_TEMPERATURE,
|
||||||
DUMMY_TARGET_TEMPERATURE,
|
DUMMY_TARGET_TEMPERATURE,
|
||||||
|
|
|
@ -105,7 +105,7 @@ async def test_cover(
|
||||||
|
|
||||||
# Test stop
|
# Test stop
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.switcher_kis.cover.SwitcherType2Api.stop"
|
"homeassistant.components.switcher_kis.cover.SwitcherType2Api.stop_shutter"
|
||||||
) as mock_control_device:
|
) as mock_control_device:
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
COVER_DOMAIN,
|
COVER_DOMAIN,
|
||||||
|
|
|
@ -40,7 +40,7 @@ async def test_diagnostics(
|
||||||
"__type": "<enum 'DeviceType'>",
|
"__type": "<enum 'DeviceType'>",
|
||||||
"repr": (
|
"repr": (
|
||||||
"<DeviceType.V4: ('Switcher V4', '0317', "
|
"<DeviceType.V4: ('Switcher V4', '0317', "
|
||||||
"1, <DeviceCategory.WATER_HEATER: 1>)>"
|
"1, <DeviceCategory.WATER_HEATER: 1>, False)>"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
"electric_current": 12.8,
|
"electric_current": 12.8,
|
||||||
|
@ -50,6 +50,7 @@ async def test_diagnostics(
|
||||||
"name": "Heater FE12",
|
"name": "Heater FE12",
|
||||||
"power_consumption": 2780,
|
"power_consumption": 2780,
|
||||||
"remaining_time": "01:29:32",
|
"remaining_time": "01:29:32",
|
||||||
|
"token_needed": False,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"entry": {
|
"entry": {
|
||||||
|
|
Loading…
Reference in New Issue