This commit is contained in:
Franck Nijhof 2023-03-16 20:45:14 +01:00 committed by GitHub
commit b6d001bfe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 43 additions and 26 deletions

View File

@ -180,7 +180,7 @@ class ArestData:
self._resource = resource
self._pin = pin
self.data = {}
self._attr_available = True
self.available = True
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
@ -201,7 +201,7 @@ class ArestData:
f"{self._resource}/digital/{self._pin}", timeout=10
)
self.data = {"value": response.json()["return_value"]}
self._attr_available = True
self.available = True
except requests.exceptions.ConnectionError:
_LOGGER.error("No route to device %s", self._resource)
self._attr_available = False
self.available = False

View File

@ -7,6 +7,6 @@
"iot_class": "local_push",
"loggers": ["bond_async"],
"quality_scale": "platinum",
"requirements": ["bond-async==0.1.22"],
"requirements": ["bond-async==0.1.23"],
"zeroconf": ["_bond._tcp.local."]
}

View File

@ -14,6 +14,6 @@
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["aioesphomeapi", "noiseprotocol"],
"requirements": ["aioesphomeapi==13.4.2", "esphome-dashboard-api==1.2.3"],
"requirements": ["aioesphomeapi==13.5.1", "esphome-dashboard-api==1.2.3"],
"zeroconf": ["_esphomelib._tcp.local."]
}

View File

@ -20,5 +20,5 @@
"documentation": "https://www.home-assistant.io/integrations/frontend",
"integration_type": "system",
"quality_scale": "internal",
"requirements": ["home-assistant-frontend==20230309.0"]
"requirements": ["home-assistant-frontend==20230309.1"]
}

View File

@ -77,7 +77,9 @@ class ImapDataUpdateCoordinator(DataUpdateCoordinator[int]):
f"Invalid response for search '{self.config_entry.data[CONF_SEARCH]}': {result} / {lines[0]}"
)
if self.support_push:
self.hass.async_create_task(self.async_wait_server_push())
self.hass.async_create_background_task(
self.async_wait_server_push(), "Wait for IMAP data push"
)
return len(lines[0].split())
async def async_wait_server_push(self) -> None:
@ -100,5 +102,7 @@ class ImapDataUpdateCoordinator(DataUpdateCoordinator[int]):
async def shutdown(self, *_) -> None:
"""Close resources."""
if self.imap_client:
if self.imap_client.has_pending_idle():
self.imap_client.idle_done()
await self.imap_client.stop_wait_server_push()
await self.imap_client.logout()

View File

