{"id":71,"date":"2020-05-31T00:37:00","date_gmt":"2020-05-30T22:37:00","guid":{"rendered":"https:\/\/jbsoft.nl\/site\/?p=71"},"modified":"2024-01-14T12:57:23","modified_gmt":"2024-01-14T11:57:23","slug":"ha-entity-cache","status":"publish","type":"post","link":"https:\/\/jbsoft.nl\/site\/ha-entity-cache\/","title":{"rendered":"Caching automation application for Home Assistant"},"content":{"rendered":"\n<p>When automating with Home Assistant, you can use elements like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.home-assistant.io\/integrations\/input_select\/\">input_select<\/a> to create a picklist<\/li><li><a href=\"https:\/\/www.home-assistant.io\/integrations\/input_boolean\/\">input_boolean<\/a> or <a href=\"https:\/\/www.home-assistant.io\/integrations\/switch\">switch<\/a> to control a binary input or switch<\/li><li><a href=\"https:\/\/www.home-assistant.io\/integrations\/input_text\/\">input_text<\/a> to input a text.<\/li><li><a href=\"https:\/\/www.home-assistant.io\/integrations\/input_number\/\">input_number<\/a> to input a number or any other numeric control <\/li><\/ul>\n\n\n\n<p>They can be set through the config at be set to initial values. The current state will be reset to the initial value. You can use ha-entity-cache to recover to the last value set. Be aware that Home Assistant already restores certain values at restart.<\/p>\n\n\n\n<p>If you have other properties or attributes you want to make persistent, then have a look at this project.<\/p>\n\n\n\n<p>P.s. when you do not supply an initial value, Home assistant will recover state as well.<\/p>\n\n\n\n<p>See my project that enables caching the state and attributes of custom controls within Home Assistant.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/jbouwh\/ha-entity-cache\">https:\/\/github.com\/jbouwh\/ha-entity-cache<\/a><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When automating with Home Assistant, you can use elements like: input_select to create a picklist input_boolean or switch to control a binary input or switch input_text to input a text. input_number to input a number or any other numeric control They can be set through the config at be set to initial values. The current &hellip; <a href=\"https:\/\/jbsoft.nl\/site\/ha-entity-cache\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Caching automation application for Home Assistant&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,17,15],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-anouncements","category-ha-entity-cache","category-projects"],"_links":{"self":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":6,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/71\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}