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

"lock" option not working on mobile devices since update to 4.0.0 #740

Closed
TheBToby opened this issue Jul 30, 2023 · 23 comments
Closed

"lock" option not working on mobile devices since update to 4.0.0 #740

TheBToby opened this issue Jul 30, 2023 · 23 comments
Labels

Comments

@TheBToby
Copy link

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser

Describe the bug
The "lock" option is not working on my mobile devices (iOS) after upgrading to 4.0.0 (app and browser). Works with no issue on the desktop browser version (Windows). The button still works (action), but does not respect the lock functionality and also does not show the lock icon.

Version of the card
Version: 4.0.0

To Reproduce
This is the configuration I used:

show_name: true
show_icon: true
type: custom:button-card
tap_action:
  action: toggle
entity: input_boolean.all_off
icon: mdi:power
lock:
  enabled: true
  duration: 5

Screenshots
If applicable, add screenshots to help explain your problem.

Expected behavior
Lock functionality working on the mobile version is the same as before upgrading to 4.0.0 (as described in the config reference and working on the desktop version)

Desktop (please complete the following information):

  • Browser [chrome]
  • Version [115.0.5790.110]

Smartphone (please complete the following information):

  • Device: [iPhone 14]
  • OS: [iOS 16.5.1]
  • Browser [chrome]
  • Version [115.0.5790.130]

Additional context
Add any other context about the problem here.

@TheBToby TheBToby added the bug Something isn't working label Jul 30, 2023
@RomRider
Copy link
Collaborator

I don't have a iDevice to test :( But as always apple is doing their own interpretation of HTML/CSS... It's always a PITA.
Will see what I can do

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jul 30, 2023

All of my locks are working as before and confirmation (if configured also)

iPhone 13 Pro here

@TheBToby
Copy link
Author

Funny thing: just checked with my wife’s Android phone… no issue there 🤔

@TheBToby
Copy link
Author

double-checked on my MacBook... no issue there as well...

@RomRider
Copy link
Collaborator

Did you clear the cache of the ios app?

@TheBToby
Copy link
Author

Yes, I did. I also rebooted the iPhone, Besides the official Home Assistant app for iOS and Chrome I also checked with Safari. Same issue but only on my iOS device (and on my son's iPhone XR, where I double-checked).

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jul 30, 2023

could you try this:

lock:
  tap_action:
    action: more-info
    haptic: light
  lock:
    enabled: true
    unlock: hold
    exemptions:
      - username: !secret button_unlock_name_1
      - username: !secret button_unlock_name_2
  confirmation:
    text: >
      [[[ return `Wil je ${entity.attributes.friendly_name} schakelen?`; ]]]
# [[[ return 'Are you sure you want to toggle ' + entity.attributes.friendly_name + '?'; ]]]
  styles:
    lock:
      - color: red
      - icon: mdi:lock-alert
      - z-index: 1

which is what I use and see working correctly on all iOS devices

not even sure we still need the z-index (which was required after HA Frontend changed things in core)

@zSprawl
Copy link

zSprawl commented Jul 30, 2023

I too have the same issue on iPhone. I rolled back to 3.5, and they reappeared. Ironically it’s the phone that needs the locks the most…

@TheBToby
Copy link
Author

@Mariusthvdb I just tested the configuration you posted. Same issue. The lock symbol appears on all non-iOS-based devices but not on my iPhones.

@Mariusthvdb
Copy link
Contributor

How odd..

To be sure: did you reset Frontend cache in the companion app settings? (Under error tracking)

@TheBToby
Copy link
Author

@Mariusthvdb Yes, first thing I did 😁

@Mariusthvdb
Copy link
Contributor

Aarrghh, then I am out of ideas .

Can't see a single issue on the locks here.
Hope Jerome will find it for you

@S-Przybylski
Copy link

After updating to 4.0.1 I got also issues in my dashboard:
I noticed that the lock disapeared and is not functioning. I saw this on Android using Kiosk browser and also on PC using Firefox. In addition I noticed that the button size is somehow enlarged a little bit, so that my dashboard is not fitting anymore.
Workaround: I tried to add the parameter aspect_ration (in my case: 1.8/1) and then everything works again.

Maybe also try to use the aspect_ratio to verify.

@GertJanArts
Copy link

Same here after update to 4.0 / 4.0.1 on IOS 17 beta. Companion app 2023.7. No lock icon and no lock functionality.
Working fine in Chrome on IOS

@OssiOswolf
Copy link

Same here on Android, the lock is working on my tablet with Companion App 2023.6.0 from fdroid, but not working with Companion App 2023.6.0 (same source) on my phone.
Updated to 2023.7.0 on the phone, but no change.
Yes, cache deleted ...
Experimented with the aspect_ratio and can confirm, that the icon + functionality are back, so this seams to be a valid workaround, but messes my card up, hehe

github-actions bot pushed a commit that referenced this issue Aug 1, 2023
## [4.1.0-dev.3](v4.1.0-dev.2...v4.1.0-dev.3) (2023-08-01)

### Bug Fixes

* lock would not display on many browsers ([245441b](245441b)), closes [#740](#740)
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

🎉 This issue has been resolved in version 4.1.0-dev.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@RomRider
Copy link
Collaborator

RomRider commented Aug 1, 2023

Note to myself: Don't F#(@$* touch CSS ever again...
family-guy-css

@RomRider
Copy link
Collaborator

RomRider commented Aug 2, 2023

Could anyone confirm this is now working with the latest beta?

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Aug 2, 2023

I have it working in the iOS app, Safari desktop Mac browser, Chrome and Firefox.
then again, it has always worked, so I might be not the best person to confirm...

HA 2023.8.0b4

@zSprawl
Copy link

zSprawl commented Aug 2, 2023

Yep the fix in the beta works great for me!

@GertJanArts
Copy link

Great! Works for me too (HA 2023.462 on iPhone)

@TheBToby
Copy link
Author

TheBToby commented Aug 2, 2023

The fix is working here as well! THX!

github-actions bot pushed a commit that referenced this issue Aug 3, 2023
## [4.1.0](v4.0.1...v4.1.0) (2023-08-03)

### Features

* **templates:** Support for one time evaluation of js templates in `triggers_update` and `entity` ([#741](#741)) ([b372642](b372642)), closes [#618](#618) [#558](#558) [#368](#368)

### Bug Fixes

* Keep default background color for color_type: card when off ([41dea3f](41dea3f)), closes [#737](#737)
* lock would not display on many browsers ([245441b](245441b)), closes [#740](#740)
* remove margin-top on name/label/state introduced with 4.0.0 which broke many cards ([53fee75](53fee75)), closes [#742](#742) [#744](#744)
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

No branches or pull requests

7 participants