For a couple of weeks now, I have been trying to find out why the state of my input booleans and variables are only restored sometimes.
I have had several theories:
Performance issues (DB): Tried local SQLite and external MariaDB. No difference.
Performance issues: Tried a clean setup with only one switch, two booleans and three variables. No difference.
Persistence package: Tried with and without. No difference.
Re-set the states every after every reboot: No difference.
For me this is a deal breaker. I need to rely on HA to resume states for obvious reasons. Not very smart home if it acts randomly and you never know which state the light schedules and alarm is in after a restart…
Right now I have reverted back to 0.61.1 since z-wave started acting funny in later versions, but I have tried all of the above in 0.63.3 as well.
Example from the database:
**Before restart - correct states:**
11778 variable variable.alarm_state **Natt** {"friendly_name": "Larm", "icon": "mdi:security-home", "persistent": true} NULL 2018-02-23 16:29 2018-02-23 16:29 2018-02-23 16:30
11952 variable variable.light_state **Dagsljus** {"friendly_name": "Belysning", "icon": "mdi:lightbulb-outline", "persistent": true} NULL 2018-02-23 16:30 2018-02-23 16:30 2018-02-23 16:30
11969 variable variable.heater_state **22.0 °C** {"friendly_name": "V\u00e4rme", "icon": "mdi:temperature-celsius", "persistent": true} NULL 2018-02-23 16:30 2018-02-23 16:30 2018-02-23 16:30
12001 input_boolean input_boolean.outdoor_lights_schedule **on** {"friendly_name": "Schema f\u00f6r utebelysning", "icon": "mdi:av-timer", "persistent": true} NULL 2018-02-23 16:30 2018-02-23 16:30 2018-02-23 16:30
12004 input_boolean input_boolean.common_lights_schedule **on** {"friendly_name": "Schema f\u00f6r allm\u00e4nljus", "icon": "mdi:av-timer", "persistent": true} NULL 2018-02-23 16:30 2018-02-23 16:30 2018-02-23 16:30
**After restart - incorrect values (should be the same as before restart):**
12592 input_boolean input_boolean.common_lights_schedule **off** {"friendly_name": "Schema f\u00f6r allm\u00e4nljus", "icon": "mdi:av-timer", "persistent": true} NULL 2018-02-23 16:34 2018-02-23 16:34 2018-02-23 16:37
12594 input_boolean input_boolean.outdoor_lights_schedule **off** {"friendly_name": "Schema f\u00f6r utebelysning", "icon": "mdi:av-timer", "persistent": true} NULL 2018-02-23 16:34 2018-02-23 16:34 2018-02-23 16:37
12600 variable variable.heater_state **unknown** {"friendly_name": "V\u00e4rme", "icon": "mdi:temperature-celsius", "persistent": true} NULL 2018-02-23 16:34 2018-02-23 16:34 2018-02-23 16:37
12601 variable variable.light_state **unknown** {"friendly_name": "Belysning", "icon": "mdi:lightbulb-outline", "persistent": true} NULL 2018-02-23 16:34 2018-02-23 16:34 2018-02-23 16:37
12602 variable variable.alarm_state **unknown** {"friendly_name": "Larm", "icon": "mdi:security-home", "persistent": true} NULL 2018-02-23 16:34 2018-02-23 16:34 2018-02-23 16:37
So, is it just me or do you all experience this after restarts?
Please, any tips are extremely welcome!