Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sensors are not clickable #69

Open
man55 opened this issue Aug 16, 2024 · 5 comments
Open

The sensors are not clickable #69

man55 opened this issue Aug 16, 2024 · 5 comments

Comments

@man55
Copy link

man55 commented Aug 16, 2024

Thank you for your work. The cards look great.
The only disappointment for me is that the sensors are not clickable - that is, it is impossible to click on the sensor and see the history graph.
This is terribly inconvenient, in fact, along with the stack-cards I need to hold a regular HA card next to it and it looks strange. Is there any way to configure this? I did not find it.

@ildar170975
Copy link

The stack-in-card is only supposed to show other cards in a stack, it does not show any sensors.
Show a SHORT code demonstrating the issue.

@man55
Copy link
Author

man55 commented Aug 22, 2024

For example, this part of the code from the project syssi/esphome-jk-bms#230:

type: custom:stack-in-card
keep:
  margin: false
  box_shadow: false
  background: false
cards:
  - type: grid
    square: false
    columns: 1
    cards:
      - type: markdown
        content: >-
          <center>Time:&nbsp;<b><font color=#3090C7>{{
          states('sensor.bms_bt_monitor_total_runtime_formatted') | upper
          }}</font>
  - type: grid
    square: false
    columns: 3
    cards:
      - type: markdown
        content: >-
          <center>Charge:&nbsp;<b>{% if states('switch.bms_bt_monitor_charging')
          == 'on' %} <font color=#41CD52>{{
          states('switch.bms_bt_monitor_charging') | upper }}</font> {% else %}
          <font color=red>{{ states('switch.bms_bt_monitor_charging') | upper
          }}</font> {% endif %} 
      - type: markdown
        content: >-
          <center>Discharge:&nbsp;<b> {% if
          states('switch.bms_bt_monitor_discharging') == 'on' %} <font
          color=#41CD52>{{ states('switch.bms_bt_monitor_discharging') | upper
          }}</font> {% else %} <font color=red>{{
          states('switch.bms_bt_monitor_discharging') | upper }}</font> {% endif
          %} 
      - type: markdown
        content: >-
          <center>Balance:&nbsp;<b> {% if
          states('switch.bms_bt_monitor_balancer') == 'on' %} <font
          color=#41CD52>{{ states('switch.bms_bt_monitor_balancer') | upper
          }}</font> {% else %} <font color=red>{{
          states('switch.bms_bt_monitor_balancer') | upper }}</font> {% endif
          %} 

For me it displays sensors. But they are not clickable.

@ildar170975
Copy link

You are missing the main principle of finding out a reason of a problem - SIMPLIFY.
First, this is not an issue with stack-in-card - it COULD BE an issue with some inner card you pasted into the stack.
Second, this is not an issue at all - the markdown card is not clickable.
Here is a short test example:
изображение
The markdown card merely shows a text, image, table - but cannot process mouse events (only to select a content by a mouse).

@man55
Copy link
Author

man55 commented Aug 22, 2024

Ok, thanks for the explanation.
This is not my project, I just took ready-made solutions.

The description of "Stack In Card" does not explain anything about the types. I don't even understand what to do with it.
I am completely satisfied with the appearance. But it lacks clickability. How can this be fixed?

@ildar170975
Copy link

ildar170975 commented Aug 22, 2024

The description of "Stack In Card" does not explain anything about the types.

The stack-in-card is similar to a standard vertical/horizontal-stack card (docs). It merely shows several cards as one card (with or w/o gaps between them).

But it lacks clickability. How can this be fixed?

Since this is a question about the Markdown card - I would suggest:

  1. Close this issue since it is not about stack-in-card.
  2. Ask a question in HA community (here). Show ONE of your markdown cards as an example and ask about tap_action. Probably people will propose you to replace the Markdown card with some other card (like a stock Button card, a custom button-card - i.e. you will be able to create a similar look but with cliackability).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants