Phone Modem

The modem_callerid integration uses an available modem for collecting caller ID information. It requires a Hayes AT compatible modem that supports caller ID detection (via AT+VCID=1). Usually any modem that uses a CX93001 will support this.

When the sensor detects a new call, its state changes to ‘ring’ for each ring and ‘callerid’ when caller id information is received. It returns to ‘idle’ once ringing stops. The state event includes an attribute payload that includes the time of the call, name, and number.

This integration also offers a button to pick up and then hang up the call to properly reject it (via ATA and ATH).

配置

要将 Phone Modem device 添加到您的 Home Assistant 实例中,请使用此 My 按钮:

手动配置步骤

如果上述 My 按钮不起作用,您也可以手动执行以下步骤:

Compatibility

Reported models with this integration include that work:

Devices that did not work:

Examples

An example automation:

automation:
  - alias: "Notify CallerID"
    triggers:
      - trigger: state
        entity_id: sensor.phone_modem
        to: "callerid"
    actions:
      - action: notify.notify
        data:
          message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }} at {{ state_attr('sensor.phone_modem', 'cid_number') }} "

  - alias: "Notify CallerID webui"
    triggers:
      - trigger: state
        entity_id: sensor.phone_modem
        to: "callerid"
    actions:
      - action: persistent_notification.create
        data:
          title: "Call from"
          message: "{{ state_attr('sensor.phone_modem', 'cid_time').strftime("%I:%M %p") }} {{ state_attr('sensor.phone_modem', 'cid_name') }}  {{ state_attr('sensor.phone_modem', 'cid_number') }} "

  - alias: "Say CallerID"
    triggers:
      - trigger: state
        entity_id: sensor.phone_modem
        to: "callerid"
    actions:
      - action: tts.google_say
        data:
          message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }}"