1 """Support for Phone Modem button."""
3 from __future__
import annotations
5 from phone_modem
import PhoneModem
14 from .const
import DATA_KEY_API, DOMAIN
18 hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
20 """Set up the Modem Caller ID sensor."""
21 api = hass.data[DOMAIN][entry.entry_id][DATA_KEY_API]
26 entry.data[CONF_DEVICE],
34 """Implementation of USB modem caller ID button."""
36 _attr_translation_key =
"phone_modem_reject"
37 _attr_has_entity_name =
True
39 def __init__(self, api: PhoneModem, device: str, server_unique_id: str) ->
None:
40 """Initialize the button."""
47 """Press the button."""
48 await self.
apiapi.reject_call(self.
devicedevice)