Filter out irrelevant entities on SMO20 devices in myuplink (#113493)
This commit is contained in:
parent
c69ab425c5
commit
eb1f37ea9b
7 changed files with 13533 additions and 3 deletions
|
@ -15,7 +15,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from . import MyUplinkDataCoordinator
|
||||
from .const import DOMAIN
|
||||
from .entity import MyUplinkEntity
|
||||
from .helpers import find_matching_platform
|
||||
from .helpers import find_matching_platform, skip_entity
|
||||
|
||||
CATEGORY_BASED_DESCRIPTIONS: dict[str, dict[str, SwitchEntityDescription]] = {
|
||||
"NIBEF": {
|
||||
|
@ -58,6 +58,8 @@ async def async_setup_entry(
|
|||
# Setup device point switches
|
||||
for device_id, point_data in coordinator.data.points.items():
|
||||
for point_id, device_point in point_data.items():
|
||||
if skip_entity(device_point.category, device_point):
|
||||
continue
|
||||
if find_matching_platform(device_point) == Platform.SWITCH:
|
||||
description = get_description(device_point)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue