Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
v1.7.0b0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgermain committed Jun 19, 2021
1 parent 3c7dee5 commit 1bd30af
Show file tree
Hide file tree
Showing 14 changed files with 815 additions and 299 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ You can do some find and replace (e.g. `climate.vaillant_bathroom`-> `climate.ba
- Integration into the HACS default repositories
- Special thanks to [@vit-](https://github.com/vit-)
### [1.7.0b](https://github.com/thomasgermain/vaillant-component/releases/tag/1.7.0b0)
- **BREAKING CHANGE**: improvements of the `unique_id` of some entities (but not the `entity_id`).
You may have to delete old entities which will be unavailable
and change the `entity_id` of newly created entities (because they may have `entity_id` like xxx_2)
- Names and units of sensors are None safe
- Many technical improvements on entity updates
- Better handling and logging in case of error
- Update pymultimatic to 0.4.x (= improvement in handling wrong responses coming from the API)
## Provided entities
- 1 water_heater entity, if any water heater: `water_heater.<water heater id>`, basically `water_heater.control_dhw`
- 1 climate entity per zone (expect if the zone is controlled by room) `climate.<zone id>`
Expand Down
10 changes: 5 additions & 5 deletions custom_components/multimatic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant

from .const import DOMAIN, HUB, PLATFORMS, SERVICES_HANDLER
from .hub import ApiHub
from .const import COORDINATOR, DOMAIN, PLATFORMS, SERVICES_HANDLER
from .coordinator import MultimaticDataUpdateCoordinator
from .service import SERVICES, MultimaticServiceHandler

_LOGGER = logging.getLogger(__name__)
Expand All @@ -21,13 +21,13 @@ async def async_setup(hass: HomeAssistant, config: dict):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up multimatic from a config entry."""

api: ApiHub = ApiHub(hass, entry)
api: MultimaticDataUpdateCoordinator = MultimaticDataUpdateCoordinator(hass, entry)
await api.authenticate()
await api.async_refresh()

hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN].setdefault(entry.unique_id, {})
hass.data[DOMAIN][entry.unique_id][HUB] = api
hass.data[DOMAIN][entry.unique_id][COORDINATOR] = api

for platform in PLATFORMS:
hass.async_create_task(
Expand All @@ -44,7 +44,7 @@ async def logout(param):
return True


async def async_setup_service(api: ApiHub, hass):
async def async_setup_service(api: MultimaticDataUpdateCoordinator, hass):
"""Set up services."""
if not hass.data.get(SERVICES_HANDLER):
service_handler = MultimaticServiceHandler(api, hass)
Expand Down
Loading

0 comments on commit 1bd30af

Please sign in to comment.