Skip to content

Commit 6599bed

Browse files
authored
Merge pull request #832 from plugwise/HA-138201
Implement requirement from HA PR 138201
2 parents 361adbf + 89f7bd2 commit 6599bed

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Versions from 0.40 and up
44

5+
## Ongoing
6+
7+
- Downstream HA [Core PR](https://github.com/home-assistant/core/pull/138201) update signature of platforms' async_setup_entry
8+
59
## v0.57.1
610

711
- Bugfix for Stretch (Issue #833) via plugwise [v1.7.2](https://github.com/plugwise/python-plugwise/releases/tag/v1.7.2)

custom_components/plugwise/binary_sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919
from homeassistant.const import EntityCategory
2020
from homeassistant.core import HomeAssistant, callback
21-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
21+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
2222

2323
from .const import (
2424
BATTERY_STATE,
@@ -104,7 +104,7 @@ class PlugwiseBinarySensorEntityDescription(BinarySensorEntityDescription):
104104
async def async_setup_entry(
105105
hass: HomeAssistant,
106106
entry: PlugwiseConfigEntry,
107-
async_add_entities: AddEntitiesCallback,
107+
async_add_entities: AddConfigEntryEntitiesCallback,
108108
) -> None:
109109
"""Set up Plugwise binary_sensors from a config entry."""
110110
coordinator = entry.runtime_data

custom_components/plugwise/button.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from homeassistant.components.button import ButtonDeviceClass, ButtonEntity
66
from homeassistant.const import EntityCategory
77
from homeassistant.core import HomeAssistant
8-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
8+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
99

1010
from .const import (
1111
LOGGER, # pw-betea
@@ -21,7 +21,7 @@
2121
async def async_setup_entry(
2222
hass: HomeAssistant,
2323
entry: PlugwiseConfigEntry,
24-
async_add_entities: AddEntitiesCallback,
24+
async_add_entities: AddConfigEntryEntitiesCallback,
2525
) -> None:
2626
"""Set up Plugwise buttons from a config entry."""
2727
coordinator = entry.runtime_data

custom_components/plugwise/climate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525
from homeassistant.core import HomeAssistant, callback
2626
from homeassistant.exceptions import HomeAssistantError
27-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
27+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
2828

2929
from .const import (
3030
ACTIVE_PRESET,
@@ -58,7 +58,7 @@
5858
async def async_setup_entry(
5959
hass: HomeAssistant,
6060
entry: PlugwiseConfigEntry,
61-
async_add_entities: AddEntitiesCallback,
61+
async_add_entities: AddConfigEntryEntitiesCallback,
6262
) -> None:
6363
"""Set up Plugwise thermostats from a config entry."""
6464
coordinator = entry.runtime_data

custom_components/plugwise/number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
)
1313
from homeassistant.const import EntityCategory, UnitOfTemperature
1414
from homeassistant.core import HomeAssistant, callback
15-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
15+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
1616

1717
from .const import (
1818
LOGGER,
@@ -69,7 +69,7 @@ class PlugwiseNumberEntityDescription(NumberEntityDescription):
6969
async def async_setup_entry(
7070
hass: HomeAssistant,
7171
entry: PlugwiseConfigEntry,
72-
async_add_entities: AddEntitiesCallback,
72+
async_add_entities: AddConfigEntryEntitiesCallback,
7373
) -> None:
7474
"""Set up Plugwise number platform from a config entry."""
7575
# Upstream above to adhere to standard used

custom_components/plugwise/select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from homeassistant.components.select import SelectEntity, SelectEntityDescription
88
from homeassistant.const import STATE_ON, EntityCategory
99
from homeassistant.core import HomeAssistant, callback
10-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
10+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
1111

1212
from .const import (
1313
AVAILABLE_SCHEDULES,
@@ -74,7 +74,7 @@ class PlugwiseSelectEntityDescription(SelectEntityDescription):
7474
async def async_setup_entry(
7575
hass: HomeAssistant,
7676
entry: PlugwiseConfigEntry,
77-
async_add_entities: AddEntitiesCallback,
77+
async_add_entities: AddConfigEntryEntitiesCallback,
7878
) -> None:
7979
"""Set up Plugwise selector from a config entry."""
8080
coordinator = entry.runtime_data

custom_components/plugwise/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
UnitOfVolumeFlowRate,
2727
)
2828
from homeassistant.core import HomeAssistant, callback
29-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
29+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
3030

3131
from .const import (
3232
DHW_SETPOINT,
@@ -459,7 +459,7 @@ class PlugwiseSensorEntityDescription(SensorEntityDescription):
459459
async def async_setup_entry(
460460
hass: HomeAssistant,
461461
entry: PlugwiseConfigEntry,
462-
async_add_entities: AddEntitiesCallback,
462+
async_add_entities: AddConfigEntryEntitiesCallback,
463463
) -> None:
464464
"""Set up Plugwise sensors from a config entry."""
465465
# Upstream as Plugwise not Smile

custom_components/plugwise/switch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515
from homeassistant.const import EntityCategory
1616
from homeassistant.core import HomeAssistant, callback
17-
from homeassistant.helpers.entity_platform import AddEntitiesCallback
17+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
1818

1919
from .const import (
2020
COOLING_ENA_SWITCH,
@@ -72,7 +72,7 @@ class PlugwiseSwitchEntityDescription(SwitchEntityDescription):
7272
async def async_setup_entry(
7373
hass: HomeAssistant,
7474
entry: PlugwiseConfigEntry,
75-
async_add_entities: AddEntitiesCallback,
75+
async_add_entities: AddConfigEntryEntitiesCallback,
7676
) -> None:
7777
"""Set up Plugwise switches from a config entry."""
7878
coordinator = entry.runtime_data

hacs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"sensor",
1010
"switch"
1111
],
12-
"homeassistant": "2025.2.0",
12+
"homeassistant": "2025.3.0",
1313
"render_readme": true
1414
}

0 commit comments

Comments
 (0)