Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.3.0 #216

Merged
merged 8 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions custom_components/ecotrend_ista/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
_LOGGER.debug("Configure based on config entry %s", entry.entry_id)
coordinator = IstaDataUpdateCoordinator(hass, entry)
await coordinator.init()
for uuid in coordinator.controller.getUUIDs():
for uuid in coordinator.controller.get_uuids():
await _async_migrate_entries(
hass,
entry,
uuid,
coordinator.controller.getSupportCode(),
coordinator.controller.get_support_code(),
)
await coordinator.async_config_entry_first_refresh()

Expand Down
3 changes: 1 addition & 2 deletions custom_components/ecotrend_ista/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def login_account(hass: core.HomeAssistant, data: MappingProxyType[str, Any], de
email=data.get(CONF_EMAIL, None),
password=data.get(CONF_PASSWORD, None),
logger=_LOGGER,
hass_dir=(hass.config.path("custom_components/ecotrend_ista") if demo else None),
totp=data.get(CONF_MFA, "").replace(" ", ""),
session=requests.Session(),
)
Expand Down Expand Up @@ -70,7 +69,7 @@ async def validate_input(hass: core.HomeAssistant, data: dict[str, Any]) -> dict
raise requests.Timeout from error

return {
"title": f"{MANUFACTURER} {account.getSupportCode()} {'' if not login_info or login_info != 'Demo' else login_info}"
"title": f"{MANUFACTURER} {account.get_support_code()} {'' if not login_info or login_info != 'Demo' else login_info}"
}


Expand Down
2 changes: 1 addition & 1 deletion custom_components/ecotrend_ista/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class EcotrendSensorEntityDescription(SensorEntityDescription, EcotrendRequiredK
EcotrendSensorEntityDescription(
key=CONF_TYPE_HEATING,
data_type=CONF_TYPE_HEATING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_category=EntityCategory.DIAGNOSTIC,
Expand All @@ -112,6 +111,7 @@ class EcotrendSensorEntityDescription(SensorEntityDescription, EcotrendRequiredK
EcotrendSensorEntityDescription(
key=CONF_TYPE_HEATING_CUSTOM,
data_type=CONF_TYPE_HEATING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:radiator",
Expand Down
5 changes: 3 additions & 2 deletions custom_components/ecotrend_ista/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"integration_type": "device",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/Ludy87/ecotrend-ista/issues",
"loggers": ["pyecotrend_ista"],
"requirements": [
"pyecotrend_ista==3.2.0",
"pyecotrend_ista==3.3.1",
"pyotp==2.8.0",
"marshmallow-enum==1.5.1"
],
"version": "v3.2.0"
"version": "v3.3.0"
}
8 changes: 4 additions & 4 deletions custom_components/ecotrend_ista/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ def __init__(self, coordinator: IstaDataUpdateCoordinator, controller: PyEcotren
"""Initialize the ista EcoTrend Version 3 base entity."""
super().__init__(coordinator)
self._attr_attribution = f"Data provided by {URL_SELECTORS.get(self.coordinator.config_entry.options.get(CONF_URL))}"
self._support_code = controller._supportCode
self._support_code = controller._support_code
self.uuid = uuid
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, f"{self.uuid}")},
manufacturer=f"{MANUFACTURER} {self.uuid}",
model="ista consumption & costs",
name=f"{DEVICE_NAME} {self.uuid} {'' if controller._accessToken != 'Demo' else 'Demo'}",
sw_version=controller.getVersion(),
hw_version=controller._a_tosUpdated,
name=f"{DEVICE_NAME} {self.uuid} {'' if controller._access_token != 'Demo' else 'Demo'}",
sw_version=controller.get_version(),
hw_version=controller._account.get("tosUpdated"),
via_device=(DOMAIN, f"{self.uuid}"),
)
self._unsub_dispatchers: list[Callable[[], None]] = []
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"zip_release": true,
"country": "DE",
"render_readme": true,
"homeassistant": "2024.6.0",
"homeassistant": "2024.6.4",
"hacs": "1.34.0",
"filename": "ecotrend_ista.zip"
}