@ -16,7 +16,7 @@ from pymodbus.client import (
from pymodbus.constants import Defaults
from pymodbus.exceptions import ModbusException
from pymodbus.pdu import ModbusResponse
from pymodbus.transaction import ModbusRtuFramer
from pymodbus.transaction import ModbusAsciiFramer, ModbusRtuFramer, ModbusSocketFramer
import voluptuous as vol
from homeassistant.const import (
@ -137,8 +137,10 @@ async def async_modbus_setup(
for name in hubs:
if not await hubs[name].async_setup():
return False
hub_collect = hass.data[DOMAIN]
else:
hass.data[DOMAIN] = hub_collect = {}
hass.data[DOMAIN] = hub_collect = {}
for conf_hub in config[DOMAIN]:
my_hub = ModbusHub(hass, conf_hub)
hub_collect[conf_hub[CONF_NAME]] = my_hub
@ -279,9 +281,12 @@ class ModbusHub:
}
if self._config_type == SERIAL:
# serial configuration
if client_config[CONF_METHOD] == "ascii":
self._pb_params["framer"] = ModbusAsciiFramer
else:
self._pb_params["framer"] = ModbusRtuFramer
self._pb_params.update(
{
"method": client_config[CONF_METHOD],
"baudrate": client_config[CONF_BAUDRATE],
"stopbits": client_config[CONF_STOPBITS],
"bytesize": client_config[CONF_BYTESIZE],
@ -293,6 +298,8 @@ class ModbusHub:
self._pb_params["host"] = client_config[CONF_HOST]
if self._config_type == RTUOVERTCP:
self._pb_params["framer"] = ModbusRtuFramer
else:
self._pb_params["framer"] = ModbusSocketFramer
Defaults.Timeout = client_config[CONF_TIMEOUT]
if CONF_MSG_WAIT in client_config:

View File

@ -31,6 +31,7 @@ from . import Coordinator
from .const import (
DOMAIN,
LOGGER,
VALUES_COOL_WITH_ROOM_SENSOR_OFF,
VALUES_MIXING_VALVE_CLOSED_STATE,
VALUES_PRIORITY_COOLING,
VALUES_PRIORITY_HEATING,
@ -139,10 +140,13 @@ class NibeClimateEntity(CoordinatorEntity[Coordinator], ClimateEntity):
mode = HVACMode.OFF
if _get_value(self._coil_use_room_sensor) == "ON":
if _get_value(self._coil_cooling_with_room_sensor) != "OFF":
mode = HVACMode.HEAT_COOL
else:
if (
_get_value(self._coil_cooling_with_room_sensor)
in VALUES_COOL_WITH_ROOM_SENSOR_OFF
):
mode = HVACMode.HEAT
else:
mode = HVACMode.HEAT_COOL
self._attr_hvac_mode = mode
setpoint_heat = _get_float(self._coil_setpoint_heat)

View File

@ -89,6 +89,7 @@ async def validate_nibegw_input(
"""Validate the user input allows us to connect."""
heatpump = HeatPump(Model[data[CONF_MODEL]])
heatpump.word_swap = True
await heatpump.initialize()
connection = NibeGW(

View File

@ -17,3 +17,4 @@ CONF_MODBUS_UNIT = "modbus_unit"
VALUES_MIXING_VALVE_CLOSED_STATE = (30, "CLOSED", "SHUNT CLOSED")
VALUES_PRIORITY_HEATING = (30, "HEAT")
VALUES_PRIORITY_COOLING = (60, "COOLING")
VALUES_COOL_WITH_ROOM_SENSOR_OFF = (0, "OFF")

View File

@ -5,5 +5,5 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/nibe_heatpump",
"iot_class": "local_polling",
"requirements": ["nibe==2.0.0"]
"requirements": ["nibe==2.1.4"]
}

View File

@ -8,7 +8,7 @@ from .backports.enum import StrEnum
APPLICATION_NAME: Final = "HomeAssistant"
MAJOR_VERSION: Final = 2023
MINOR_VERSION: Final = 3
PATCH_VERSION: Final = "4"
PATCH_VERSION: Final = "5"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 10, 0)

View File

@ -23,7 +23,7 @@ fnvhash==0.1.0
hass-nabucasa==0.61.0
hassil==1.0.6
home-assistant-bluetooth==1.9.3
home-assistant-frontend==20230309.0
home-assistant-frontend==20230309.1
home-assistant-intents==2023.2.28
httpx==0.23.3
ifaddr==0.1.7

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "homeassistant"
version = "2023.3.4"
version = "2023.3.5"
license = {text = "Apache-2.0"}
description = "Open-source home automation platform running on Python 3."
readme = "README.rst"

View File

@ -156,7 +156,7 @@ aioecowitt==2023.01.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==13.4.2
aioesphomeapi==13.5.1
# homeassistant.components.flo
aioflo==2021.11.0
@ -467,7 +467,7 @@ bluetooth-auto-recovery==1.0.3
bluetooth-data-tools==0.3.1
# homeassistant.components.bond
bond-async==0.1.22
bond-async==0.1.23
# homeassistant.components.bosch_shc
boschshcpy==0.2.35
@ -907,7 +907,7 @@ hole==0.8.0
holidays==0.18.0
# homeassistant.components.frontend
home-assistant-frontend==20230309.0
home-assistant-frontend==20230309.1
# homeassistant.components.conversation
home-assistant-intents==2023.2.28
@ -1201,7 +1201,7 @@ nextcord==2.0.0a8
nextdns==1.3.0
# homeassistant.components.nibe_heatpump
nibe==2.0.0
nibe==2.1.4
# homeassistant.components.niko_home_control
niko-home-control==0.2.1

View File

@ -143,7 +143,7 @@ aioecowitt==2023.01.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==13.4.2
aioesphomeapi==13.5.1
# homeassistant.components.flo
aioflo==2021.11.0
@ -384,7 +384,7 @@ bluetooth-auto-recovery==1.0.3
bluetooth-data-tools==0.3.1
# homeassistant.components.bond
bond-async==0.1.22
bond-async==0.1.23
# homeassistant.components.bosch_shc
boschshcpy==0.2.35
@ -690,7 +690,7 @@ hole==0.8.0
holidays==0.18.0
# homeassistant.components.frontend
home-assistant-frontend==20230309.0
home-assistant-frontend==20230309.1
# homeassistant.components.conversation
home-assistant-intents==2023.2.28
@ -891,7 +891,7 @@ nextcord==2.0.0a8
nextdns==1.3.0
# homeassistant.components.nibe_heatpump
nibe==2.0.0
nibe==2.1.4
# homeassistant.components.nfandroidtv
notifications-android-tv==0.1.5

View File

@ -378,7 +378,7 @@ async def test_duplicate_entity_validator(do_config) -> None:
CONF_TYPE: SERIAL,
CONF_BAUDRATE: 9600,
CONF_BYTESIZE: 8,
CONF_METHOD: "rtu",
CONF_METHOD: "ascii",
CONF_PORT: TEST_PORT_SERIAL,
CONF_PARITY: "E",
CONF_STOPBITS: 1,