mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Add entity translations to Huawei LTE (#98631)
This commit is contained in:
parent
0f4aae4128
commit
7c85d84133
@ -104,7 +104,7 @@ CONNECTION_STATE_ATTRIBUTES = {
|
|||||||
class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor):
|
class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor):
|
||||||
"""Huawei LTE mobile connection binary sensor."""
|
"""Huawei LTE mobile connection binary sensor."""
|
||||||
|
|
||||||
_attr_name: str = field(default="Mobile connection", init=False)
|
_attr_translation_key: str = field(default="mobile_connection", init=False)
|
||||||
_attr_entity_registry_enabled_default = True
|
_attr_entity_registry_enabled_default = True
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
@ -169,7 +169,7 @@ class HuaweiLteBaseWifiStatusBinarySensor(HuaweiLteBaseBinarySensor):
|
|||||||
class HuaweiLteWifiStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
class HuaweiLteWifiStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
||||||
"""Huawei LTE WiFi status binary sensor."""
|
"""Huawei LTE WiFi status binary sensor."""
|
||||||
|
|
||||||
_attr_name: str = field(default="WiFi status", init=False)
|
_attr_translation_key: str = field(default="wifi_status", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
@ -181,7 +181,7 @@ class HuaweiLteWifiStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
|||||||
class HuaweiLteWifi24ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
class HuaweiLteWifi24ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
||||||
"""Huawei LTE 2.4GHz WiFi status binary sensor."""
|
"""Huawei LTE 2.4GHz WiFi status binary sensor."""
|
||||||
|
|
||||||
_attr_name: str = field(default="2.4GHz WiFi status", init=False)
|
_attr_translation_key: str = field(default="24ghz_wifi_status", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
@ -193,7 +193,7 @@ class HuaweiLteWifi24ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
|||||||
class HuaweiLteWifi5ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
class HuaweiLteWifi5ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
||||||
"""Huawei LTE 5GHz WiFi status binary sensor."""
|
"""Huawei LTE 5GHz WiFi status binary sensor."""
|
||||||
|
|
||||||
_attr_name: str = field(default="5GHz WiFi status", init=False)
|
_attr_translation_key: str = field(default="5ghz_wifi_status", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
@ -205,7 +205,7 @@ class HuaweiLteWifi5ghzStatusBinarySensor(HuaweiLteBaseWifiStatusBinarySensor):
|
|||||||
class HuaweiLteSmsStorageFullBinarySensor(HuaweiLteBaseBinarySensor):
|
class HuaweiLteSmsStorageFullBinarySensor(HuaweiLteBaseBinarySensor):
|
||||||
"""Huawei LTE SMS storage full binary sensor."""
|
"""Huawei LTE SMS storage full binary sensor."""
|
||||||
|
|
||||||
_attr_name: str = field(default="SMS storage full", init=False)
|
_attr_translation_key: str = field(default="sms_storage_full", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
|
@ -137,7 +137,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"uptime": HuaweiSensorEntityDescription(
|
"uptime": HuaweiSensorEntityDescription(
|
||||||
key="uptime",
|
key="uptime",
|
||||||
name="Uptime",
|
translation_key="uptime",
|
||||||
icon="mdi:timer-outline",
|
icon="mdi:timer-outline",
|
||||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
device_class=SensorDeviceClass.DURATION,
|
device_class=SensorDeviceClass.DURATION,
|
||||||
@ -145,14 +145,14 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"WanIPAddress": HuaweiSensorEntityDescription(
|
"WanIPAddress": HuaweiSensorEntityDescription(
|
||||||
key="WanIPAddress",
|
key="WanIPAddress",
|
||||||
name="WAN IP address",
|
translation_key="wan_ip_address",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_registry_enabled_default=True,
|
entity_registry_enabled_default=True,
|
||||||
),
|
),
|
||||||
"WanIPv6Address": HuaweiSensorEntityDescription(
|
"WanIPv6Address": HuaweiSensorEntityDescription(
|
||||||
key="WanIPv6Address",
|
key="WanIPv6Address",
|
||||||
name="WAN IPv6 address",
|
translation_key="wan_ipv6_address",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
@ -165,61 +165,61 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"arfcn": HuaweiSensorEntityDescription(
|
"arfcn": HuaweiSensorEntityDescription(
|
||||||
key="arfcn",
|
key="arfcn",
|
||||||
name="ARFCN",
|
translation_key="arfcn",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"band": HuaweiSensorEntityDescription(
|
"band": HuaweiSensorEntityDescription(
|
||||||
key="band",
|
key="band",
|
||||||
name="Band",
|
translation_key="band",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"bsic": HuaweiSensorEntityDescription(
|
"bsic": HuaweiSensorEntityDescription(
|
||||||
key="bsic",
|
key="bsic",
|
||||||
name="Base station identity code",
|
translation_key="base_station_identity_code",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"cell_id": HuaweiSensorEntityDescription(
|
"cell_id": HuaweiSensorEntityDescription(
|
||||||
key="cell_id",
|
key="cell_id",
|
||||||
name="Cell ID",
|
translation_key="cell_id",
|
||||||
icon="mdi:transmission-tower",
|
icon="mdi:transmission-tower",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"cqi0": HuaweiSensorEntityDescription(
|
"cqi0": HuaweiSensorEntityDescription(
|
||||||
key="cqi0",
|
key="cqi0",
|
||||||
name="CQI 0",
|
translation_key="cqi0",
|
||||||
icon="mdi:speedometer",
|
icon="mdi:speedometer",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"cqi1": HuaweiSensorEntityDescription(
|
"cqi1": HuaweiSensorEntityDescription(
|
||||||
key="cqi1",
|
key="cqi1",
|
||||||
name="CQI 1",
|
translation_key="cqi1",
|
||||||
icon="mdi:speedometer",
|
icon="mdi:speedometer",
|
||||||
),
|
),
|
||||||
"dl_mcs": HuaweiSensorEntityDescription(
|
"dl_mcs": HuaweiSensorEntityDescription(
|
||||||
key="dl_mcs",
|
key="dl_mcs",
|
||||||
name="Downlink MCS",
|
translation_key="downlink_mcs",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"dlbandwidth": HuaweiSensorEntityDescription(
|
"dlbandwidth": HuaweiSensorEntityDescription(
|
||||||
key="dlbandwidth",
|
key="dlbandwidth",
|
||||||
name="Downlink bandwidth",
|
translation_key="downlink_bandwidth",
|
||||||
icon_fn=lambda x: bandwidth_icon((8, 15), x),
|
icon_fn=lambda x: bandwidth_icon((8, 15), x),
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"dlfrequency": HuaweiSensorEntityDescription(
|
"dlfrequency": HuaweiSensorEntityDescription(
|
||||||
key="dlfrequency",
|
key="dlfrequency",
|
||||||
name="Downlink frequency",
|
translation_key="downlink_frequency",
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"earfcn": HuaweiSensorEntityDescription(
|
"earfcn": HuaweiSensorEntityDescription(
|
||||||
key="earfcn",
|
key="earfcn",
|
||||||
name="EARFCN",
|
translation_key="earfcn",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"ecio": HuaweiSensorEntityDescription(
|
"ecio": HuaweiSensorEntityDescription(
|
||||||
key="ecio",
|
key="ecio",
|
||||||
name="EC/IO",
|
translation_key="ecio",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# https://wiki.teltonika.lt/view/EC/IO
|
# https://wiki.teltonika.lt/view/EC/IO
|
||||||
icon_fn=lambda x: signal_icon((-20, -10, -6), x),
|
icon_fn=lambda x: signal_icon((-20, -10, -6), x),
|
||||||
@ -228,18 +228,18 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"enodeb_id": HuaweiSensorEntityDescription(
|
"enodeb_id": HuaweiSensorEntityDescription(
|
||||||
key="enodeb_id",
|
key="enodeb_id",
|
||||||
name="eNodeB ID",
|
translation_key="enodeb_id",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"lac": HuaweiSensorEntityDescription(
|
"lac": HuaweiSensorEntityDescription(
|
||||||
key="lac",
|
key="lac",
|
||||||
name="LAC",
|
translation_key="lac",
|
||||||
icon="mdi:map-marker",
|
icon="mdi:map-marker",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"ltedlfreq": HuaweiSensorEntityDescription(
|
"ltedlfreq": HuaweiSensorEntityDescription(
|
||||||
key="ltedlfreq",
|
key="ltedlfreq",
|
||||||
name="LTE downlink frequency",
|
translation_key="lte_downlink_frequency",
|
||||||
format_fn=format_freq_mhz,
|
format_fn=format_freq_mhz,
|
||||||
suggested_display_precision=0,
|
suggested_display_precision=0,
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
@ -247,7 +247,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"lteulfreq": HuaweiSensorEntityDescription(
|
"lteulfreq": HuaweiSensorEntityDescription(
|
||||||
key="lteulfreq",
|
key="lteulfreq",
|
||||||
name="LTE uplink frequency",
|
translation_key="lte_uplink_frequency",
|
||||||
format_fn=format_freq_mhz,
|
format_fn=format_freq_mhz,
|
||||||
suggested_display_precision=0,
|
suggested_display_precision=0,
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
@ -255,7 +255,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"mode": HuaweiSensorEntityDescription(
|
"mode": HuaweiSensorEntityDescription(
|
||||||
key="mode",
|
key="mode",
|
||||||
name="Mode",
|
translation_key="mode",
|
||||||
format_fn=lambda x: (
|
format_fn=lambda x: (
|
||||||
{"0": "2G", "2": "3G", "7": "4G"}.get(x),
|
{"0": "2G", "2": "3G", "7": "4G"}.get(x),
|
||||||
None,
|
None,
|
||||||
@ -271,29 +271,29 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"pci": HuaweiSensorEntityDescription(
|
"pci": HuaweiSensorEntityDescription(
|
||||||
key="pci",
|
key="pci",
|
||||||
name="PCI",
|
translation_key="pci",
|
||||||
icon="mdi:transmission-tower",
|
icon="mdi:transmission-tower",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"plmn": HuaweiSensorEntityDescription(
|
"plmn": HuaweiSensorEntityDescription(
|
||||||
key="plmn",
|
key="plmn",
|
||||||
name="PLMN",
|
translation_key="plmn",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"rac": HuaweiSensorEntityDescription(
|
"rac": HuaweiSensorEntityDescription(
|
||||||
key="rac",
|
key="rac",
|
||||||
name="RAC",
|
translation_key="rac",
|
||||||
icon="mdi:map-marker",
|
icon="mdi:map-marker",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"rrc_status": HuaweiSensorEntityDescription(
|
"rrc_status": HuaweiSensorEntityDescription(
|
||||||
key="rrc_status",
|
key="rrc_status",
|
||||||
name="RRC status",
|
translation_key="rrc_status",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"rscp": HuaweiSensorEntityDescription(
|
"rscp": HuaweiSensorEntityDescription(
|
||||||
key="rscp",
|
key="rscp",
|
||||||
name="RSCP",
|
translation_key="rscp",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# https://wiki.teltonika.lt/view/RSCP
|
# https://wiki.teltonika.lt/view/RSCP
|
||||||
icon_fn=lambda x: signal_icon((-95, -85, -75), x),
|
icon_fn=lambda x: signal_icon((-95, -85, -75), x),
|
||||||
@ -302,7 +302,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"rsrp": HuaweiSensorEntityDescription(
|
"rsrp": HuaweiSensorEntityDescription(
|
||||||
key="rsrp",
|
key="rsrp",
|
||||||
name="RSRP",
|
translation_key="rsrp",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# http://www.lte-anbieter.info/technik/rsrp.php
|
# http://www.lte-anbieter.info/technik/rsrp.php
|
||||||
icon_fn=lambda x: signal_icon((-110, -95, -80), x),
|
icon_fn=lambda x: signal_icon((-110, -95, -80), x),
|
||||||
@ -312,7 +312,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"rsrq": HuaweiSensorEntityDescription(
|
"rsrq": HuaweiSensorEntityDescription(
|
||||||
key="rsrq",
|
key="rsrq",
|
||||||
name="RSRQ",
|
translation_key="rsrq",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# http://www.lte-anbieter.info/technik/rsrq.php
|
# http://www.lte-anbieter.info/technik/rsrq.php
|
||||||
icon_fn=lambda x: signal_icon((-11, -8, -5), x),
|
icon_fn=lambda x: signal_icon((-11, -8, -5), x),
|
||||||
@ -322,7 +322,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"rssi": HuaweiSensorEntityDescription(
|
"rssi": HuaweiSensorEntityDescription(
|
||||||
key="rssi",
|
key="rssi",
|
||||||
name="RSSI",
|
translation_key="rssi",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# https://eyesaas.com/wi-fi-signal-strength/
|
# https://eyesaas.com/wi-fi-signal-strength/
|
||||||
icon_fn=lambda x: signal_icon((-80, -70, -60), x),
|
icon_fn=lambda x: signal_icon((-80, -70, -60), x),
|
||||||
@ -332,7 +332,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"sinr": HuaweiSensorEntityDescription(
|
"sinr": HuaweiSensorEntityDescription(
|
||||||
key="sinr",
|
key="sinr",
|
||||||
name="SINR",
|
translation_key="sinr",
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
# http://www.lte-anbieter.info/technik/sinr.php
|
# http://www.lte-anbieter.info/technik/sinr.php
|
||||||
icon_fn=lambda x: signal_icon((0, 5, 10), x),
|
icon_fn=lambda x: signal_icon((0, 5, 10), x),
|
||||||
@ -342,23 +342,23 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"tac": HuaweiSensorEntityDescription(
|
"tac": HuaweiSensorEntityDescription(
|
||||||
key="tac",
|
key="tac",
|
||||||
name="TAC",
|
translation_key="tac",
|
||||||
icon="mdi:map-marker",
|
icon="mdi:map-marker",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"tdd": HuaweiSensorEntityDescription(
|
"tdd": HuaweiSensorEntityDescription(
|
||||||
key="tdd",
|
key="tdd",
|
||||||
name="TDD",
|
translation_key="tdd",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"transmode": HuaweiSensorEntityDescription(
|
"transmode": HuaweiSensorEntityDescription(
|
||||||
key="transmode",
|
key="transmode",
|
||||||
name="Transmission mode",
|
translation_key="transmission_mode",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"txpower": HuaweiSensorEntityDescription(
|
"txpower": HuaweiSensorEntityDescription(
|
||||||
key="txpower",
|
key="txpower",
|
||||||
name="Transmit power",
|
translation_key="transmit_power",
|
||||||
# The value we get from the API tends to consist of several, e.g.
|
# The value we get from the API tends to consist of several, e.g.
|
||||||
# PPusch:15dBm PPucch:2dBm PSrs:42dBm PPrach:1dBm
|
# PPusch:15dBm PPucch:2dBm PSrs:42dBm PPrach:1dBm
|
||||||
# Present as SIGNAL_STRENGTH only if it was parsed to a number.
|
# Present as SIGNAL_STRENGTH only if it was parsed to a number.
|
||||||
@ -372,18 +372,18 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"ul_mcs": HuaweiSensorEntityDescription(
|
"ul_mcs": HuaweiSensorEntityDescription(
|
||||||
key="ul_mcs",
|
key="ul_mcs",
|
||||||
name="Uplink MCS",
|
translation_key="uplink_mcs",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"ulbandwidth": HuaweiSensorEntityDescription(
|
"ulbandwidth": HuaweiSensorEntityDescription(
|
||||||
key="ulbandwidth",
|
key="ulbandwidth",
|
||||||
name="Uplink bandwidth",
|
translation_key="uplink_bandwidth",
|
||||||
icon_fn=lambda x: bandwidth_icon((8, 15), x),
|
icon_fn=lambda x: bandwidth_icon((8, 15), x),
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"ulfrequency": HuaweiSensorEntityDescription(
|
"ulfrequency": HuaweiSensorEntityDescription(
|
||||||
key="ulfrequency",
|
key="ulfrequency",
|
||||||
name="Uplink frequency",
|
translation_key="uplink_frequency",
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
@ -399,7 +399,9 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
descriptions={
|
descriptions={
|
||||||
"UnreadMessage": HuaweiSensorEntityDescription(
|
"UnreadMessage": HuaweiSensorEntityDescription(
|
||||||
key="UnreadMessage", name="SMS unread", icon="mdi:email-arrow-left"
|
key="UnreadMessage",
|
||||||
|
translation_key="sms_unread",
|
||||||
|
icon="mdi:email-arrow-left",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -410,7 +412,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"CurrentDayUsed": HuaweiSensorEntityDescription(
|
"CurrentDayUsed": HuaweiSensorEntityDescription(
|
||||||
key="CurrentDayUsed",
|
key="CurrentDayUsed",
|
||||||
name="Current day transfer",
|
translation_key="current_day_transfer",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:arrow-up-down-bold",
|
icon="mdi:arrow-up-down-bold",
|
||||||
@ -420,7 +422,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentMonthDownload": HuaweiSensorEntityDescription(
|
"CurrentMonthDownload": HuaweiSensorEntityDescription(
|
||||||
key="CurrentMonthDownload",
|
key="CurrentMonthDownload",
|
||||||
name="Current month download",
|
translation_key="current_month_download",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
@ -430,7 +432,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentMonthUpload": HuaweiSensorEntityDescription(
|
"CurrentMonthUpload": HuaweiSensorEntityDescription(
|
||||||
key="CurrentMonthUpload",
|
key="CurrentMonthUpload",
|
||||||
name="Current month upload",
|
translation_key="current_month_upload",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:upload",
|
icon="mdi:upload",
|
||||||
@ -448,7 +450,6 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"BatteryPercent": HuaweiSensorEntityDescription(
|
"BatteryPercent": HuaweiSensorEntityDescription(
|
||||||
key="BatteryPercent",
|
key="BatteryPercent",
|
||||||
name="Battery",
|
|
||||||
device_class=SensorDeviceClass.BATTERY,
|
device_class=SensorDeviceClass.BATTERY,
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -456,32 +457,32 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentWifiUser": HuaweiSensorEntityDescription(
|
"CurrentWifiUser": HuaweiSensorEntityDescription(
|
||||||
key="CurrentWifiUser",
|
key="CurrentWifiUser",
|
||||||
name="WiFi clients connected",
|
translation_key="wifi_clients_connected",
|
||||||
icon="mdi:wifi",
|
icon="mdi:wifi",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"PrimaryDns": HuaweiSensorEntityDescription(
|
"PrimaryDns": HuaweiSensorEntityDescription(
|
||||||
key="PrimaryDns",
|
key="PrimaryDns",
|
||||||
name="Primary DNS server",
|
translation_key="primary_dns_server",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"PrimaryIPv6Dns": HuaweiSensorEntityDescription(
|
"PrimaryIPv6Dns": HuaweiSensorEntityDescription(
|
||||||
key="PrimaryIPv6Dns",
|
key="PrimaryIPv6Dns",
|
||||||
name="Primary IPv6 DNS server",
|
translation_key="primary_ipv6_dns_server",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"SecondaryDns": HuaweiSensorEntityDescription(
|
"SecondaryDns": HuaweiSensorEntityDescription(
|
||||||
key="SecondaryDns",
|
key="SecondaryDns",
|
||||||
name="Secondary DNS server",
|
translation_key="secondary_dns_server",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"SecondaryIPv6Dns": HuaweiSensorEntityDescription(
|
"SecondaryIPv6Dns": HuaweiSensorEntityDescription(
|
||||||
key="SecondaryIPv6Dns",
|
key="SecondaryIPv6Dns",
|
||||||
name="Secondary IPv6 DNS server",
|
translation_key="secondary_ipv6_dns_server",
|
||||||
icon="mdi:ip",
|
icon="mdi:ip",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
@ -492,14 +493,14 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"CurrentConnectTime": HuaweiSensorEntityDescription(
|
"CurrentConnectTime": HuaweiSensorEntityDescription(
|
||||||
key="CurrentConnectTime",
|
key="CurrentConnectTime",
|
||||||
name="Current connection duration",
|
translation_key="current_connection_duration",
|
||||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
device_class=SensorDeviceClass.DURATION,
|
device_class=SensorDeviceClass.DURATION,
|
||||||
icon="mdi:timer-outline",
|
icon="mdi:timer-outline",
|
||||||
),
|
),
|
||||||
"CurrentDownload": HuaweiSensorEntityDescription(
|
"CurrentDownload": HuaweiSensorEntityDescription(
|
||||||
key="CurrentDownload",
|
key="CurrentDownload",
|
||||||
name="Current connection download",
|
translation_key="current_connection_download",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
@ -507,7 +508,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentDownloadRate": HuaweiSensorEntityDescription(
|
"CurrentDownloadRate": HuaweiSensorEntityDescription(
|
||||||
key="CurrentDownloadRate",
|
key="CurrentDownloadRate",
|
||||||
name="Current download rate",
|
translation_key="current_download_rate",
|
||||||
native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND,
|
native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND,
|
||||||
device_class=SensorDeviceClass.DATA_RATE,
|
device_class=SensorDeviceClass.DATA_RATE,
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
@ -515,7 +516,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentUpload": HuaweiSensorEntityDescription(
|
"CurrentUpload": HuaweiSensorEntityDescription(
|
||||||
key="CurrentUpload",
|
key="CurrentUpload",
|
||||||
name="Current connection upload",
|
translation_key="current_connection_upload",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:upload",
|
icon="mdi:upload",
|
||||||
@ -523,7 +524,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"CurrentUploadRate": HuaweiSensorEntityDescription(
|
"CurrentUploadRate": HuaweiSensorEntityDescription(
|
||||||
key="CurrentUploadRate",
|
key="CurrentUploadRate",
|
||||||
name="Current upload rate",
|
translation_key="current_upload_rate",
|
||||||
native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND,
|
native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND,
|
||||||
device_class=SensorDeviceClass.DATA_RATE,
|
device_class=SensorDeviceClass.DATA_RATE,
|
||||||
icon="mdi:upload",
|
icon="mdi:upload",
|
||||||
@ -531,7 +532,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"TotalConnectTime": HuaweiSensorEntityDescription(
|
"TotalConnectTime": HuaweiSensorEntityDescription(
|
||||||
key="TotalConnectTime",
|
key="TotalConnectTime",
|
||||||
name="Total connected duration",
|
translation_key="total_connected_duration",
|
||||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
device_class=SensorDeviceClass.DURATION,
|
device_class=SensorDeviceClass.DURATION,
|
||||||
icon="mdi:timer-outline",
|
icon="mdi:timer-outline",
|
||||||
@ -539,7 +540,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"TotalDownload": HuaweiSensorEntityDescription(
|
"TotalDownload": HuaweiSensorEntityDescription(
|
||||||
key="TotalDownload",
|
key="TotalDownload",
|
||||||
name="Total download",
|
translation_key="total_download",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
@ -547,7 +548,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
),
|
),
|
||||||
"TotalUpload": HuaweiSensorEntityDescription(
|
"TotalUpload": HuaweiSensorEntityDescription(
|
||||||
key="TotalUpload",
|
key="TotalUpload",
|
||||||
name="Total upload",
|
translation_key="total_upload",
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:upload",
|
icon="mdi:upload",
|
||||||
@ -563,17 +564,17 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"FullName": HuaweiSensorEntityDescription(
|
"FullName": HuaweiSensorEntityDescription(
|
||||||
key="FullName",
|
key="FullName",
|
||||||
name="Operator name",
|
translation_key="operator_name",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"Numeric": HuaweiSensorEntityDescription(
|
"Numeric": HuaweiSensorEntityDescription(
|
||||||
key="Numeric",
|
key="Numeric",
|
||||||
name="Operator code",
|
translation_key="operator_code",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
"State": HuaweiSensorEntityDescription(
|
"State": HuaweiSensorEntityDescription(
|
||||||
key="State",
|
key="State",
|
||||||
name="Operator search mode",
|
translation_key="operator_search_mode",
|
||||||
format_fn=lambda x: (
|
format_fn=lambda x: (
|
||||||
{"0": "Auto", "1": "Manual"}.get(x),
|
{"0": "Auto", "1": "Manual"}.get(x),
|
||||||
None,
|
None,
|
||||||
@ -587,7 +588,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"NetworkMode": HuaweiSensorEntityDescription(
|
"NetworkMode": HuaweiSensorEntityDescription(
|
||||||
key="NetworkMode",
|
key="NetworkMode",
|
||||||
name="Preferred mode",
|
translation_key="preferred_mode",
|
||||||
format_fn=lambda x: (
|
format_fn=lambda x: (
|
||||||
{
|
{
|
||||||
NetworkModeEnum.MODE_AUTO.value: "4G/3G/2G",
|
NetworkModeEnum.MODE_AUTO.value: "4G/3G/2G",
|
||||||
@ -611,62 +612,62 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
|||||||
descriptions={
|
descriptions={
|
||||||
"LocalDeleted": HuaweiSensorEntityDescription(
|
"LocalDeleted": HuaweiSensorEntityDescription(
|
||||||
key="LocalDeleted",
|
key="LocalDeleted",
|
||||||
name="SMS deleted (device)",
|
translation_key="sms_deleted_device",
|
||||||
icon="mdi:email-minus",
|
icon="mdi:email-minus",
|
||||||
),
|
),
|
||||||
"LocalDraft": HuaweiSensorEntityDescription(
|
"LocalDraft": HuaweiSensorEntityDescription(
|
||||||
key="LocalDraft",
|
key="LocalDraft",
|
||||||
name="SMS drafts (device)",
|
translation_key="sms_drafts_device",
|
||||||
icon="mdi:email-arrow-right-outline",
|
icon="mdi:email-arrow-right-outline",
|
||||||
),
|
),
|
||||||
"LocalInbox": HuaweiSensorEntityDescription(
|
"LocalInbox": HuaweiSensorEntityDescription(
|
||||||
key="LocalInbox",
|
key="LocalInbox",
|
||||||
name="SMS inbox (device)",
|
translation_key="sms_inbox_device",
|
||||||
icon="mdi:email",
|
icon="mdi:email",
|
||||||
),
|
),
|
||||||
"LocalMax": HuaweiSensorEntityDescription(
|
"LocalMax": HuaweiSensorEntityDescription(
|
||||||
key="LocalMax",
|
key="LocalMax",
|
||||||
name="SMS capacity (device)",
|
translation_key="sms_capacity_device",
|
||||||
icon="mdi:email",
|
icon="mdi:email",
|
||||||
),
|
),
|
||||||
"LocalOutbox": HuaweiSensorEntityDescription(
|
"LocalOutbox": HuaweiSensorEntityDescription(
|
||||||
key="LocalOutbox",
|
key="LocalOutbox",
|
||||||
name="SMS outbox (device)",
|
translation_key="sms_outbox_device",
|
||||||
icon="mdi:email-arrow-right",
|
icon="mdi:email-arrow-right",
|
||||||
),
|
),
|
||||||
"LocalUnread": HuaweiSensorEntityDescription(
|
"LocalUnread": HuaweiSensorEntityDescription(
|
||||||
key="LocalUnread",
|
key="LocalUnread",
|
||||||
name="SMS unread (device)",
|
translation_key="sms_unread_device",
|
||||||
icon="mdi:email-arrow-left",
|
icon="mdi:email-arrow-left",
|
||||||
),
|
),
|
||||||
"SimDraft": HuaweiSensorEntityDescription(
|
"SimDraft": HuaweiSensorEntityDescription(
|
||||||
key="SimDraft",
|
key="SimDraft",
|
||||||
name="SMS drafts (SIM)",
|
translation_key="sms_drafts_sim",
|
||||||
icon="mdi:email-arrow-right-outline",
|
icon="mdi:email-arrow-right-outline",
|
||||||
),
|
),
|
||||||
"SimInbox": HuaweiSensorEntityDescription(
|
"SimInbox": HuaweiSensorEntityDescription(
|
||||||
key="SimInbox",
|
key="SimInbox",
|
||||||
name="SMS inbox (SIM)",
|
translation_key="sms_inbox_sim",
|
||||||
icon="mdi:email",
|
icon="mdi:email",
|
||||||
),
|
),
|
||||||
"SimMax": HuaweiSensorEntityDescription(
|
"SimMax": HuaweiSensorEntityDescription(
|
||||||
key="SimMax",
|
key="SimMax",
|
||||||
name="SMS capacity (SIM)",
|
translation_key="sms_capacity_sim",
|
||||||
icon="mdi:email",
|
icon="mdi:email",
|
||||||
),
|
),
|
||||||
"SimOutbox": HuaweiSensorEntityDescription(
|
"SimOutbox": HuaweiSensorEntityDescription(
|
||||||
key="SimOutbox",
|
key="SimOutbox",
|
||||||
name="SMS outbox (SIM)",
|
translation_key="sms_outbox_sim",
|
||||||
icon="mdi:email-arrow-right",
|
icon="mdi:email-arrow-right",
|
||||||
),
|
),
|
||||||
"SimUnread": HuaweiSensorEntityDescription(
|
"SimUnread": HuaweiSensorEntityDescription(
|
||||||
key="SimUnread",
|
key="SimUnread",
|
||||||
name="SMS unread (SIM)",
|
translation_key="sms_unread_sim",
|
||||||
icon="mdi:email-arrow-left",
|
icon="mdi:email-arrow-left",
|
||||||
),
|
),
|
||||||
"SimUsed": HuaweiSensorEntityDescription(
|
"SimUsed": HuaweiSensorEntityDescription(
|
||||||
key="SimUsed",
|
key="SimUsed",
|
||||||
name="SMS messages (SIM)",
|
translation_key="sms_messages_sim",
|
||||||
icon="mdi:email-arrow-left",
|
icon="mdi:email-arrow-left",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -49,6 +49,236 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"mobile_connection": {
|
||||||
|
"name": "Mobile connection"
|
||||||
|
},
|
||||||
|
"wifi_status": {
|
||||||
|
"name": "Wi-Fi status"
|
||||||
|
},
|
||||||
|
"24ghz_wifi_status": {
|
||||||
|
"name": "2.4GHz Wi-Fi status"
|
||||||
|
},
|
||||||
|
"5ghz_wifi_status": {
|
||||||
|
"name": "5GHz Wi-Fi status"
|
||||||
|
},
|
||||||
|
"sms_storage_full": {
|
||||||
|
"name": "SMS storage full"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"uptime": {
|
||||||
|
"name": "Uptime"
|
||||||
|
},
|
||||||
|
"wan_ip_address": {
|
||||||
|
"name": "WAN IP address"
|
||||||
|
},
|
||||||
|
"wan_ipv6_address": {
|
||||||
|
"name": "WAN IPv6 address"
|
||||||
|
},
|
||||||
|
"arfcn": {
|
||||||
|
"name": "ARFCN"
|
||||||
|
},
|
||||||
|
"band": {
|
||||||
|
"name": "Band"
|
||||||
|
},
|
||||||
|
"base_station_identity_code": {
|
||||||
|
"name": "Base station identity code"
|
||||||
|
},
|
||||||
|
"cell_id": {
|
||||||
|
"name": "Cell ID"
|
||||||
|
},
|
||||||
|
"cqi0": {
|
||||||
|
"name": "CQI 0"
|
||||||
|
},
|
||||||
|
"cqi1": {
|
||||||
|
"name": "CQI 1"
|
||||||
|
},
|
||||||
|
"downlink_mcs": {
|
||||||
|
"name": "Downlink MCS"
|
||||||
|
},
|
||||||
|
"downlink_bandwidth": {
|
||||||
|
"name": "Downlink bandwidth"
|
||||||
|
},
|
||||||
|
"downlink_frequency": {
|
||||||
|
"name": "Downlink frequency"
|
||||||
|
},
|
||||||
|
"earfcn": {
|
||||||
|
"name": "EARFCN"
|
||||||
|
},
|
||||||
|
"ecio": {
|
||||||
|
"name": "EC/IO"
|
||||||
|
},
|
||||||
|
"enodeb_id": {
|
||||||
|
"name": "eNodeB ID"
|
||||||
|
},
|
||||||
|
"lac": {
|
||||||
|
"name": "LAC"
|
||||||
|
},
|
||||||
|
"lte_downlink_frequency": {
|
||||||
|
"name": "LTE downlink frequency"
|
||||||
|
},
|
||||||
|
"lte_uplink_frequency": {
|
||||||
|
"name": "LTE uplink frequency"
|
||||||
|
},
|
||||||
|
"pci": {
|
||||||
|
"name": "PCI"
|
||||||
|
},
|
||||||
|
"plmn": {
|
||||||
|
"name": "PLMN"
|
||||||
|
},
|
||||||
|
"rac": {
|
||||||
|
"name": "RAC"
|
||||||
|
},
|
||||||
|
"rrc_status": {
|
||||||
|
"name": "RRC status"
|
||||||
|
},
|
||||||
|
"rscp": {
|
||||||
|
"name": "RSCP"
|
||||||
|
},
|
||||||
|
"rsrp": {
|
||||||
|
"name": "RSRP"
|
||||||
|
},
|
||||||
|
"rsrq": {
|
||||||
|
"name": "RSRQ"
|
||||||
|
},
|
||||||
|
"rssi": {
|
||||||
|
"name": "RSSI"
|
||||||
|
},
|
||||||
|
"sinr": {
|
||||||
|
"name": "SINR"
|
||||||
|
},
|
||||||
|
"tac": {
|
||||||
|
"name": "TAC"
|
||||||
|
},
|
||||||
|
"tdd": {
|
||||||
|
"name": "TDD"
|
||||||
|
},
|
||||||
|
"transmission_mode": {
|
||||||
|
"name": "Transmission mode"
|
||||||
|
},
|
||||||
|
"transmit_power": {
|
||||||
|
"name": "Transmit power"
|
||||||
|
},
|
||||||
|
"uplink_mcs": {
|
||||||
|
"name": "Uplink MCS"
|
||||||
|
},
|
||||||
|
"uplink_bandwidth": {
|
||||||
|
"name": "Uplink bandwidth"
|
||||||
|
},
|
||||||
|
"uplink_frequency": {
|
||||||
|
"name": "Uplink frequency"
|
||||||
|
},
|
||||||
|
"sms_unread": {
|
||||||
|
"name": "SMS unread"
|
||||||
|
},
|
||||||
|
"current_day_transfer": {
|
||||||
|
"name": "Current day transfer"
|
||||||
|
},
|
||||||
|
"current_month_download": {
|
||||||
|
"name": "Current month download"
|
||||||
|
},
|
||||||
|
"current_month_upload": {
|
||||||
|
"name": "Current month upload"
|
||||||
|
},
|
||||||
|
"wifi_clients_connected": {
|
||||||
|
"name": "Wi-Fi clients connected"
|
||||||
|
},
|
||||||
|
"primary_dns_server": {
|
||||||
|
"name": "Primary DNS server"
|
||||||
|
},
|
||||||
|
"primary_ipv6_dns_server": {
|
||||||
|
"name": "Primary IPv6 DNS server"
|
||||||
|
},
|
||||||
|
"secondary_dns_server": {
|
||||||
|
"name": "Secondary DNS server"
|
||||||
|
},
|
||||||
|
"secondary_ipv6_dns_server": {
|
||||||
|
"name": "Secondary IPv6 DNS server"
|
||||||
|
},
|
||||||
|
"current_connection_duration": {
|
||||||
|
"name": "Current connection duration"
|
||||||
|
},
|
||||||
|
"current_connection_download": {
|
||||||
|
"name": "Current connection download"
|
||||||
|
},
|
||||||
|
"current_download_rate": {
|
||||||
|
"name": "Current download rate"
|
||||||
|
},
|
||||||
|
"current_connection_upload": {
|
||||||
|
"name": "Current connection upload"
|
||||||
|
},
|
||||||
|
"current_upload_rate": {
|
||||||
|
"name": "Current upload rate"
|
||||||
|
},
|
||||||
|
"total_connected_duration": {
|
||||||
|
"name": "Total connected duration"
|
||||||
|
},
|
||||||
|
"total_download": {
|
||||||
|
"name": "Total download"
|
||||||
|
},
|
||||||
|
"total_upload": {
|
||||||
|
"name": "Total upload"
|
||||||
|
},
|
||||||
|
"operator_name": {
|
||||||
|
"name": "Operator name"
|
||||||
|
},
|
||||||
|
"operator_code": {
|
||||||
|
"name": "Operator code"
|
||||||
|
},
|
||||||
|
"operator_search_mode": {
|
||||||
|
"name": "Operator search mode"
|
||||||
|
},
|
||||||
|
"preferred_mode": {
|
||||||
|
"name": "Preferred mode"
|
||||||
|
},
|
||||||
|
"sms_deleted_device": {
|
||||||
|
"name": "SMS deleted (device)"
|
||||||
|
},
|
||||||
|
"sms_drafts_device": {
|
||||||
|
"name": "SMS drafts (device)"
|
||||||
|
},
|
||||||
|
"sms_inbox_device": {
|
||||||
|
"name": "SMS inbox (device)"
|
||||||
|
},
|
||||||
|
"sms_capacity_device": {
|
||||||
|
"name": "SMS capacity (device)"
|
||||||
|
},
|
||||||
|
"sms_outbox_device": {
|
||||||
|
"name": "SMS outbox (device)"
|
||||||
|
},
|
||||||
|
"sms_unread_device": {
|
||||||
|
"name": "SMS unread (device)"
|
||||||
|
},
|
||||||
|
"sms_drafts_sim": {
|
||||||
|
"name": "SMS drafts (SIM)"
|
||||||
|
},
|
||||||
|
"sms_inbox_sim": {
|
||||||
|
"name": "SMS inbox (SIM)"
|
||||||
|
},
|
||||||
|
"sms_capacity_sim": {
|
||||||
|
"name": "SMS capacity (SIM)"
|
||||||
|
},
|
||||||
|
"sms_outbox_sim": {
|
||||||
|
"name": "SMS outbox (SIM)"
|
||||||
|
},
|
||||||
|
"sms_unread_sim": {
|
||||||
|
"name": "SMS unread (SIM)"
|
||||||
|
},
|
||||||
|
"sms_messages_sim": {
|
||||||
|
"name": "SMS messages (SIM)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"mobile_data": {
|
||||||
|
"name": "Mobile data"
|
||||||
|
},
|
||||||
|
"wifi_guest_network": {
|
||||||
|
"name": "Wi-Fi guest network"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"clear_traffic_statistics": {
|
"clear_traffic_statistics": {
|
||||||
"name": "Clear traffic statistics",
|
"name": "Clear traffic statistics",
|
||||||
|
@ -92,7 +92,7 @@ class HuaweiLteBaseSwitch(HuaweiLteBaseEntityWithDevice, SwitchEntity):
|
|||||||
class HuaweiLteMobileDataSwitch(HuaweiLteBaseSwitch):
|
class HuaweiLteMobileDataSwitch(HuaweiLteBaseSwitch):
|
||||||
"""Huawei LTE mobile data switch device."""
|
"""Huawei LTE mobile data switch device."""
|
||||||
|
|
||||||
_attr_name: str = field(default="Mobile data", init=False)
|
_attr_translation_key: str = field(default="mobile_data", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
@ -124,7 +124,7 @@ class HuaweiLteMobileDataSwitch(HuaweiLteBaseSwitch):
|
|||||||
class HuaweiLteWifiGuestNetworkSwitch(HuaweiLteBaseSwitch):
|
class HuaweiLteWifiGuestNetworkSwitch(HuaweiLteBaseSwitch):
|
||||||
"""Huawei LTE WiFi guest network switch device."""
|
"""Huawei LTE WiFi guest network switch device."""
|
||||||
|
|
||||||
_attr_name: str = field(default="WiFi guest network", init=False)
|
_attr_translation_key: str = field(default="wifi_guest_network", init=False)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
"""Initialize identifiers."""
|
"""Initialize identifiers."""
|
||||||
|
@ -16,7 +16,7 @@ from homeassistant.helpers.entity_registry import EntityRegistry
|
|||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
SWITCH_WIFI_GUEST_NETWORK = "switch.lte_wifi_guest_network"
|
SWITCH_WIFI_GUEST_NETWORK = "switch.lte_wi_fi_guest_network"
|
||||||
|
|
||||||
|
|
||||||
def magic_client(multi_basic_settings_value: dict) -> MagicMock:
|
def magic_client(multi_basic_settings_value: dict) -> MagicMock:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user