Skip to content

Commit

Permalink
Fix state attributes throw an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuezas committed Nov 16, 2022
1 parent 8ab1cb0 commit cad9031
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cache/fetch-states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ async function fetchStates(
? ""
: "no_attributes&";
const minimal_response_query =
minimal_response && isEntityIdAttrConfig(entity) ? "" : "minimal_response&";
isEntityIdAttrConfig(entity) || minimal_response == false
? ""
: "minimal_response&";
const significant_changes_only_query =
significant_changes_only && isEntityIdAttrConfig(entity) ? "0" : "1";
isEntityIdAttrConfig(entity) || significant_changes_only == false
? "0"
: "1";
const uri =
`history/period/${start.toISOString()}?` +
`filter_entity_id=${entity.entity}&` +
Expand Down

0 comments on commit cad9031

Please sign in to comment.