c2525782aa12a8a74219339ff3d418e623c2fb68,homeassistant/components/sensor/whois.py,WhoisSensor,device_state_attributes,#WhoisSensor#,100
Before Change
@property
def device_state_attributes(self):
Get the more info attributes.
if self._data:
updated_formatted = self._updated_date.isoformat()
expires_formatted = self._expiration_date.isoformat()
return {
ATTR_NAME_SERVERS: " ".join(self._name_servers),
ATTR_REGISTRAR: self._data["registrar"][0],
ATTR_UPDATED: updated_formatted,
ATTR_EXPIRES: expires_formatted,
}
def update(self):
Get the current WHOIS data for hostname.
from pythonwhois.shared import WhoisException
After Change
@property
def device_state_attributes(self):
Get the more info attributes.
return self._attributes
def _empty_state_and_attributes(self):
Empty the state and attributes on an error.
self._state = None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: c2525782aa12a8a74219339ff3d418e623c2fb68
Time: 2017-12-01
Author: adam@genericstudent.com
File Name: homeassistant/components/sensor/whois.py
Class Name: WhoisSensor
Method Name: device_state_attributes
Project Name: home-assistant/home-assistant
Commit Name: a66528c64031c4ec8e2e497391f15389df888fce
Time: 2021-01-16
Author: mail@spacegaier.de
File Name: homeassistant/components/openweathermap/sensor.py
Class Name: OpenWeatherMapForecastSensor
Method Name: state
Project Name: home-assistant/home-assistant
Commit Name: 5677adc1040b7613d45a7fdd4dc9a17d592825f3
Time: 2021-01-15
Author: mail@spacegaier.de
File Name: homeassistant/components/openweathermap/sensor.py
Class Name: OpenWeatherMapForecastSensor
Method Name: state