Skip to content

Commit

Permalink
New attribute last_update
Browse files Browse the repository at this point in the history
  • Loading branch information
FaserF committed Jun 9, 2024
1 parent 3af3387 commit d5e39a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/deutschebahn/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def extra_state_attributes(self):
con["departure_current"] = corrected_departure_time.strftime("%H:%M")
con["arrival_current"] = corrected_arrival_time.strftime("%H:%M")
attributes["departures"] = self.connections
attributes["last_update"] = datetime.now()
return attributes

async def async_added_to_hass(self):
Expand Down

0 comments on commit d5e39a6

Please sign in to comment.