Closed jmorille closed 1 year ago
A quick code review, and the error should be in testing
https://github.com/yyrkoon94/lovelace-idf-mobilite/blob/main/dist/idf-mobilite.js#L91 This code variant should be more secure
createRERContent(lineDatas, exclude_lines, exclude_lines_ref, second_entity) {
const messagesList = this.hass.states[this.config.messages];
if (!lineDatas?.attributes['Siri'] || !lineDatas.attributes['Siri']?.ServiceDelivery?.StopMonitoringDelivery[0].ResponseTimestamp)
return html``
// Last update date
and https://github.com/yyrkoon94/lovelace-idf-mobilite/blob/main/dist/idf-mobilite.js#L235 could be fix with
createBUSContent(lineDatas, exclude_lines, exclude_lines_ref, second_entity) {
if (!lineDatas?.attributes['Siri'] || !lineDatas.attributes['Siri']?.ServiceDelivery?.StopMonitoringDelivery[0].ResponseTimestamp)
return html``
// Last update date
The pull request for this fi proposal https://github.com/yyrkoon94/lovelace-idf-mobilite/pull/9
The fix work
When activated ...
API Error, is because no more traffic after this time May be another fix for a better display
Hi,
Thanks for the debug and the fix. AND instead of OR, a classic one !
I merged your fix and made a new version v0.1.11
I updated to the version 0.1.11, and it work well
Thank you for your work.
when putting a
availability
option on the REST sensor, with a reference to a input_boolean switchWIth input_boolean
WHen switch are OFF, the data are not populated anymore, and a bug crash the JS with this message
When activate the input_boolean switch ON, the IHM not display the data because the js is in crash error So the the IHM not refresh anymore
Should be not enougth test in method https://github.com/yyrkoon94/lovelace-idf-mobilite/blob/main/dist/idf-mobilite.js#L91