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

Actions trigger the more-info window #217

Closed
mgiako opened this issue Dec 12, 2021 · 61 comments
Closed

Actions trigger the more-info window #217

mgiako opened this issue Dec 12, 2021 · 61 comments
Labels
bug Something isn't working

Comments

@mgiako
Copy link

mgiako commented Dec 12, 2021

Hi,

I have this entity:

image

which checks the status and can restart an ESP32 on esphome

the code is:

              - entity: binary_sensor.trackerterrazzaconnected
                show_state: false
                icon: mdi:car-esp
                type: custom:multiple-entity-row
                name: Terrazza
                entities:
                  - entity: sensor.trackerterrazza_signal
                    state_color: true
                    name: RSSI

                  - entity: sensor.trackerterrazza_uptime
                    state_color: true
                    name: uptime
                    format: total

                  - entity: binary_sensor.trackerterrazzaconnected
                    icon: mdi:wifi
                    state_color: true
                    name: false
                    tap_action:
                      action: call-service
                      service: switch.turn_on
                      service_data:
                        entity_id: switch.trackerterrazzarestart
                      confirmation:
                        text: "Restart ESP Terrazza?"

Since 2021.12.b0 (and still now on 2021.12.0) when I click on the wifi icon the action is performed but it also opens the more-info window of the main element: binary_sensor.trackerterrazzaconnected.
The window opens even if I click cancel in the confirmation.

I have other similar entities, and it happens on all of them, except on those that have an input text as their main entity.

It did not happen with HA 2021.11.5.

Thanks

@bkbilly
Copy link

bkbilly commented Dec 12, 2021

I have exactly the same problem, so I've looked for other options.

My temporary solution works only on desktop and it disables the more-info of the main element, but you can use the entities normally.

tap_action: none
hold_action: none
double_tap_action: none

Hope a more permanent solution is found.

@GuGu927
Copy link

GuGu927 commented Dec 12, 2021

Here's same problem.
Click entity at "entities" section dose not work.
Just main entity is poped up.

@GuGu927
Copy link

GuGu927 commented Dec 12, 2021

@bkbilly Thanks. Can use entities, but not entity.

@bkbilly
Copy link

bkbilly commented Dec 12, 2021

Yeah, I couldn't find a solution for that. It disables all actions of the main element binary_sensor.trackerterrazzaconnected.

@gumileeev
Copy link

gumileeev commented Dec 13, 2021

Same problem. When you click on an additional element, the main element window opens. When clicked, all elements of the group are selected.
This is true for the mobile version of the android, the browser is chrome.

@NickM-27
Copy link

I am having this issue as well, not sure if it is an issue for this plugin to solve or an issue for HA to solve?

@ildar170975
Copy link

The plugin was not changed.
HA changed.
Probably there are some general changes regarding handling actions.

@NickM-27
Copy link

Right, but it could be a bug introduced by HA update or it could be HA updated the requirements and the plug-in needs to accommodate that new change

@ildar170975
Copy link

Absolutely agree.
Let's wait for the plugin's author.
Hope he will help us.

@NickM-27
Copy link

I might be able to submit a PR if I find time tomorrow after work. I took a look tonight and I see the plug-in relies on custom-card-helper for clickHelper so it's possible that's where the issue lies. Can't tell if that comes from HA or somewhere else yet.

@NickM-27
Copy link

Looks like that is a dependency that comes from here: https://github.com/custom-cards/custom-card-helpers

@TobiasSchwarz74
Copy link

TobiasSchwarz74 commented Dec 14, 2021

Hi,
i have the same issue, but found out, that as long, as the main entity is a switch or light domain, everything works fine.
As soon, as the main entity is any other domain (i.e. a binary_sensor), tap actions on entities are no longer working on touch devices.
On a desktop everything works fine with a mouse!

Example:
The first row uses a switch as main entity - tap_action works fine.
The second row uses a binary_sensor (i.e. a template sensor to customize the icon and state depending on the state of a different entity) - tap_action does not work since 2021.12.

type: entities
entities:
  - type: custom:multiple-entity-row
    entity: switch.switch_1
    show_state: false
    tap_action: none
    entities:
      - entity: switch.switch_1
        tap_action:
          action: toggle
  - type: custom:multiple-entity-row
    entity: binary_sensor.binary_sensor_1
    show_state: false
    tap_action: none
    entities:
      - entity: switch.switch_1
        tap_action:
          action: toggle

Switching back to HA 2021.11.5, everything works fine again!!

@NickM-27
Copy link

@TobiasSchwarz74 Wow yeah I see the same thing, that is very odd but a great clue

@TobiasSchwarz74
Copy link

TobiasSchwarz74 commented Dec 14, 2021

@NickM-27 took me half of the day to find out in which situations this happens ;-)

@NickM-27
Copy link

NickM-27 commented Dec 14, 2021

I found something else interesting too. When I have the click action as more-info and I click on a sensor different to the main entity, the title of the more-info popup is the same as the main entity however the graph actually shows the correct information

sorta_right
sorta_correct

@Arman-GeDon
Copy link

I found something else interesting too. When I have the click action as more-info and I click on a sensor different to the main entity, the title of the more-info popup is the same as the main entity however the graph actually shows the correct information

If you wait a few seconds it will switch the graph to the main entity

@chengjwk
Copy link

It appears to be working for me now with 2021.12.2

@bkbilly
Copy link

bkbilly commented Dec 15, 2021

I've also updated on the new version 2021.12.2 and I've reloaded lovelace, but I still can't get the more-info appear on the other entities.

@NickM-27
Copy link

I also updated and am still seeing the issue

@Arman-GeDon
Copy link

Of course updating HA will fix nothing. The card needs to be adjusted to HA changes in release 2021.12.x

@chengjwk
Copy link

I'm not sure what to say. I've upgraded and the card is back to working they way it was prior to this bug appearing.

@TobiasSchwarz74
Copy link

No, still not working with 2021.12.2

@benct
Copy link
Owner

benct commented Dec 17, 2021

HA added a new action handler on the generic-entity-row which (intentionally or not) intercepts clicks on any additional entities added with multiple-entity-row. It still works as normal with some entity domains (like switch or light) because they disable this action handler for these specific domains.

Working on finding a workaround for this..

@TobiasSchwarz74
Copy link

Very interesting, why this changed behavior is only visible on touch devices and can't be seen on a desktop controlled with a mouse?!

@Arman-GeDon
Copy link

It's visible on a desktop controlled with a mouse

benct added a commit that referenced this issue Dec 17, 2021
Prevents triggering generic-entity-row action handler added in 2021.12.x
@tomlut
Copy link

tomlut commented Dec 18, 2021

Latest update fixed this for me. Thank you!

EDIT: Yeah only on desktop. Mobile still has the issue (iOS).

@NickM-27
Copy link

NickM-27 commented Dec 18, 2021

@Arman-GeDon Your code snippet does not show specific tap actions set for the entities (which might m be required for more info to show on switches). A screen recording might be helpful, otherwise it's not clear why desktop isn't working for you

@ildar170975
Copy link

ildar170975 commented Dec 18, 2021

Desktop, Win10x64, Chrome:
works fine

iPad Air 2 (iOS 15.x):
tapping on secondary entities leads to more-info for the main entity

iPhone 5S (iOS 12.x):
tapping on secondary entities :

  • either leads to more-info for the this entity
  • or does nothing

P.S. I stopped thinking about iOS companion app, it seems too buggy for me.

@Arman-GeDon
Copy link

@NickM-27
My bad, you're right. I was wrongly using attributes and not entities for sensors, which of course leads to main entity (attributes don't have history).
Desktop browser works

@kineticscreen
Copy link

Yep fixed on desktop, but not only does it still open up more-info on the Android app, but it doesn't also do the tap action.

@matze338
Copy link

Still Not Work on configurations with climate entities 😕

entity: climate.wohnzimmer_rechts
type: custom:multiple-entity-row
show_state: true
attribute: temperature
unit: °C
styles:
  width: 50px
entities:
  - entity: sensor.wohnzimmer
    name: false
    styles:
      width: 50px
  - entity: sensor.wohnzimmer_2
    name: false
    styles:
      width: 50px

@kineticscreen
Copy link

Oh yeah sorry mine was with a climate entity too.

@guidokieboom
Copy link

Does not yet work with 4.3.0 on mobile device (iOS).
Works different with 4.3.0 on desktop (Safari). Attribute result is now different. See screenshots (first one is from iOS; second is from desktop-Safari)

Screenshot 2021-12-18 at 07 48 41

Screenshot 2021-12-18 at 07 43 01

@j9brown
Copy link

j9brown commented Dec 18, 2021

Thanks for looking into this issue. I noticed that the paper-buttons-row plugin which is quite similar to multiple-entity-row seems to be immune to the problem. Perhaps we could learn something from how it wires up its action handlers.

@benct
Copy link
Owner

benct commented Dec 19, 2021

Attribute result is now different. See screenshots (first one is from iOS; second is from desktop-Safari)

@guidokieboom Could you create a separate issue? That seems not directly related to this issue.

I noticed that the paper-buttons-row plugin which is quite similar to multiple-entity-row seems to be immune to the problem. Perhaps we could learn something from how it wires up its action handlers.

That card appends the content to a new row, and does so in a completely differently way than here, unfortunately.

@benct
Copy link
Owner

benct commented Dec 19, 2021

There will likely come a fix for this issue from HA, soon. See #10961 for more info.

@NickM-27
Copy link

Awesome, glad to see it.

@NickM-27
Copy link

@benct I see that the frontend fix mentioned made it into 2021.12.4 today. I updated but unfortunately am still seeing this issue on mobile, not sure if it still requires a fix on the this integrations side?

Thanks!

benct added a commit that referenced this issue Dec 22, 2021
@benct
Copy link
Owner

benct commented Dec 22, 2021

... not sure if it still requires a fix on the this integrations side?

It does. Should be fixed in version 4.3.2 (clear cache, etc..).

@Arman-GeDon
Copy link

@benct Seems working on mobile after clearing app cach. Big thanks!

@Arman-GeDon
Copy link

@benct
What is not working is more-info on hold/double tap action when different than main entity is specified (desktop, mobile).
For example I'm expecting more-info on hold action for sensor.sensor3 but get for main entity (sensor.sensor1)

  - entity: sensor.sensor1
    type: custom:multiple-entity-row
    name: Energy
    secondary_info: last-updated
    show_state: false
    hold_action:
      action: more-info
      entity: sensor.sensor3
    entities:
      - entity: sensor.sensor2
        name: false

@NickM-27
Copy link

@benct works great! Thank you!

@NickM-27
Copy link

@Arman-GeDon as per the README, those are not supported for extra entities. Only tap_action is supported. So that's a feature request (I'd sure like to see too 👌) but not apart of this bug.

@Arman-GeDon
Copy link

@NickM-27
As you can see I'm using hold action for main entity and overriding entity-id as per the README

@benct
Copy link
Owner

benct commented Dec 22, 2021

What is not working is more-info on hold/double tap action when different than main entity is specified (desktop, mobile).

See #188.

Closing issue, thanks for all feedback 🙂

@benct benct closed this as completed Dec 22, 2021
@guidokieboom
Copy link

guidokieboom commented Dec 22, 2021 via email

@herr2d2
Copy link

herr2d2 commented Dec 22, 2021

@benct Works perfect ... Thanks a lot!

@afarago
Copy link

afarago commented Dec 22, 2021

Many thanks for your efforts, works fine now!

@poohbah
Copy link

poohbah commented Dec 23, 2021

Confirmed working again on android mobile but ONLY after clearing the app cache.

@mattthewclayton
Copy link

Sorry for reviving a closed issue, but I don't want to create a new one if I don't need to and I am just doing something stupid. My card works as expected on desktop, but not on iPhone.

In order for the toggle action to work on the entity (not the row) I have to do a long (3D?) press, and even then it's fairly intermittent if it works, you have to be very precise with your finger it seems.

Is this likely an issue with this integration (and I will open a new issue), or with the iOS companion app?

HA Version: 2022.5.0
Companion App: 2022.3

Screenshot 2022-05-14 at 12 02 21

entities:
  - entity: climate.living_room
    type: custom:multiple-entity-row
    icon: mdi:temperature-celsius
    secondary_info:
      attribute: current_temperature
      unit: °C
    name: Living
    tap_action: none
    show_state: false
    entities:
      - entity: light.living_room
        icon: mdi:ceiling-light
        name: Living
        tap_action:
          action: toggle
      - entity: light.dining_room
        icon: mdi:ceiling-light
        name: Dining
        tap_action:
          action: toggle
      - entity: light.kitchen
        icon: mdi:ceiling-light
        name: Kitchen
        tap_action:
          action: toggle
      - entity: switch.left_lamp
        icon: mdi:lamp
        name: Left
        tap_action:
          action: toggle
      - entity: switch.right_lamp
        icon: mdi:lamp
        name: Right
        tap_action:
          action: toggle

@tomlut
Copy link

tomlut commented May 14, 2022

Please don;t comment on closed (and unrelated) issues. Open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests