c78850a983d8111169d7147c79be26e38b02b586,homeassistant/components/sensor/blink.py,BlinkSensor,update,#BlinkSensor#,69
Before Change
def update(self):
Retrieve sensor data from the camera.
camera = self.data.cameras[self._camera_name]
if self._type == "temperature":
self._state = camera.temperature
elif self._type == "battery":
self._state = camera.battery_string
elif self._type == "notifications":
self._state = camera.notifications
else:
self._state = None
_LOGGER.warning("Could not retrieve state from %s", self.name)
After Change
def update(self):
Retrieve sensor data from the camera.
self.data.refresh()
try:
self._state = self._camera.attributes[self._type]
except KeyError:
self._state = None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: home-assistant/home-assistant
Commit Name: c78850a983d8111169d7147c79be26e38b02b586
Time: 2018-10-02
Author: kfronczak@gmail.com
File Name: homeassistant/components/sensor/blink.py
Class Name: BlinkSensor
Method Name: update
Project Name: Featuretools/featuretools
Commit Name: 815c46b5e25c22d8c6ad2f4403df656b8a1ab629
Time: 2019-08-02
Author: kmax12@gmail.com
File Name: featuretools/computational_backends/calculate_feature_matrix.py
Class Name:
Method Name: calculate_feature_matrix
Project Name: dmnfarrell/pandastable
Commit Name: b8c1fd912f5ac4a6ab659d1f0c0612bd3c136e37
Time: 2015-06-29
Author: farrell.damien@gmail.com
File Name: pandastable/rename.py
Class Name: BatchRenameApp
Method Name: dopreview