Skip to content

Commit

Permalink
Pass the no_attributes flag when they are not needed
Browse files Browse the repository at this point in the history
- Reduces backend I/O by up to 90%

- See related PR home-assistant/frontend#12082

- See related PR home-assistant/developers.home-assistant#1242
  • Loading branch information
bdraco committed Mar 21, 2022
1 parent 4aa28fc commit ec0c3c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ class MiniGraphCard extends LitElement {
url += `?filter_entity_id=${entityId}`;
if (end) url += `&end_time=${end.toISOString()}`;
if (skipInitialState) url += '&skip_initial_state';
if (!withAttributes) url += '&minimal_response';
if (!withAttributes) url += '&minimal_response&no_attributes';
if (withAttributes) url += '&significant_changes_only=0';
return this._hass.callApi('GET', url);
}
Expand Down

0 comments on commit ec0c3c2

Please sign in to comment.