File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
custom_components/fireflyiii_integration Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,20 @@ async def async_setup_entry(
4343 if config_entry .options :
4444 config .update (config_entry .options )
4545
46- coordinator = config [COORDINATOR ]
46+ coordinator : FireflyiiiCoordinator = config [COORDINATOR ]
4747
4848 user_locale = get_hass_locale (hass )
4949
5050 bills = []
51- obj = FireflyiiiBillCalendarEntity (
52- coordinator ,
53- FIREFLYIII_SENSOR_DESCRIPTIONS [FireflyiiiObjectType .BILLS ],
54- locale = user_locale ,
55- )
5651
57- bills .append (obj )
52+ if coordinator .user_data .get_bills :
53+ obj = FireflyiiiBillCalendarEntity (
54+ coordinator ,
55+ FIREFLYIII_SENSOR_DESCRIPTIONS [FireflyiiiObjectType .BILLS ],
56+ locale = user_locale ,
57+ )
58+
59+ bills .append (obj )
5860
5961 calendars = []
6062 calendars .extend (bills )
You can’t perform that action at this time.
0 commit comments