Shorten Entity Name in Aussie Broadband (#74946)
This commit is contained in:
parent
6fd47d035e
commit
01ca7f657c
2 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
import re
|
||||
from typing import Any, cast
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
|
@ -152,7 +153,7 @@ class AussieBroadandSensorEntity(CoordinatorEntity, SensorEntity):
|
|||
identifiers={(DOMAIN, service[SERVICE_ID])},
|
||||
manufacturer="Aussie Broadband",
|
||||
configuration_url=f"https://my.aussiebroadband.com.au/#/{service['name'].lower()}/{service[SERVICE_ID]}/",
|
||||
name=service["description"],
|
||||
name=re.sub(r" - AVC\d+$", "", service["description"]),
|
||||
model=service["name"],
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ from tests.common import MockConfigEntry
|
|||
FAKE_SERVICES = [
|
||||
{
|
||||
"service_id": "12345678",
|
||||
"description": "Fake ABB NBN Service",
|
||||
"description": "Fake ABB NBN Service - AVC123456789",
|
||||
"type": "NBN",
|
||||
"name": "NBN",
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue