402a0ea7dac4cb4f88afa1d862fee637ad1f9648,homeassistant/components/openweathermap/sensor.py,OpenWeatherMapForecastSensor,state,#OpenWeatherMapForecastSensor#,94
Before Change
Return the state of the device.
forecasts = self._weather_coordinator.data.get(ATTR_API_FORECAST)
if forecasts is not None and len(forecasts) > 0:
return forecasts[0].get(self._sensor_type, None)
return None
After Change
Return the state of the device.
forecasts = self._weather_coordinator.data.get(ATTR_API_FORECAST)
if forecasts is not None and len(forecasts) > 0:
value = forecasts[0].get(self._sensor_type, None)
if self._device_class is DEVICE_CLASS_TIMESTAMP:
value = datetime.datetime.fromtimestamp(
value, datetime.timezone.utc
).isoformat()
return value
return None
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: home-assistant/home-assistant
Commit Name: 402a0ea7dac4cb4f88afa1d862fee637ad1f9648
Time: 2021-01-13
Author: mail@spacegaier.de
File Name: homeassistant/components/openweathermap/sensor.py
Class Name: OpenWeatherMapForecastSensor
Method Name: state
Project Name: thenetcircle/dino
Commit Name: 5341a9e5947ef084513d9dc00b76d4a5c95cb65e
Time: 2016-11-24
Author: oscar.eriks@gmail.com
File Name: dino/db/redis.py
Class Name: DatabaseRedis
Method Name: is_banned_from_channel
Project Name: home-assistant/home-assistant
Commit Name: 0fdda9d0f64dc54731dcf0d610889fad99929b74
Time: 2021-01-14
Author: mail@spacegaier.de
File Name: homeassistant/components/openweathermap/sensor.py
Class Name: OpenWeatherMapForecastSensor
Method Name: state
Project Name: thenetcircle/dino
Commit Name: 5341a9e5947ef084513d9dc00b76d4a5c95cb65e
Time: 2016-11-24
Author: oscar.eriks@gmail.com
File Name: dino/db/redis.py
Class Name: DatabaseRedis
Method Name: is_banned_from_room