Input_boolean values not restored after restart

I upgraded to 0.39.3 hoping to take advantage of the new feature to have input_boolean variables restored when HA restarts. I have been testing this, but am not having any success. Is there something in a config file we need to set to make this work?

I have two variables input_boolean.vacation_mode and input_boolean.holiday_mode.

this feature worked out of the box after upgrading to 0.39. Nothing configured.
input_boolean and input_select are restored.

I think the last states get fetched from the database.
Maybe some excludes in Recorder?


Same here. It just worked. You do need to have recorder enabled.

No joy here…it is not working and I get no errors.

  db_url: postgres://@/homeassistant
  purge_days: 3

Hi dap35,

can you verify your database (db_url) setup is working?
Dont know much about postgres syntax, something like:

select * FROM states where entity_id like 'input_boolean%' order by created desc

(mysql) shows the last states for input_booleans.
If you get good results, i have no more idea what the problem could be, sorry.


Took me a bit of poking around, but the table is populated, and I can see where I have changed the values. FYI - here is the syntax from within psql .

postgres=# \c homeassistant
You are now connected to database "homeassistant" as user "postgres".
homeassistant=# select * from "states" where entity_id like 'input_boolean%' order by created desc;

state_id | domain | entity_id | state | attributes | event_id | last_changed | last_updated | created
179141 | input_boolean | input_boolean.vacation_mode | off | {“friendly_name”: “Vacation Mode”, “icon”: “mdi:beach”} | 185843 | 2017-03-06 19:31:01.315999-05 | 2017-03-06 19:31:01.315999-05 | 2017-03-07 00:31:01.945665-05
179140 | input_boolean | input_boolean.holiday_mode | off | {“friendly_name”: “Holiday Mode”, “icon”: “mdi:pine-tree”} | 185842 | 2017-03-06 19:31:01.310054-05 | 2017-03-06 19:31:01.310054-05 | 2017-03-07 00:31:01.873134-05
179136 | input_boolean | input_boolean.holiday_mode | on | {“icon”: “mdi:pine-tree”, “friendly_name”: “Holiday Mode”} | 185822 | 2017-03-06 19:28:55.546116-05 | 2017-03-06 19:28:55.546116-05 | 2017-03-07 00:28:59.083319-05