ngocjohn / vehicle-status-card

🚘 Lovelace custom card for tracking Vehicle status
https://ngocjohn.is-a.dev/vehicle-status-card/
MIT License
47 stars 3 forks source link

Left or right arrows from pop-up card also show empty pop-up for Action card #13

Closed rkkhanna closed 1 month ago

rkkhanna commented 1 month ago

Hi @ngocjohn, discovered potential bug (or enhancement request depending on how you look at it) while doing some more testing on the card. Best illustrated with picture below.

Screenshot on the left shows my button configuration - button 1 is a default button labeled 'Trip data', buttons 2 and 3 are custom cards, while button 4 'Update data' is an Action button to force Tesla integration to fetch data from the vehicle.

Screenshot in the middle is the pop-up card for button 1 'Trip data'. When I click on left arrow on this pop-up card (circled in purple), it shows me an empty pop-up for Action button 4 'Update data' (screenshot on the right).

Is it possible to suppress pop-up cards for Action buttons?

image

Thanks!

ngocjohn commented 1 month ago

Share you yaml config pls, and do you have the last offic version installed?

rkkhanna commented 1 month ago

Share you yaml config pls, and do you have the last offic version installed?

Hi @ngocjohn, I created a new card in a test dashboard with minimal configuration to recreate this issue. Refer card screenshot and card YAML below. If you pull up 'Trip data' popup card and then use left or right arrow on the popup, it shows a blank popup for 'Update data' Action button. Hope this helps in debugging this issue.

image

YAML code for card configuration above ``` type: custom:vehicle-status-card button_card: - button: notify: false primary: Trip data secondary: - '0': T entity: sensor.anju_model_x_odometer - h - i - s - ' ' - i - s - ' ' - a - ' ' - 'n' - e - w - ' ' - b - u - t - t - o - 'n' icon: mdi:map-marker-path button_type: default card_type: default custom_card: [] default_card: - collapsed_items: false items: - entity: sensor.anju_model_x_odometer - entity: sensor.anju_model_x_range - entity: sensor.anju_model_x_battery name: State of charge - entity: number.anju_model_x_charge_limit name: Max state of charge title: Overview - collapsed_items: true items: - entity: sensor.anju_model_x_temperature_inside name: Inside - entity: sensor.anju_model_x_temperature_outside name: Outside title: Vehicle temperature hide_button: false button_action: {} - button: primary: Update data secondary: - entity: sensor.modelx_data_last_updated attribute: '' state_template: '' notify: '' icon: mdi:timer-refresh-outline button_type: action hide_button: false card_type: default default_card: [] custom_card: [] button_action: entity: button.anju_model_x_force_data_update tap_action: action: perform-action perform_action: button.press target: entity_id: button.anju_model_x_force_data_update hold_action: action: none double_tap_action: action: none images: - url: /local/home_assistant_images/modelx/image_04.png title: /local/home_assistant_images/modelx/image_04.png - url: /local/home_assistant_images/modelx/image_03.png title: /local/home_assistant_images/modelx/image_03.png - url: /local/home_assistant_images/modelx/image_06.png title: /local/home_assistant_images/modelx/image_06.png - url: /local/home_assistant_images/modelx/image_05.png title: /local/home_assistant_images/modelx/image_05.png - url: /local/home_assistant_images/modelx/image_02.png title: /local/home_assistant_images/modelx/image_02.png indicators: group: - name: Charging visibility: '{{ is_state(''binary_sensor.anju_model_x_charging'', ''on'') }}' items: - entity: sensor.anju_model_x_charger_power name: Power icon: '' attribute: '' - entity: sensor.anju_model_x_battery name: Current state icon: '' attribute: '' - entity: number.anju_model_x_charge_limit name: Maximum icon: '' attribute: '' - entity: number.anju_model_x_charging_amps name: Amperage icon: '' attribute: '' - entity: sensor.anju_model_x_charging_rate name: Charging rate icon: '' attribute: '' icon: mdi:ev-station single: - entity: binary_sensor.anju_model_x_doors icon: '' attribute: '' icon_template: >- {{ 'mdi:lock' if is_state('lock.anju_model_x_doors', 'locked') else 'mdi:lock-open-alert' }} - entity: binary_sensor.anju_model_x_parking_brake icon: '' attribute: '' - entity: sensor.anju_model_x_shift_state icon: '' attribute: '' state_template: |2 {% if is_state('sensor.anju_model_x_shift_state', 'P') %} Park {% elif is_state('sensor.anju_model_x_shift_state', 'D') %} Drive {% elif is_state('sensor.anju_model_x_shift_state', 'R') %} Reverse {% else %} Neutral {% endif %} - entity: binary_sensor.anju_model_x_online icon: '' attribute: '' icon_template: >- {{ 'mdi:check-network-outline' if is_state('binary_sensor.anju_model_x_online', 'on') else 'mdi:close-network-outline' }} layout_config: button_grid: rows: 2 swipe: true hide: button_notify: false buttons: false images: false indicators: false mini_map: false range_info: false theme_config: mode: dark theme: Material Rounded images_swipe: autoplay: true mini_map: {} name: Tesla Model X range_info: - energy_level: - entity: sensor.anju_model_x_battery attribute: '' icon: '' range_level: - entity: sensor.anju_model_x_range attribute: '' progress_color: '#a3d39c' ```

Thanks!

rkkhanna commented 1 month ago

Share you yaml config pls, and do you have the last offic version installed?

Sorry, forgot to mention I am on v1.1.1-beta_2 version

ngocjohn commented 1 month ago

@rkkhanna Update your to the latest version, I've modified some features since the beta. Button with action type is skipped to next or previous tab 😉

rkkhanna commented 1 month ago

@rkkhanna Update your to the latest version, I've modified some features since the beta. Button with action type is skipped to next or previous tab 😉

Hi @ngocjohn, just updated to the latest ver 1.1.1. Cleared cache and restarted HA for good measure. Still getting the same behavior 😟. Refer video capture below:

https://github.com/user-attachments/assets/bc01e3c3-7428-4c1e-a575-b0e8627e7763

I also noticed another odd thing. If you look at the YAML for Single Indicators I attached in my previous post, you will see that indicator 1 is defined for Doors while indicator 2 is defined for Parking Brake. However, the card shows Parking as first single indicator and Doors as second one. I then noticed that these single indicators randomly change their sequence /position between themselves. If I am not making sense I can try and capture the behavior in another video grab and send to you. Let me know.

Thanks!

ngocjohn commented 1 month ago

In the companion app you have to clear the cache via debugging. Settings > Companion app > Debugging > Reset frontend cache.. Then close the app..If possible, try with a normal browser to see if the problem persists 😢 I have re-uploaded the new release, try downloading again and clearing the cache, both in the browser and in the app in the same way

rkkhanna commented 1 month ago

In the companion app you have to clear the cache via debugging. Settings > Companion app > Debugging > Reset frontend cache.. Then close the app..If possible, try with a normal browser to see if the problem persists 😢 I have re-uploaded the new release, try downloading again and clearing the cache, both in the browser and in the app in the same way

That did the trick! Downloaded ver 1.1.1 again and cleared cache as you suggested above. Not getting blank popup card anymore for Action button. Closing the issue as addressed.

Thanks!