Skip to content

Commit 66205d3

Browse files
committed
3.0.0-beta4
Added single/double/hold separate actions. Fixed icon alignment to middle.
1 parent e013d5d commit 66205d3

File tree

10 files changed

+238
-719
lines changed

10 files changed

+238
-719
lines changed

.DS_Store

0 Bytes
Binary file not shown.

dist/.DS_Store

0 Bytes
Binary file not shown.

dist/cards/ultra-vehicle-card.d.ts

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export declare class UltraVehicleCard extends LitElement {
1212
hass: HomeAssistant;
1313
private config;
1414
private _templateService?;
15+
constructor();
1516
private static readonly DEFAULT_ACTIVE_STATES;
1617
private static readonly DEFAULT_INACTIVE_STATES;
1718
private _lastRenderTime;
@@ -22,11 +23,9 @@ export declare class UltraVehicleCard extends LitElement {
2223
private _templateSubscriptions;
2324
private _templateResults;
2425
private _confirmationCancelListeners;
25-
private _iconStateDebounceTimers;
26-
private _highlightedSections;
27-
private _activeTimedImage;
28-
private _timedImageTimeout;
29-
private _lastTimedImageStates;
26+
private _recentDoubleClick;
27+
private _holdTimer;
28+
private _currentHoldIcon;
3029
static getConfigElement(): HTMLElement;
3130
static getStubConfig(): {
3231
title: string;
@@ -44,27 +43,13 @@ export declare class UltraVehicleCard extends LitElement {
4443
static get styles(): import("lit").CSSResult;
4544
setConfig(config: UltraVehicleCardConfig): void;
4645
private _migrateBarsToIndividual;
47-
private _migrateImagesToNewFormat;
4846
private _cleanupInfoSections;
4947
private _saveConfigChanges;
5048
private _checkForGradientOrAnimationChanges;
5149
private _forceFullRender;
5250
protected render(): TemplateResult<1>;
53-
private _shouldDisplayImage;
54-
private _getImageUrl;
55-
private _getTimedImage;
56-
private _startTimedImage;
57-
private _clearTimedImage;
5851
private _renderImage;
5952
private _getFriendlyName;
60-
/**
61-
* Check if an entity is a location tracking entity with coordinate data
62-
*/
63-
private _isLocationTrackingEntity;
64-
/**
65-
* Render a map view for location tracking entities
66-
*/
67-
private _renderMapImage;
6853
private _formatValue;
6954
private _handleImageError;
7055
private _renderBar;
@@ -74,13 +59,9 @@ export declare class UltraVehicleCard extends LitElement {
7459
private _renderIconRows;
7560
private _renderIconRow;
7661
private _renderCardIcon;
77-
private _debouncedIconStateUpdate;
78-
private _iconHoldTimers;
79-
private _handleIconInteraction;
80-
private _handleIconPointerDown;
81-
private _handleIconPointerUp;
82-
private _handleIconPointerLeave;
8362
private _handleIconClick;
63+
private _startHoldTimer;
64+
private _clearHoldTimer;
8465
/**
8566
* Shows a toast notification
8667
* @param message The message to display
@@ -94,8 +75,6 @@ export declare class UltraVehicleCard extends LitElement {
9475
private _handleDragStart;
9576
private _handleDragEnd;
9677
private _hexToRgb;
97-
private _hsToRgb;
98-
private _colorTempToRgb;
9978
private _getZoneInfo;
10079
private _renderVehicleInfo;
10180
private _computeImageStyle;
@@ -125,7 +104,6 @@ export declare class UltraVehicleCard extends LitElement {
125104
private _getEntityForCoordinates;
126105
private _isDarkMode;
127106
private _closeMapPopup;
128-
private _shouldShowCard;
129107
private _shouldRenderSection;
130108
private _cancelConfirmation;
131109
private _checkBarSideCondition;
@@ -134,12 +112,4 @@ export declare class UltraVehicleCard extends LitElement {
134112
private _renderSingleInfoRow;
135113
private _renderSingleInfoEntity;
136114
private _handleInfoEntityClick;
137-
private _getDisplaySections;
138-
private _cleanupSectionsOrder;
139-
private _ensureInfoAndIconRowsInSectionsOrder;
140-
private _handleHighlightSections;
141-
private _isHighlighted;
142-
private _getHighlightClass;
143-
private _getImageHighlightStyle;
144-
private _handleClearHighlight;
145115
}

dist/debug-info.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Ultra Vehicle Card Debug Info
2-
// Version: 3.0.0-beta3
3-
// Build Date: 2025-06-10T17:30:01.017Z
2+
// Version: 3.0.0-beta4
3+
// Build Date: 2025-06-10T20:14:59.179Z
44
// Build Mode: production

dist/editor/.DS_Store

0 Bytes
Binary file not shown.

dist/editor/tabs/icons-tab.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,6 @@ export declare class IconsTab extends LitElement {
6262
private _toggleStateSettings;
6363
static styles: import("lit").CSSResult;
6464
private _navigateToCustomizeTab;
65+
private _renderIconActionsTab;
66+
private _getActionSchema;
6567
}

dist/types.d.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ export interface CustomCard {
156156
export interface IconConfig {
157157
entity: string;
158158
name?: string;
159-
interaction_type?: 'single' | 'double' | 'hold';
160159
icon_inactive?: string;
161160
icon_active?: string;
162161
color_inactive?: string;
@@ -185,6 +184,25 @@ export interface IconConfig {
185184
use_entity_color_for_icon_inactive?: boolean;
186185
use_entity_color_for_icon_background?: boolean;
187186
use_entity_color_for_container_background?: boolean;
187+
single_click_action?: 'toggle' | 'more-info' | 'navigate' | 'url' | 'call-service' | 'perform-action' | 'show-location-map' | 'location-map' | 'voice-assistant' | 'trigger' | 'no-action' | 'none';
188+
single_navigation_path?: string;
189+
single_url?: string;
190+
single_service?: string;
191+
single_service_data?: Record<string, any> | string;
192+
single_action?: Record<string, any> | string;
193+
double_click_action?: 'toggle' | 'more-info' | 'navigate' | 'url' | 'call-service' | 'perform-action' | 'show-location-map' | 'location-map' | 'voice-assistant' | 'trigger' | 'no-action' | 'none';
194+
double_navigation_path?: string;
195+
double_url?: string;
196+
double_service?: string;
197+
double_service_data?: Record<string, any> | string;
198+
double_action?: Record<string, any> | string;
199+
hold_click_action?: 'toggle' | 'more-info' | 'navigate' | 'url' | 'call-service' | 'perform-action' | 'show-location-map' | 'location-map' | 'voice-assistant' | 'trigger' | 'no-action' | 'none';
200+
hold_navigation_path?: string;
201+
hold_url?: string;
202+
hold_service?: string;
203+
hold_service_data?: Record<string, any> | string;
204+
hold_action?: Record<string, any> | string;
205+
hold_action_data?: Record<string, any> | string;
188206
on_click_action?: 'toggle' | 'more-info' | 'navigate' | 'url' | 'call-service' | 'perform-action' | 'show-location-map' | 'location-map' | 'voice-assistant' | 'trigger' | 'no-action';
189207
navigation_path?: string;
190208
url?: string;

dist/ultra-vehicle-card.js

Lines changed: 206 additions & 677 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/version.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
* Ultra Vehicle Card Version
33
* This is the single source of truth for version information
44
*/
5-
export declare const VERSION = "3.0.0-beta3";
5+
export declare const VERSION = "3.0.0-beta4";

dist/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Ultra Vehicle Card Version
3-
* v3.0.0-beta3
3+
* v3.0.0-beta4
44
*
55
* This file is auto-generated from src/version.ts
66
* DO NOT MODIFY DIRECTLY
@@ -13,6 +13,6 @@ function setVersion(value) {
1313
}
1414

1515
// Set default version (will be overridden by card)
16-
setVersion('3.0.0-beta3');
16+
setVersion('3.0.0-beta4');
1717

1818
export { version, setVersion };

0 commit comments

Comments
 (0)