Skip to content

Commit cce45c9

Browse files
committed
Improve
1 parent 39a84bb commit cce45c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/plugwise/binary_sensor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
BinarySensorEntity,
1414
BinarySensorEntityDescription,
1515
)
16-
import homeassistant.components.persistent_notification as pn
16+
from homeassistant.components.persistent_notification import async_create
1717
from homeassistant.const import EntityCategory
1818
from homeassistant.core import HomeAssistant, callback
1919
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -170,8 +170,8 @@ def is_on(self) -> bool:
170170
# pw-beta: show Plugwise notifications as HA persistent notifications
171171
if self._notification:
172172
for notify_id, message in self._notification.items():
173-
pn.async_create(
174-
message, "Plugwise Notification:", f"{DOMAIN}.{notify_id}"
173+
async_create(
174+
self.hass, message, "Plugwise Notification:", f"{DOMAIN}.{notify_id}"
175175
)
176176

177177
# return self.device["binary_sensors"][self.entity_description.key] # type: ignore [literal-required]

0 commit comments

Comments
 (0)