diff --git a/homeassistant/components/modem_callerid/button.py b/homeassistant/components/modem_callerid/button.py index 5f9e4cf489c..703339f54e9 100644 --- a/homeassistant/components/modem_callerid/button.py +++ b/homeassistant/components/modem_callerid/button.py @@ -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 diff --git a/homeassistant/components/modem_callerid/const.py b/homeassistant/components/modem_callerid/const.py index d144e2afd5c..361766f22a7 100644 --- a/homeassistant/components/modem_callerid/const.py +++ b/homeassistant/components/modem_callerid/const.py @@ -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, diff --git a/homeassistant/components/modem_callerid/icons.json b/homeassistant/components/modem_callerid/icons.json new file mode 100644 index 00000000000..956d941f1db --- /dev/null +++ b/homeassistant/components/modem_callerid/icons.json @@ -0,0 +1,14 @@ +{ + "entity": { + "button": { + "phone_modem_reject": { + "default": "mdi:phone-hangup" + } + }, + "sensor": { + "incoming_call": { + "default": "mdi:phone-classic" + } + } + } +} diff --git a/homeassistant/components/modem_callerid/sensor.py b/homeassistant/components/modem_callerid/sensor.py index c7c4403300a..aac43b72c0d 100644 --- a/homeassistant/components/modem_callerid/sensor.py +++ b/homeassistant/components/modem_callerid/sensor.py @@ -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."""