458838e9c63688637bb765ce7d18142affb12148,homeassistant/components/sensor/swiss_public_transport.py,PublicTransportData,update,#PublicTransportData#,109
Before Change
try:
self.times.insert(0, dt_util.timestamp_to_short_time_str(
response.json()["connections"][0]["from"]
["departureTimestamp"]))
self.times.insert(1, dt_util.timestamp_to_short_time_str(
response.json()["connections"][1]["from"]
After Change
"fields[]=connections/from/departureTimestamp/&" +
"fields[]=connections/")
connections = response.json()["connections"][:2]
try:
return [
dt_util.datetime_to_short_time_str(
dt_util.as_local(dt_util.utc_from_timestamp(
item["from"]["departureTimestamp"]))
)
for item in connections
]
except KeyError:
return ["n/a"]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: home-assistant/home-assistant
Commit Name: 458838e9c63688637bb765ce7d18142affb12148
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update
Project Name: home-assistant/home-assistant
Commit Name: 512c4629b66dc3931c3ba36979f6ca6d08885bfe
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update
Project Name: home-assistant/home-assistant
Commit Name: 3b3f5fe6fe2092a5071491fafce11b3851d07ce8
Time: 2015-11-08
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/notify/instapush.py
Class Name:
Method Name: get_service