vingerha / gtfs2

Support GTFS in Home Assistant GUI-only
https://github.com/vingerha/gtfs2
MIT License
65 stars 4 forks source link

[FEATURE]: Make Data Refresh for Local Stops available as Service Call #62

Closed dafunkydan closed 2 months ago

dafunkydan commented 2 months ago

Describe the solution you'd like A Possibility to trigger a Data refresh for local Stops by Service Call - basically the Function that runs in the Inverval specified in each Local Stops' Option.

This would come in handy when using Automations to e.g.

Hoping that it is just a matter of making an already existing Function (Data refresh) available by Service Call.

Describe alternatives you've considered There is already the Service Call "Update GTFS local stops", but this completly initalizes the given Stop(s), takes the corresponding Time and Ressources, and makes all Sensors temporary beeing unavailable.

Additional context Most of the Times, a high Update Interval for Local Stops not necessary. But sometimes a high Update/Refresh Interval, for both RT Data and them beeing displayed, is desired. The RT Data can be updated any Time via a Service Call.

But then, depending on the Data refresh Interval of the local Stop, it might take some Time til that gets displayed.

I'm thinking of e.g. a File-Sensor for the *.rt Data, and a Change of that triggers this Data Refresh. Or whenever a "high refreshrate flag" been set by the User, the Refresh happens every Minute at Second 01, while normally set to a higher Interval.

vingerha commented 2 months ago

You can do this already by refreshing the entity via a ha standard service call. In its current setup it is not possible to split the static call from the realtime as one serves the other I am not planning to rework this with an existing service call at hand

Sent from my iPhone, excuses for any briefness, typos and/or autocorrections

On 23 Apr 2024, at 16:49, dafunkydan @.***> wrote:



Describe the solution you'd like A Possibility to trigger a Data refresh for local Stops by Service Call - basically the Function that runs in the Inverval specified in each Local Stops' Option.

This would come in handy when using Automations to e.g.

Hoping that it is just a matter of making an already existing Function (Data refresh) available by Service Call.

Describe alternatives you've considered There is already the Service Call "Update GTFS local stops", but this completly initalizes the given Stop(s), takes the corresponding Time and Ressources, and makes all Sensors temporary beeing unavailable.

Additional context Most of the Times, a high Update Interval for Local Stops not necessary. But sometimes a high Update/Refresh Interval, for both RT Data and them beeing displayed, is desired. The RT Data can be updated any Time via a Service Call.

But then, depending on the Data refresh Interval of the local Stop, it might take some Time til that gets displayed.

I'm thinking of e.g. a File-Sensor for the *.rt Data, and a Change of that triggers this Data Refresh. Or whenever a "high refreshrate flag" been set by the User, the Refresh happens every Minute at Second 01, while normally set to a higher Interval.

— Reply to this email directly, view it on GitHubhttps://github.com/vingerha/gtfs2/issues/62, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKREVY3GA34TWE45VAL2DLTY6ZYGZAVCNFSM6AAAAABGVDIQRSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TSMBYHAZDANA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

dafunkydan commented 2 months ago

You can do this already by refreshing the entity via a ha standard service call

This is probably the fastest fulfilled Featurerequest 😄 I always forget about the systems entity-refresh call....

Thanks!!