Skip to content

Commit

Permalink
Update Pure Energie integration (home-assistant#66946)
Browse files Browse the repository at this point in the history
* Remove service entry_type

* Set raise on progress
  • Loading branch information
klaasnicolaas authored Feb 20, 2022
1 parent dbb2c64 commit 7c8f4a4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/pure_energie/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def async_step_user(
except GridNetConnectionError:
errors["base"] = "cannot_connect"
else:
await self.async_set_unique_id(device.n2g_id)
await self.async_set_unique_id(device.n2g_id, raise_on_progress=False)
self._abort_if_unique_id_configured(
updates={CONF_HOST: user_input[CONF_HOST]}
)
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/pure_energie/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, ENERGY_KILO_WATT_HOUR, POWER_WATT
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
Expand Down Expand Up @@ -98,7 +97,6 @@ def __init__(
self.entity_description = description
self._attr_unique_id = f"{coordinator.data.device.n2g_id}_{description.key}"
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, coordinator.data.device.n2g_id)},
configuration_url=f"http://{coordinator.config_entry.data[CONF_HOST]}",
sw_version=coordinator.data.device.firmware,
Expand Down
1 change: 0 additions & 1 deletion tests/components/pure_energie/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@ async def test_sensors(
assert device_entry.identifiers == {(DOMAIN, "aabbccddeeff")}
assert device_entry.name == "home"
assert device_entry.manufacturer == "NET2GRID"
assert device_entry.entry_type is dr.DeviceEntryType.SERVICE
assert device_entry.model == "SBWF3102"
assert device_entry.sw_version == "1.6.16"

0 comments on commit 7c8f4a4

Please sign in to comment.