akloeckner / hacs-hafas

Port of kilimnik's HAFAS client for HACS
5 stars 2 forks source link

refactor: use self._attr_XYZ to reduce overhead #6

Closed akloeckner closed 9 months ago

akloeckner commented 9 months ago

As data only changes during async_update, we can store all attributes in self._attr_*. That way we reduce computational overhead. See also https://developers.home-assistant.io/docs/core/entity/#property-implementation.

Also add attribution to sensors.