Bump pycoolmasternet-async and add coolmaster swing mode (#82809)
* Add filter and error code support to CoolMastetNet * Create separate entities * coolmaster swing_mode support * Changed default to False * Raise HomeAssistantError * Add tests for init and climate * Fixed bad merge * Catch only ValueError
This commit is contained in:
parent
ca7384f96e
commit
b5664f9eaf
11 changed files with 430 additions and 37 deletions
|
@ -10,7 +10,7 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
|
||||
from .const import DATA_COORDINATOR, DATA_INFO, DOMAIN
|
||||
from .const import CONF_SWING_SUPPORT, DATA_COORDINATOR, DATA_INFO, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -21,7 +21,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
"""Set up Coolmaster from a config entry."""
|
||||
host = entry.data[CONF_HOST]
|
||||
port = entry.data[CONF_PORT]
|
||||
coolmaster = CoolMasterNet(host, port)
|
||||
coolmaster = CoolMasterNet(
|
||||
host, port, swing_support=entry.data.get(CONF_SWING_SUPPORT, False)
|
||||
)
|
||||
try:
|
||||
info = await coolmaster.info()
|
||||
if not info:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue