Skip to content

Commit

Permalink
fix: resolve issue where dashboard picker shows error if no calendar …
Browse files Browse the repository at this point in the history
…integration

fix #1495
  • Loading branch information
marksie1988 committed Jun 24, 2024
1 parent e46a229 commit 85df6f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/helpers/get-default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ export function getDefaultConfig(hass: HomeAssistant) {
);
});

// Return default config, ensuring entities array is not empty
return {
type: 'custom:atomic-calendar-revive',
name: 'Calendar',
enableModeChange: true,
entities: [
{
entity: calendarEntities[0]['entity_id'] ?? '',
icon: calendarEntities[0]['stateObj']?.attributes?.icon ?? '',
entity: calendarEntities[0]?.entity_id ?? '',
icon: calendarEntities[0]?.stateObj?.attributes?.icon ?? '',
},
],
};
Expand Down

0 comments on commit 85df6f3

Please sign in to comment.