@@ -758,12 +758,12 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
758758 year = datetime .now (ZoneInfo ("Europe/Prague" )).strftime ("%Y" )
759759 categories = store .category_totals (year = year , level = 1 , hide_discontinued = self ._rohlik_account .hide_discontinued )
760760 if not categories :
761- return {"year" : year , "enriched_orders" : store .enriched_count , "total_orders" : store .yearly_count (year )}
761+ return {"year" : year , "enriched_orders" : store .yearly_enriched_count ( year ) , "total_orders" : store .yearly_count (year )}
762762 return {
763763 "year" : year ,
764764 "total_count" : len (categories ),
765765 "categories" : categories [:self ._rohlik_account .top_n ],
766- "enriched_orders" : store .enriched_count ,
766+ "enriched_orders" : store .yearly_enriched_count ( year ) ,
767767 "total_orders" : store .yearly_count (year ),
768768 }
769769
@@ -844,12 +844,12 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
844844 year = datetime .now (ZoneInfo ("Europe/Prague" )).strftime ("%Y" )
845845 categories = store .category_totals (year = year , level = 0 , hide_discontinued = self ._rohlik_account .hide_discontinued )
846846 if not categories :
847- return {"year" : year , "enriched_orders" : store .enriched_count , "total_orders" : store .yearly_count (year )}
847+ return {"year" : year , "enriched_orders" : store .yearly_enriched_count ( year ) , "total_orders" : store .yearly_count (year )}
848848 return {
849849 "year" : year ,
850850 "total_count" : len (categories ),
851851 "categories" : categories [:self ._rohlik_account .top_n ],
852- "enriched_orders" : store .enriched_count ,
852+ "enriched_orders" : store .yearly_enriched_count ( year ) ,
853853 "total_orders" : store .yearly_count (year ),
854854 }
855855
@@ -930,12 +930,12 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
930930 year = datetime .now (ZoneInfo ("Europe/Prague" )).strftime ("%Y" )
931931 categories = store .category_totals (year = year , level = 2 , hide_discontinued = self ._rohlik_account .hide_discontinued )
932932 if not categories :
933- return {"year" : year , "enriched_orders" : store .enriched_count , "total_orders" : store .yearly_count (year )}
933+ return {"year" : year , "enriched_orders" : store .yearly_enriched_count ( year ) , "total_orders" : store .yearly_count (year )}
934934 return {
935935 "year" : year ,
936936 "total_count" : len (categories ),
937937 "categories" : categories [:self ._rohlik_account .top_n ],
938- "enriched_orders" : store .enriched_count ,
938+ "enriched_orders" : store .yearly_enriched_count ( year ) ,
939939 "total_orders" : store .yearly_count (year ),
940940 }
941941
@@ -1016,12 +1016,12 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
10161016 year = datetime .now (ZoneInfo ("Europe/Prague" )).strftime ("%Y" )
10171017 categories = store .category_totals (year = year , level = 3 , hide_discontinued = self ._rohlik_account .hide_discontinued )
10181018 if not categories :
1019- return {"year" : year , "enriched_orders" : store .enriched_count , "total_orders" : store .yearly_count (year )}
1019+ return {"year" : year , "enriched_orders" : store .yearly_enriched_count ( year ) , "total_orders" : store .yearly_count (year )}
10201020 return {
10211021 "year" : year ,
10221022 "total_count" : len (categories ),
10231023 "categories" : categories [:self ._rohlik_account .top_n ],
1024- "enriched_orders" : store .enriched_count ,
1024+ "enriched_orders" : store .yearly_enriched_count ( year ) ,
10251025 "total_orders" : store .yearly_count (year ),
10261026 }
10271027
0 commit comments