इस प्रोजेक्ट के बारे में
Mini Graph Card होम असिस्टेंट के लिए एक कस्टम Lovelace कार्ड है जो sensor और binary_sensor एंटिटी की वर्तमान स्थिति के साथ उनके इतिहास का लाइन या बार ग्राफ दिखाता है। इसे HACS के माध्यम से, बंडल को config/www में कॉपी करके मैन्युअल रूप से, या CLI डाउनलोड द्वारा इंस्टॉल किया जाता है, फिर Lovelace में JavaScript मॉड्यूल रिसोर्स के रूप में संदर्भित किया जाता है।
कार्ड को YAML में कॉन्फ़िगर किया जाता है। आवश्यक विकल्प हैं type (custom:mini-graph-card) और entities, जो sensor एंटिटी की सूची है। प्रत्येक एंटिटी एक सादा एंटिटी आईडी या विकल्पों वाला ऑब्जेक्ट हो सकता है जैसे attribute, name, color, unit, aggregate_func, show_state, show_legend_state, show_indicator, show_graph, show_line, show_fill, show_points, show_legend, state_adaptive_color, y_axis, fixed_value और smoothing।
कार्ड-स्तरीय विकल्पों में icon, icon_image, name, unit, tap_action, group, hours_to_show, points_per_hour, aggregate_func, group_by, update_interval, cache, show, animate, height, bar_spacing, line_width, line_color, color_thresholds, color_thresholds_transition, decimals, hour24, font_size, font_size_header, align_header, align_icon, align_state, lower_bound, upper_bound, min_bound_range, secondary bounds, smoothing, state_map, value_factor और logarithmic शामिल हैं।
show सूची UI तत्वों को नियंत्रित करती है: name, icon, state, graph (line, bar या false), fill, points, legend, average, extrema, labels, labels_secondary, name_adaptive_color, icon_adaptive_color और loading_indicator। एग्रीगेट फ़ंक्शन में avg, median, min, max, first, last, sum, delta और diff शामिल हैं। डेटा को interval, date या hour के अनुसार समूहित किया जा सकता है। रंग थ्रेशोल्ड स्मूद या हार्ड ट्रांज़िशन और मध्यवर्ती स्टॉप मानों के इंटरपोलेशन का समर्थन करते हैं। गैर-संख्यात्मक स्थितियों को state_map के माध्यम से लेबल में मैप किया जा सकता है, और नेस्टेड डिक्शनरी या सूचियों में attributes को डॉटेड पाथ से एक्सेस किया जा सकता है।
उदाहरणों में सिंगल-एंटिटी कार्ड, वैकल्पिक शैलियाँ, कई एंटिटी, बार चार्ट, साप्ताहिक इतिहास, केवल-ग्राफ कार्ड, हॉरिज़ॉन्टल स्टैक, डायनामिक लाइन रंग, सेकेंडरी y-अक्ष, तारीख के अनुसार समूहन, एग्रीगेशन फ़ंक्शन, बाइनरी सेंसर और अतिरिक्त केवल-स्थिति एंटिटी दिखाना शामिल है। थीम वेरिएबल mcg-title-letter-spacing और mcg-title-font-weight उपस्थिति अनुकूलन की अनुमति देते हैं। विकास के लिए nodejs और npm आवश्यक है, npm run build और npm run watch स्क्रिप्ट के साथ।
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.