Multiple domains in NamecheapDNS?

I think it would be nice to change the namecheapdns component to support multiple domains. This would be a breaking change, since the config would change from a single value to a list of values.

Before

namecheapdns:
  domain: example.com
  host: hass
  password: !secret namecheapdns

After:

namecheapdns:
  - domain: example.com
    host: hass
    password: !secret namecheapdns

Would this be a welcome change? I’m happy to open a PR with the changes.

Reviving an old post, sorry for that!

Yes, this would be a much welcome change if it is still an option?

Thanks!

Never knew there was a namecheapdns component.

+1 yes please! :grinning:

+1 yes please, or more than 1 subdomain.

+1 yes please, trying to deal with this right now

I created a workaround using a script and the RESTful Command integration. I update a number of subdomains using a script/s. It uses the DNS IP integration to fetch the public IP and to pass it to the RESTful command. Simply update the variables to fit your own environment.

/config/rest_command.yaml

namecheap_ddns:
  url: "{{ namecheap_ddns_url }}"
  method: get
  verify_ssl: false

/config/scripts.yaml

alias: Namecheap
sequence:
  - variables:
      namecheap_host: www
      namecheap_domain: mydomain.com
      namecheap_password: password
      namecheap_url: https://dynamicdns.park-your-domain.com/update?host={{namecheap_host}}&domain={{namecheap_domain}}&password={{namecheap_password}}&ip={{states('sensor.myip')}}
  - service: rest_command.namecheap_ddns
    data:
      namecheap_ddns_url: '{{ namecheap_url }}'
mode: single

Sorry to revive this once more, but you can set up a wildcard for your host:

namecheapdns:
  host: "*"
  domain: "<your_domain>"
  password: !secret <your_password_id

This will catch all subdomains for your domain.

Sorry to bring this thread back, but if you are still using this integration, is it still working for you?
I just tried to set it up today, but putting the host as a wildcard gives a Updating namecheap domain failed error upon restarting home assistant.