Bump regenmaschine to 2022.09.2 (#79010)

* Bump `regenmaschine` to 2022.09.2

* Fix tests

* Restore incorrectly-deleted test
This commit is contained in:
Aaron Bach 2022-09-23 13:46:25 -06:00 committed by GitHub
parent 81514b0d1c
commit 21b91f75ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 12 deletions

View file

@ -497,7 +497,7 @@ class RainMachineEntity(CoordinatorEntity):
f"{self._entry.data[CONF_PORT]}" f"{self._entry.data[CONF_PORT]}"
), ),
connections={(dr.CONNECTION_NETWORK_MAC, self._data.controller.mac)}, connections={(dr.CONNECTION_NETWORK_MAC, self._data.controller.mac)},
name=str(self._data.controller.name).capitalize(), name=self._data.controller.name.capitalize(),
manufacturer="RainMachine", manufacturer="RainMachine",
model=( model=(
f"Version {self._version_coordinator.data['hwVer']} " f"Version {self._version_coordinator.data['hwVer']} "

View file

@ -132,7 +132,7 @@ class RainMachineFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
# access token without using the IP address and password, so we have to # access token without using the IP address and password, so we have to
# store it: # store it:
return self.async_create_entry( return self.async_create_entry(
title=str(controller.name), title=controller.name.capitalize(),
data={ data={
CONF_IP_ADDRESS: user_input[CONF_IP_ADDRESS], CONF_IP_ADDRESS: user_input[CONF_IP_ADDRESS],
CONF_PASSWORD: user_input[CONF_PASSWORD], CONF_PASSWORD: user_input[CONF_PASSWORD],

View file

@ -3,7 +3,7 @@
"name": "RainMachine", "name": "RainMachine",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/rainmachine", "documentation": "https://www.home-assistant.io/integrations/rainmachine",
"requirements": ["regenmaschine==2022.09.1"], "requirements": ["regenmaschine==2022.09.2"],
"codeowners": ["@bachya"], "codeowners": ["@bachya"],
"iot_class": "local_polling", "iot_class": "local_polling",
"homekit": { "homekit": {

View file

@ -2138,7 +2138,7 @@ raincloudy==0.0.7
raspyrfm-client==1.2.8 raspyrfm-client==1.2.8
# homeassistant.components.rainmachine # homeassistant.components.rainmachine
regenmaschine==2022.09.1 regenmaschine==2022.09.2
# homeassistant.components.renault # homeassistant.components.renault
renault-api==0.1.11 renault-api==0.1.11

View file

@ -1468,7 +1468,7 @@ radios==0.1.1
radiotherm==2.1.0 radiotherm==2.1.0
# homeassistant.components.rainmachine # homeassistant.components.rainmachine
regenmaschine==2022.09.1 regenmaschine==2022.09.2
# homeassistant.components.renault # homeassistant.components.renault
renault-api==0.1.11 renault-api==0.1.11

View file

@ -51,10 +51,8 @@ def controller_fixture(
"""Define a regenmaschine controller.""" """Define a regenmaschine controller."""
controller = AsyncMock() controller = AsyncMock()
controller.api_version = "4.5.0" controller.api_version = "4.5.0"
controller.hardware_version = 3 controller.hardware_version = "3"
# The api returns a controller with all numbers as numeric controller.name = "12345"
# instead of a string
controller.name = 12345
controller.mac = controller_mac controller.mac = controller_mac
controller.software_version = "4.0.925" controller.software_version = "4.0.925"

View file

@ -1,5 +1,5 @@
{ {
"apiVer": "4.6.1", "apiVer": "4.6.1",
"hwVer": 3, "hwVer": "3",
"swVer": "4.0.1144" "swVer": "4.0.1144"
} }

View file

@ -21,7 +21,11 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_rainmach
}, },
"data": { "data": {
"coordinator": { "coordinator": {
"api.versions": {"apiVer": "4.6.1", "hwVer": 3, "swVer": "4.0.1144"}, "api.versions": {
"apiVer": "4.6.1",
"hwVer": "3",
"swVer": "4.0.1144",
},
"machine.firmware_update_status": { "machine.firmware_update_status": {
"lastUpdateCheckTimestamp": 1657825288, "lastUpdateCheckTimestamp": 1657825288,
"packageDetails": [], "packageDetails": [],
@ -635,7 +639,11 @@ async def test_entry_diagnostics_failed_controller_diagnostics(
}, },
"data": { "data": {
"coordinator": { "coordinator": {
"api.versions": {"apiVer": "4.6.1", "hwVer": 3, "swVer": "4.0.1144"}, "api.versions": {
"apiVer": "4.6.1",
"hwVer": "3",
"swVer": "4.0.1144",
},
"machine.firmware_update_status": { "machine.firmware_update_status": {
"lastUpdateCheckTimestamp": 1657825288, "lastUpdateCheckTimestamp": 1657825288,
"packageDetails": [], "packageDetails": [],