fcdfebefd9d452952d16669c1257292865d7405b,homeassistant/components/sensor/wunderground.py,WUndergroundSensor,device_state_attributes,#WUndergroundSensor#,175
Before Change
multiple_alerts = len(self.rest.alerts) > 1
for data in self.rest.alerts:
for alert in ALERTS_ATTRS:
if data[alert]:
if multiple_alerts:
dkey = alert.capitalize() + "_" + data["type"]
else:
dkey = alert.capitalize()
attrs[dkey] = data[alert]
return attrs
@property
def entity_picture(self):
After Change
attrs = self._cfg_expand("device_state_attributes", {})
for (attr, callback) in attrs.items():
try:
attrs[attr] = callback(self.rest)
except TypeError:
attrs[attr] = callback
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: home-assistant/home-assistant
Commit Name: fcdfebefd9d452952d16669c1257292865d7405b
Time: 2017-05-07
Author: pezinek@gmail.com
File Name: homeassistant/components/sensor/wunderground.py
Class Name: WUndergroundSensor
Method Name: device_state_attributes
Project Name: matplotlib/matplotlib
Commit Name: 0b92b4f5530fee68432f13075a1ddc866748f9d1
Time: 2020-11-20
Author: anntzer.lee@gmail.com
File Name: examples/showcase/firefox.py
Class Name:
Method Name: svg_parse
Project Name: home-assistant/home-assistant
Commit Name: 7a70496b116569c0581927ed30a5c884dc379c42
Time: 2017-05-06
Author: pezinek@gmail.com
File Name: homeassistant/components/sensor/wunderground.py
Class Name: WUndergroundSensor
Method Name: device_state_attributes