Refactored WHOIS sensor to resolve assumed key errors (#10662)
Refactored WHOIS sensor to resolve assumed key errors (#10662)

* Refactored WHOIS sensor to resolve assumed key errors

Altered it to now set an attribute key and value only if the attribute
is present in the WHOIS response. This prevents assumed keys (registrar)
from raising a KeyError on WHOIS lookups that don't contain registrar
information (onet.pl, wp.pl, for example).

* Removed non-used self._data

* WHOIS sensor now creates a new local attributes dict and overrides

* Corrected typos, refactored error cases to clear state adn attributes

* Resolved double return and refactored error logging

tboyce1/home-assistant,persandstrom/home-assistant,soldag/home-assistant,MartinHjelmare/home-assistant,HydrelioxGitHub/home-assistant,auduny/home-assistant,rohitranjan1991/home-assistant,sander76/home-assistant,robbiet480/home-assistant,ewandor/home-assistant,auduny/home-assistant,joopert/home-assistant,HydrelioxGitHub/home-assistant,DavidLP/home-assistant,kennedyshead/home-assistant,jnewland/home-assistant,tchellomello/home-assistant,FreekingDean/home-assistant,aequitas/home-assistant,balloob/home-assistant,jnewland/home-assistant,partofthething/home-assistant,tboyce1/home-assistant,tchellomello/home-assistant,Danielhiversen/home-assistant,pschmitt/home-assistant,GenericStudent/home-assistant,turbokongen/home-assistant,toddeye/home-assistant,w1ll1am23/home-assistant,mezz64/home-assistant,molobrakos/home-assistant,persandstrom/home-assistant,auduny/home-assistant,Cinntax/home-assistant,aequitas/home-assistant,tboyce021/home-assistant,kennedyshead/home-assistant,pschmitt/home-assistant,jamespcole/home-assistant,jawilson/home-assistant,joopert/home-assistant,Cinntax/home-assistant,tinloaf/home-assistant,toddeye/home-assistant,home-assistant/home-assistant,FreekingDean/home-assistant,ewandor/home-assistant,lukas-hetzenecker/home-assistant,rohitranjan1991/home-assistant,postlund/home-assistant,w1ll1am23/home-assistant,nugget/home-assistant,Teagan42/home-assistant,tboyce021/home-assistant,MartinHjelmare/home-assistant,PetePriority/home-assistant,lukas-hetzenecker/home-assistant,MartinHjelmare/home-assistant,mKeRix/home-assistant,tinloaf/home-assistant,tboyce1/home-assistant,sander76/home-assistant,jabesq/home-assistant,turbokongen/home-assistant,nkgilley/home-assistant,leppa/home-assistant,DavidLP/home-assistant,persandstrom/home-assistant,nugget/home-assistant,fbradyirl/home-assistant,balloob/home-assistant,mezz64/home-assistant,tinloaf/home-assistant,partofthething/home-assistant,mKeRix/home-assistant,adrienbrault/home-assistant,GenericStudent/home-assistant,jabesq/home-assistant,home-assistant/home-assistant,fbradyirl/home-assistant,jamespcole/home-assistant,molobrakos/home-assistant,jabesq/home-assistant,nugget/home-assistant,titilambert/home-assistant,tboyce1/home-assistant,soldag/home-assistant,nkgilley/home-assistant,qedi-r/home-assistant,sdague/home-assistant,titilambert/home-assistant,molobrakos/home-assistant,jnewland/home-assistant,aequitas/home-assistant,mKeRix/home-assistant,leppa/home-assistant,aronsky/home-assistant,HydrelioxGitHub/home-assistant,PetePriority/home-assistant,PetePriority/home-assistant,robbiet480/home-assistant,DavidLP/home-assistant,adrienbrault/home-assistant,mKeRix/home-assistant,postlund/home-assistant,sdague/home-assistant,jawilson/home-assistant,jamespcole/home-assistant,balloob/home-assistant,aronsky/home-assistant,fbradyirl/home-assistant,rohitranjan1991/home-assistant,ewandor/home-assistant,qedi-r/home-assistant,Teagan42/home-assistant,Danielhiversen/home-assistant