Add icon translations to Modem callerID (#111929)
parent
23a1c559b2
commit
694c391c6b
|
@ -32,7 +32,6 @@ async def async_setup_entry(
|
|||
class PhoneModemButton(ButtonEntity):
|
||||
"""Implementation of USB modem caller ID button."""
|
||||
|
||||
_attr_icon = "mdi:phone-hangup"
|
||||
_attr_translation_key = "phone_modem_reject"
|
||||
_attr_has_entity_name = True
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ from serial import SerialException
|
|||
DATA_KEY_API = "api"
|
||||
DEFAULT_NAME = "Phone Modem"
|
||||
DOMAIN = "modem_callerid"
|
||||
ICON = "mdi:phone-classic"
|
||||
|
||||
EXCEPTIONS: Final = (
|
||||
FileNotFoundError,
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"entity": {
|
||||
"button": {
|
||||
"phone_modem_reject": {
|
||||
"default": "mdi:phone-hangup"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"incoming_call": {
|
||||
"default": "mdi:phone-classic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ from homeassistant.core import Event, HomeAssistant, callback
|
|||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import CID, DATA_KEY_API, DOMAIN, ICON
|
||||
from .const import CID, DATA_KEY_API, DOMAIN
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
@ -40,10 +40,10 @@ async def async_setup_entry(
|
|||
class ModemCalleridSensor(SensorEntity):
|
||||
"""Implementation of USB modem caller ID sensor."""
|
||||
|
||||
_attr_icon = ICON
|
||||
_attr_should_poll = False
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_translation_key = "incoming_call"
|
||||
|
||||
def __init__(self, api: PhoneModem, server_unique_id: str) -> None:
|
||||
"""Initialize the sensor."""
|
||||
|
|
Loading…
Reference in New Issue