iOS icon indicating copy to clipboard operation
iOS copied to clipboard

User defined start lovelace page doesn't work after app restart

Open Spirituss opened this issue 3 years ago • 11 comments
trafficstars

iOS device model, version and app version

Model Name: iPhone X Software Version: 14.5.1 App version: 2021.11.1

Home Assistant Core Version

Home Assistant Container core-2021.10.6

Describe the bug I use non default starting lovelace page, defined in user profile settings: Снимок экрана 2021-12-07 в 21 30 06

Almost every time when I start Home Assistant iOS app after some inactive period it starts not from my user defined "Entities" panel, but from HA default page "ui-lovelace.yaml". Thus I have to choose manually the item "Entities" from left bar menu. It looks like that every app restart it "looses" user setting at the first app launch. It often takes place in the launched app after network changes (for example, when you shift with iPhone from LTE to Wi-Fi or vice versa).

I use YAML lovelace mode.

To Reproduce

Expected behavior Start from the lovelace page defined in user profile.

Screenshots

Additional context

lovelace:
  mode: yaml
  dashboards:          
    lovelace-entities:
      mode: yaml
      title: Entities
      icon: mdi:palette-swatch
      show_in_sidebar: true
      filename: lovelace-entities.yaml
      require_admin: true

Spirituss avatar Dec 07 '21 17:12 Spirituss

This may be happening because your internal and external URLs are different hostnames, so the local settings are different between them. Do you find the page is lost even with taking this into consideration?

zacwest avatar Dec 10 '21 17:12 zacwest

Of course, they are different. Why should they be the same? But it's not the answer. In case the app can't find the previous page, it should go to the home page, which is defined in the user profile, but not to default lovelace home page.

Spirituss avatar Dec 10 '21 20:12 Spirituss

Did you change the setting in both the internal and external pages?

zacwest avatar Dec 10 '21 20:12 zacwest

What do you mean? HA user profile has only one initial page setup, pointing on the yaml page name, but not on the url. But I found that when I face the case, the user profile settings resets to 'default' lovelace page. May be this is the reason of problem.

Spirituss avatar Dec 13 '21 05:12 Spirituss

Did you change the setting in both the internal and external pages?

This is not the case. I switched off internal page at all, but situation is the same. After some period when the app was not used it try to use default HA page but not the page, defined in my user profile. So it’s definitely the bug.

Spirituss avatar Jan 10 '22 10:01 Spirituss

Any news here? The bug takes place even in the last update.

Spirituss avatar Mar 01 '22 05:03 Spirituss

What is the value of the setting on your app for Remember Last Page in General?

zacwest avatar Mar 01 '22 05:03 zacwest

What is the value of the setting on your app for Remember Last Page in General?

It is turned on (and was so).

Spirituss avatar Mar 01 '22 06:03 Spirituss

Turn it off. That setting controls whether the app remembers where you were when it's evicted from memory in the background. If you do not want the app to remember (and start at the same page as navigating to / initially), off will replicate that behavior.

zacwest avatar Mar 01 '22 06:03 zacwest

Turn it off. That setting controls whether the app remembers where you were when it's evicted from memory in the background. If you do not want the app to remember (and start at the same page as navigating to / initially), off will replicate that behavior.

I turned off it, will come back with the results soon.

Spirituss avatar Mar 01 '22 09:03 Spirituss

Turn it off. That setting controls whether the app remembers where you were when it's evicted from memory in the background. If you do not want the app to remember (and start at the same page as navigating to / initially), off will replicate that behavior.

I tested it. Still is the issue. With this option turned off the app goes to default HA page (ui-lovelace.yaml) but not to default user defined page. It is incorrect.

Spirituss avatar Mar 03 '22 04:03 Spirituss