diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/404.html b/404.html new file mode 100644 index 0000000000..5f2a99baf2 --- /dev/null +++ b/404.html @@ -0,0 +1,43 @@ + + + + + + + + + node-red-contrib-home-assistant-websocket + + + + + +

404

That's a Four-Oh-Four.
Take me home
+ + + diff --git a/FAQ.html b/FAQ.html new file mode 100644 index 0000000000..ca9c6e6efd --- /dev/null +++ b/FAQ.html @@ -0,0 +1,43 @@ + + + + + + + + + FAQ | node-red-contrib-home-assistant-websocket + + + + + +
+ + + diff --git a/assets/404.html-DwTfz_GW.js b/assets/404.html-DwTfz_GW.js new file mode 100644 index 0000000000..44a5648ef4 --- /dev/null +++ b/assets/404.html-DwTfz_GW.js @@ -0,0 +1 @@ +import{_ as e,c as o,a,o as n}from"./app-CefLgoES.js";const l={};function r(s,t){return n(),o("div",null,t[0]||(t[0]=[a("p",null,"404 Not Found",-1)]))}const _=e(l,[["render",r],["__file","404.html.vue"]]),i=JSON.parse('{"path":"/404.html","title":"","lang":"en-US","frontmatter":{"layout":"NotFound"},"headers":[],"git":{},"filePathRelative":null}');export{_ as comp,i as data}; diff --git a/assets/API.html-CoY0rX1m.js b/assets/API.html-CoY0rX1m.js new file mode 100644 index 0000000000..28ef43522a --- /dev/null +++ b/assets/API.html-CoY0rX1m.js @@ -0,0 +1 @@ +import{_ as d,c as p,a as t,d as l,b as o,e as i,w as s,r as n,o as h}from"./app-CefLgoES.js";const u={},c={id:"protocol",tabindex:"-1"},f={class:"header-anchor",href:"#protocol"};function m(g,e){const r=n("Badge"),a=n("RouteLink");return h(),p("div",null,[e[11]||(e[11]=t("h1",{id:"api",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#api"},[t("span",null,"API")])],-1)),e[12]||(e[12]=t("p",null,"The API node provides access to all points of the Home Assistant WebSocket and HTTP API. This enables you to interact programmatically with Home Assistant, sending and receiving data through these protocols. It’s a powerful tool for integrating third-party systems, custom automations, or advanced control within Node-RED, offering full access to Home Assistant's core functionalities.",-1)),e[13]||(e[13]=t("h2",{id:"config",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#config"},[t("span",null,"Config")])],-1)),t("h3",c,[t("a",f,[t("span",null,[e[0]||(e[0]=l("Protocol ")),o(r,{text:"required"})])])]),e[14]||(e[14]=i('

Protocol to use to access Home Assistant API.

Method

Type of method to use to access the HTTP endpoint.

Path

',6)),t("ul",null,[e[3]||(e[3]=t("li",null,[l("Type: "),t("code",null,"string")],-1)),t("li",null,[e[2]||(e[2]=l("Accepts ")),o(a,{to:"/guide/mustache-templates.html"},{default:s(()=>e[1]||(e[1]=[l("Mustache Templates")])),_:1})])]),e[15]||(e[15]=t("p",null,"URL of the API endpoint.",-1)),e[16]||(e[16]=t("h3",{id:"params",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#params"},[t("span",null,"Params")])],-1)),t("ul",null,[e[6]||(e[6]=t("li",null,[l("Type: "),t("code",null,"Object")],-1)),t("li",null,[e[5]||(e[5]=l("Accepts ")),o(a,{to:"/guide/mustache-templates.html"},{default:s(()=>e[4]||(e[4]=[l("Mustache Templates")])),_:1})])]),e[17]||(e[17]=t("p",null,"A JSON object with key/value pairs that will be converted into URL parameters.",-1)),e[18]||(e[18]=t("h3",{id:"data",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#data"},[t("span",null,"Data")])],-1)),t("ul",null,[e[10]||(e[10]=t("li",null,[l("Type: "),t("code",null,"Object")],-1)),t("li",null,[e[8]||(e[8]=l("Accepts ")),o(a,{to:"/guide/mustache-templates.html"},{default:s(()=>e[7]||(e[7]=[l("Mustache Templates")])),_:1}),e[9]||(e[9]=l(" when the data type is JSON"))])]),e[19]||(e[19]=i('

JSON Object to send for WebSocket requests and HTTP posts.

Results

Input

All properties need to be under msg.payload.

protocol

Overrides or sets the protocol property of the config.

method

Overrides or sets the method property of the config.

path

Overrides or sets the path property of the config.

data

Overrides or sets the data/params property of the config.

location

Overrides or sets the results property of the config.

locationType

Overrides or sets the results type property of the config.

Output

Value types:

References

',28))])}const y=d(u,[["render",m],["__file","API.html.vue"]]),v=JSON.parse('{"path":"/node/API.html","title":"API","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Config","slug":"config","link":"#config","children":[{"level":3,"title":"Protocol","slug":"protocol","link":"#protocol","children":[]},{"level":3,"title":"Method","slug":"method","link":"#method","children":[]},{"level":3,"title":"Path","slug":"path","link":"#path","children":[]},{"level":3,"title":"Params","slug":"params","link":"#params","children":[]},{"level":3,"title":"Data","slug":"data","link":"#data","children":[]},{"level":3,"title":"Results","slug":"results","link":"#results","children":[]}]},{"level":2,"title":"Input","slug":"input","link":"#input","children":[{"level":3,"title":"protocol","slug":"protocol-1","link":"#protocol-1","children":[]},{"level":3,"title":"method","slug":"method-1","link":"#method-1","children":[]},{"level":3,"title":"path","slug":"path-1","link":"#path-1","children":[]},{"level":3,"title":"data","slug":"data-1","link":"#data-1","children":[]},{"level":3,"title":"location","slug":"location","link":"#location","children":[]},{"level":3,"title":"locationType","slug":"locationtype","link":"#locationtype","children":[]}]},{"level":2,"title":"Output","slug":"output","link":"#output","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6},{"name":"Keir Stiegler","email":"keir.stiegler@gmail.com","commits":1}]},"filePathRelative":"node/API.md"}');export{y as comp,v as data}; diff --git a/assets/DocsOnly-BeiTa4Zx.js b/assets/DocsOnly-BeiTa4Zx.js new file mode 100644 index 0000000000..c5f7ad328d --- /dev/null +++ b/assets/DocsOnly-BeiTa4Zx.js @@ -0,0 +1 @@ +import{_ as o,o as s,c,f as n}from"./app-CefLgoES.js";const t={},r={class:"docs-only"};function l(e,_){return s(),c("div",r,[n(e.$slots,"default")])}const f=o(t,[["render",l],["__file","DocsOnly.vue"]]);export{f as default}; diff --git a/assets/FAQ.html-Dbka2djZ.js b/assets/FAQ.html-Dbka2djZ.js new file mode 100644 index 0000000000..17d66cf429 --- /dev/null +++ b/assets/FAQ.html-Dbka2djZ.js @@ -0,0 +1 @@ +import{_ as i,c as s,a as t,b as r,w as l,d as o,e as n,r as d,o as h}from"./app-CefLgoES.js";const c={};function u(p,e){const a=d("RouteLink");return h(),s("div",null,[e[3]||(e[3]=t("h1",{id:"faq",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#faq"},[t("span",null,"FAQ")])],-1)),e[4]||(e[4]=t("h2",{id:"what-is-what",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#what-is-what"},[t("span",null,"What is What?")])],-1)),t("ul",null,[t("li",null,[t("p",null,[r(a,{to:"/"},{default:l(()=>e[0]||(e[0]=[o("node-red-contrib-home-assistant-websocket")])),_:1}),e[1]||(e[1]=o(": A Node-RED package containing nodes that interface with Home Assistant using the WebSocket API."))])]),e[2]||(e[2]=n('
  • hass-node-red: A custom Home Assistant integration that extends the WebSocket API, allowing Node-RED to create sensors, buttons, and switches in Home Assistant. It is usually installed via HACS but can also be installed manually.

  • Node-RED Home Assistant Community Add-on: A Home Assistant Add-on that runs Node-RED with Home Assistant nodes pre-installed.

  • Node-RED: A flow-based development tool for visual programming, originally developed by IBM, used to wire together hardware devices, APIs, and online services as part of the Internet of Things.

  • Home Assistant: An open-source home automation platform focused on local control and privacy.

  • ',4))]),e[5]||(e[5]=n('

    Entities Not Showing in the Autocomplete Dropdown

    1. Ensure you've deployed at least once after adding a server configuration.
    2. If there's a caching issue, disable caching for autocomplete results in the server config node, and restart Node-RED.

    Entity Could Not Be Found in Cache for entity_id: ???

    This error occurs if your flow runs before Node-RED connects to Home Assistant and retrieves the latest state information, leaving the cache empty.

    For Home Assistant Add-on users, there is a 5-second delay between connection attempts due to the supervisor proxy, which can cause high CPU usage. This delay can be turned off in the server config (Issue #76).

    Why Do Some of My Nodes Have a Yellow Font?

    Starting with version 0.12.0, individual nodes in the workspace will have a version number associated with them, allowing structural changes without affecting all nodes of that type until edited. Nodes with legacy versions will display yellow font until upgraded.

    Yellow text on a node doesn’t mean it needs immediate updating; it will continue functioning as before and will be upgraded the next time you modify it.

    ',8))])}const m=i(c,[["render",u],["__file","FAQ.html.vue"]]),w=JSON.parse('{"path":"/FAQ.html","title":"FAQ","lang":"en-US","frontmatter":{"sidebar":"auto"},"headers":[{"level":2,"title":"What is What?","slug":"what-is-what","link":"#what-is-what","children":[]},{"level":2,"title":"Entities Not Showing in the Autocomplete Dropdown","slug":"entities-not-showing-in-the-autocomplete-dropdown","link":"#entities-not-showing-in-the-autocomplete-dropdown","children":[]},{"level":2,"title":"Entity Could Not Be Found in Cache for entity_id: ???","slug":"entity-could-not-be-found-in-cache-for-entity-id","link":"#entity-could-not-be-found-in-cache-for-entity-id","children":[]},{"level":2,"title":"Why Do Some of My Nodes Have a Yellow Font?","slug":"why-do-some-of-my-nodes-have-a-yellow-font","link":"#why-do-some-of-my-nodes-have-a-yellow-font","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"FAQ.md"}');export{m as comp,w as data}; diff --git a/assets/InfoPanelOnly-uYuedY0y.js b/assets/InfoPanelOnly-uYuedY0y.js new file mode 100644 index 0000000000..0796665f54 --- /dev/null +++ b/assets/InfoPanelOnly-uYuedY0y.js @@ -0,0 +1 @@ +import{_ as n}from"./app-CefLgoES.js";const e={};function _(r,c){return null}const o=n(e,[["render",_],["__file","InfoPanelOnly.vue"]]);export{o as default}; diff --git a/assets/Scrubber-Xf9jN2YZ.js b/assets/Scrubber-Xf9jN2YZ.js new file mode 100644 index 0000000000..e29ca27bc8 --- /dev/null +++ b/assets/Scrubber-Xf9jN2YZ.js @@ -0,0 +1 @@ +import{_ as b,o as n,c as l,a as o,g as d,v as y,d as c,h as u,i as h,b as f,w as v,T as m}from"./app-CefLgoES.js";const w=["ha-api","api-call-service","api-current-state","ha-device","ha-entity","server-events","server-state-changed","ha-fire-event","ha-get-entities","api-get-history","poll-state","api-render-template","ha-select","ha-sentence","trigger-state","ha-tag","ha-time","ha-wait-until","ha-webhook","ha-zone","server","ha-device-config","ha-entity-config","ha-binary-sensor","ha-button","ha-number","ha-sensor","ha-switch","ha-text","ha-time-entity","ha-update-config"],x={data:function(){return{after:"",before:"",replaceServerId:"",serverId:"",showCopied:!1,showError:!1}},methods:{scrub:function(t){let e;try{e=JSON.parse(this.before)}catch{this.showError=!0,setTimeout(()=>{this.showError=!1},1500);return}this.showError=!1;let a=e.length;for(;a--;){const s=e[a].type;if(s==="server"){e.splice(a,1);continue}w.includes(s)&&(e[a].server=this.replaceServerId?this.serverId:""),["lat","lon","latitude","longitude"].forEach(p=>{e[a][p]&&(e[a][p]="")})}this.after=JSON.stringify(e)},copy:function(){this.$refs.copyme.select(),document.execCommand("copy"),this.showCopied=!0,setTimeout(()=>{this.showCopied=!1},1500)}},mounted(){localStorage.serverId&&(this.serverId=localStorage.serverId)},watch:{serverId(t){localStorage.serverId=t}}},g={key:0},I={key:0,class:"popup error"},S={key:0,class:"popup copied"};function C(t,e,a,s,p,i){return n(),l("div",null,[o("p",null,[o("label",null,[d(o("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=r=>t.replaceServerId=r)},null,512),[[y,t.replaceServerId]]),e[6]||(e[6]=c(" Replace Home Assistant server id "))]),t.replaceServerId?(n(),l("span",g,[e[7]||(e[7]=c(" with ")),d(o("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=r=>t.serverId=r),placeholder:"xxxxxxxx.xxxxx"},null,512),[[u,t.serverId]])])):h("",!0)]),d(o("textarea",{"onUpdate:modelValue":e[2]||(e[2]=r=>t.before=r),placeholder:"paste exported Node-RED flow here"},null,512),[[u,t.before]]),o("button",{onClick:e[3]||(e[3]=(...r)=>i.scrub&&i.scrub(...r))},"Scrub"),f(m,{name:"fade"},{default:v(()=>[t.showError?(n(),l("span",I,"Invalid JSON")):h("",!0)]),_:1}),d(o("textarea",{"onUpdate:modelValue":e[4]||(e[4]=r=>t.after=r),ref:"copyme"},null,512),[[u,t.after]]),o("button",{onClick:e[5]||(e[5]=(...r)=>i.copy&&i.copy(...r))},"Copy to Clipboard"),f(m,{name:"fade"},{default:v(()=>[t.showCopied?(n(),l("span",S,"Copied")):h("",!0)]),_:1})])}const N=b(x,[["render",C],["__scopeId","data-v-26acb438"],["__file","Scrubber.vue"]]);export{N as default}; diff --git a/assets/action.html-COjyZO0k.js b/assets/action.html-COjyZO0k.js new file mode 100644 index 0000000000..e24c38051a --- /dev/null +++ b/assets/action.html-COjyZO0k.js @@ -0,0 +1,38 @@ +import{_ as e,c as u,e as c,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_1_1-BOrSTtQg.png",k={};function q(y,s){const a=r("RouteLink");return l(),u("div",null,[s[2]||(s[2]=c('

    Action Node JSONata Examples

    Integrations in Home Assistant provide service calls that can be used, for example, to set target temperature on heaters and air-conditioning units. All service calls can be found and tested within Home Assistant Developer toolbox, and it is also useful to check the integration documentation to identify exactly what is required for a successful service call.

    All service calls require:

    The data object will vary, depending on the integration and service call, from an empty object {} to something much more complex. Constructing this data object correctly is key to a successful service call, and JSONata rather than mustache templating should ideally be used to achieve this.

    Note: The data field used in a service call must be a valid JSON object.

    Passing variables to WebSocket nodes in summary

    JSONata in Node-RED nodes accesses the incoming message as a JSON object. Thus msg.payload is referenced just as payload and is evaluated as the value of that key. The leading 'msg.' is not required, and {{ payload }} is invalid JSONata syntax.

    Node-RED typically uses msg.payload to pass values between nodes, however any field can be used. Most WebSocket nodes have output properties that default to set msg.data to the entity details, and therefore in the flow following (not in) the node, data.state will typically provide the state value of the entity that was the subject of the preceding WebSocket node.

    Within the WebSocket node itself, the entity data is accessed using the special JSONata $entity() function, hence $entity().state would be used. In a similar manner, the $entities() function can reference any Home Assistant entity, and $entities('sensor.date_time').state would return the state value of the given date_time sensor.

    In JSONata, as well as using message fields or the entity functions, Node-RED provides functions to access environment variables using $env('ENV_NAME'). Global context can be read using $globalContext(name[, store]) and flow context likewise as $flowContext(name[, store]).

    JSONata and the Action node

    For Node-RED flows with a Action node there are three locations where the Data object can be defined.

    There are advantages and drawbacks to each approach, and personal choice as well as the particular case and need will influence your flow design.

    screenshot

    Here are three examples, each using JSONata to set the required Data object, and one example of using JSONata to process service call return data.

    [{"id":"0050317002075c30","type":"group","z":"776c027950fc8c3f","name":"Call Service node - build a data object / process call return","style":{"label":true,"color":"#000000"},"nodes":["a67d69634829a418","86cbf80d.5a9cf8","8aad6643.9ee7a8","897a31873370f8cb","3bbb02bc34fb543a","6601ecbcd16c5aa3","fe24231bb58e259d","b0b87dc3a978e67e","8602b67dfe66a5e3","fe9baddadc8fea32","fd65cb1e1c933b3a","0acd153a39f25184","be9ef2598f33324a","8446a03e6d2b76a3","3c75c1ae78ed9894","9fc179c38d22f267","c84c9a405862bb69","f0d2bc4cc11a7608"],"x":34,"y":39,"w":1212,"h":442},{"id":"a67d69634829a418","type":"api-call-service","z":"776c027950fc8c3f","g":"0050317002075c30","name":"","server":"","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":220,"wires":[[]]},{"id":"86cbf80d.5a9cf8","type":"api-call-service","z":"776c027950fc8c3f","g":"0050317002075c30","name":"","server":"","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.kitchen"],"data":"{\\"brightness\\": $min([$entities(\\"light.kitchen\\").attributes.brightness + $number($entities(\\"input_number.brightness\\").state), 255])}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"payload","output_location_type":"msg","x":730,"y":120,"wires":[[]]},{"id":"8aad6643.9ee7a8","type":"server-state-changed","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Remote Button","server":"","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.button","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":520,"y":120,"wires":[["86cbf80d.5a9cf8"]]},{"id":"897a31873370f8cb","type":"server-state-changed","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Input Number (Temp)","server":"","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_number.help_temp_number","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":540,"y":220,"wires":[["fe24231bb58e259d"]]},{"id":"3bbb02bc34fb543a","type":"inject","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Manual Test","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":530,"y":80,"wires":[["86cbf80d.5a9cf8"]]},{"id":"6601ecbcd16c5aa3","type":"comment","z":"776c027950fc8c3f","g":"0050317002075c30","name":"1a - JSONata builds object in Call Service node \\\\n Increase light brightness with remote","info":"","x":240,"y":100,"wires":[]},{"id":"fe24231bb58e259d","type":"change","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Service Call Settings","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\\t   \\"target\\": {\\"entity_id\\": $globalContext(\\"AClist\\")},\\t   \\"data\\": {\\t       \\"temperature\\": payload,\\t       \\"hvac_mode\\": payload>20 ? \\"heat\\" : \\"cool\\"\\t   }\\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":220,"wires":[["a67d69634829a418"]]},{"id":"b0b87dc3a978e67e","type":"api-call-service","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Send notification","server":"","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_geoff_phone","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":300,"wires":[[]]},{"id":"8602b67dfe66a5e3","type":"server-state-changed","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Last person to leave","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"person.","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"\\"home\\" in $entities().*[$substringBefore(entity_id,\\".\\")=\\"person\\"].state","ifStateType":"jsonata","ifStateOperator":"jsonata","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"{\\t    \\"data\\": {\\t        \\"message\\": \\"The \\" & $join($entities().*[state = \\"on\\" and entity_id ~> /^light|^switch/].attributes.friendly_name, \\", \\") & \\" are on.\\",\\t        \\"title\\": \\"Things Left On \\" & $entity().attributes.friendly_name\\t    }\\t}","valueType":"jsonata"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":300,"wires":[[],["b0b87dc3a978e67e"]]},{"id":"fe9baddadc8fea32","type":"api-call-service","z":"776c027950fc8c3f","g":"0050317002075c30","name":"","server":"","version":5,"debugenabled":false,"domain":"weather","service":"get_forecasts","areaId":[],"deviceId":[],"entityId":["weather.forecast_home"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"results","propertyType":"msg","value":"","valueType":"results"}],"queue":"none","x":360,"y":440,"wires":[["8446a03e6d2b76a3"]]},{"id":"fd65cb1e1c933b3a","type":"inject","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Set Forecast type","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\\"data\\": {\\"type\\": \\"hourly\\"}}","payloadType":"jsonata","x":160,"y":440,"wires":[["fe9baddadc8fea32"]]},{"id":"0acd153a39f25184","type":"debug","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Start Hour","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"$substringAfter(payload.time,\\"T\\")~>$substringBefore(\\"+\\")","targetType":"jsonata","statusVal":"$substringAfter(payload.time,\\"T\\")~>$substringBefore(\\"+\\")","statusType":"auto","x":1130,"y":440,"wires":[]},{"id":"be9ef2598f33324a","type":"comment","z":"776c027950fc8c3f","g":"0050317002075c30","name":"1d - JSONata extracts details from service call return \\\\n using Inject, Change, and Debug nodes","info":"","x":250,"y":380,"wires":[]},{"id":"8446a03e6d2b76a3","type":"change","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Extract forecast time and arrays of hourly temp, cloud, and rain","rules":[{"t":"set","p":"payload","pt":"msg","to":"results.*.forecast{\\t   \\"time\\": $[0].datetime,\\t   \\"temp\\": $.temperature,\\t   \\"cloud\\": $.cloud_coverage,\\t   \\"rain\\": $.precipitation\\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":440,"wires":[["0acd153a39f25184","3c75c1ae78ed9894"]]},{"id":"3c75c1ae78ed9894","type":"debug","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1120,"y":400,"wires":[]},{"id":"9fc179c38d22f267","type":"comment","z":"776c027950fc8c3f","g":"0050317002075c30","name":"1b - JSONata builds object in Change Node \\\\n Set a/c target temperature and mode","info":"","x":230,"y":200,"wires":[]},{"id":"c84c9a405862bb69","type":"comment","z":"776c027950fc8c3f","g":"0050317002075c30","name":"1c - JSONata builds object in Event: State node \\\\n Send notification when leaving home","info":"","x":240,"y":300,"wires":[]},{"id":"f0d2bc4cc11a7608","type":"inject","z":"776c027950fc8c3f","g":"0050317002075c30","name":"Turn Off","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\\t   \\"domain\\": \\"homeassistant\\",\\t   \\"service\\": \\"turn_off\\",\\t   \\"target\\": {\\t       \\"area_id\\": [\\"bedroom\\"]\\t   },\\t   \\"data\\": {} \\t}","payloadType":"jsonata","x":820,"y":180,"wires":[["a67d69634829a418"]]}]
    +

    Setting the Data field

    Settings a data property from a Home Assistant entity

    Example: A Action node that sets the target temperature of a climate entity to the current temperature of a sensor entity.

    {
    +  "temperature": $entities("sensor.living_room_temperature").state
    +}
    +

    Setting a data property from a Home Assistant entity with a calculation

    Here the state of a sensor entity is read, converted to a number, and then increased by 3.

    Warning

    States from Home Assistant are always strings, and so any calculations must be converted to a number first.

    {
    +  "temperature": $number($entities("sensor.living_room_temperature").state) + 3
    +}
    +

    Increase lights brightness with remote

    Example: A remote with a button that when clicked increases the brightness of a given light by an amount that is set from an input_number inside Home Assistant.

    JSONata expression in the Action node UI Data field. Nothing special is required as input to this node as all the settings are completed within the node itself.

    {
    +  "brightness": $min([
    +    $entities("light.kitchen").attributes.brightness +
    +      $number($entities("input_number.brightness").state),
    +    255
    +  ])
    +}
    +

    Setting target temperature on air-conditioning unit

    Example: Set the target temperature (and mode) for air-conditioning unit from the input msg.payload value.

    Here a Change node is used to build the msg.payload object required to set the Action node parameters, including the nested data field. In a Change node, the special WebSocket $entity() and $entities() functions are not available, however we can still perform a read from global context using the Node-RED $globalContext() function. These Node-RED functions can be used to bring in values from context and environment variables.

    {
    +   "target": {"entity_id": $globalContext("AClist")},
    +   "data": {
    +       "temperature": payload,
    +       "hvac_mode": payload>20 ? "heat" : "cool"
    +   }
    +}
    +

    The Action node can accept from one to all of the UI parameters in msg.payload, and where given these each take precedence over any UI settings. Default settings can therefore be set in the UI, and can then be over-riden by the input message, including when using settings from Inject nodes as shown in the example.

    Notification of lights left on when leaving home

    Example: Get notified when lights or switches are left on when you leave.

    This example uses JSONata in two places in the Events: state node. The state value test is a JSONata expression that must return true for the node to output a message (upper output). This code selects an array of all entity states for entities starting with 'person', and will return true if this array contains one or more with state "home". The expression will therefore only return false when no-one is home, and we can use the lower (condition fail) output rather than using the JSONata $not() function to look for 'not home'.

    "home" in $entities().*[$substringBefore(entity_id,".")="person"].state
    +

    JSONata is also then used in the output properties to create the required object for a notification service call. It uses $entities().* with a filter looking for those with "light" or "switch" in the entity_id and state "on", then selecting the friendly_name, and joining all those found into a string list in the message.

    The message title uses $entity().attributes.friendly_name to add the name of the person who just left home to the message title.

    {
    +    "data": {
    +        "message": "The " &
    +          $join($entities().*[state = "on" and entity_id ~>
    +          /^light|^switch/].attributes.friendly_name, ", ") &
    +          " are on.",
    +        "title": "Things Left On " & $entity().attributes.friendly_name
    +    }
    +}
    +

    In this example all the parameter setup is performed in the Events: state node, so the Action node can accept all the required parameters just from the input msg.payload object.

    Processing a service call return

    Home Assistant service calls can provide data returned as a result of the call, and JSONata is an ideal tool to manage any resulting JSON object and array structures. This example uses JSONata to extract and manipulate weather forecasts, providing a summary in a modified format.

    Example: The forecast service call now returns an array of forecasts. JSONata is used to iterate over all forecasts, returning an new object for each, with a time and arrays for temperature, cloud coverage, and precipitation only.

    results.*.forecast{
    +   "time": $[0].datetime,
    +   "temp": $.temperature,
    +   "cloud": $.cloud_coverage,
    +   "rain": $.precipitation
    +}
    +

    Also see:

    `,49)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const d=e(k,[["render",q],["__file","action.html.vue"]]),m=JSON.parse('{"path":"/cookbook/jsonata/action.html","title":"Action Node JSONata Examples","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Passing variables to WebSocket nodes in summary","slug":"passing-variables-to-websocket-nodes-in-summary","link":"#passing-variables-to-websocket-nodes-in-summary","children":[]},{"level":2,"title":"JSONata and the Action node","slug":"jsonata-and-the-action-node","link":"#jsonata-and-the-action-node","children":[]},{"level":2,"title":"Setting the Data field","slug":"setting-the-data-field","link":"#setting-the-data-field","children":[{"level":3,"title":"Settings a data property from a Home Assistant entity","slug":"settings-a-data-property-from-a-home-assistant-entity","link":"#settings-a-data-property-from-a-home-assistant-entity","children":[]},{"level":3,"title":"Setting a data property from a Home Assistant entity with a calculation","slug":"setting-a-data-property-from-a-home-assistant-entity-with-a-calculation","link":"#setting-a-data-property-from-a-home-assistant-entity-with-a-calculation","children":[]},{"level":3,"title":"Increase lights brightness with remote","slug":"increase-lights-brightness-with-remote","link":"#increase-lights-brightness-with-remote","children":[]},{"level":3,"title":"Setting target temperature on air-conditioning unit","slug":"setting-target-temperature-on-air-conditioning-unit","link":"#setting-target-temperature-on-air-conditioning-unit","children":[]},{"level":3,"title":"Notification of lights left on when leaving home","slug":"notification-of-lights-left-on-when-leaving-home","link":"#notification-of-lights-left-on-when-leaving-home","children":[]}]},{"level":2,"title":"Processing a service call return","slug":"processing-a-service-call-return","link":"#processing-a-service-call-return","children":[]}],"git":{"updatedTime":1723695708000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"cookbook/jsonata/action.md"}');export{d as comp,m as data}; diff --git a/assets/action.html-CueRyjyR.js b/assets/action.html-CueRyjyR.js new file mode 100644 index 0000000000..0f3fbee329 --- /dev/null +++ b/assets/action.html-CueRyjyR.js @@ -0,0 +1,14 @@ +import{_ as r,c as u,a as t,d as l,b as n,w as a,e as p,r as o,o as h}from"./app-CefLgoES.js";const g={},f={class:"hint-container tip"},c={id:"action-1",tabindex:"-1"},m={class:"header-anchor",href:"#action-1"};function b(v,e){const i=o("RouteLink"),s=o("Badge"),d=o("info-panel-only");return h(),u("div",null,[e[31]||(e[31]=t("h1",{id:"action",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#action"},[t("span",null,"Action")])],-1)),e[32]||(e[32]=t("p",null,[l("This node allows you to send a request to Home Assistant to perform specific actions. These actions could include tasks such as turning on a light ("),t("code",null,"light.turn_on"),l("), selecting an option from a dropdown menu ("),t("code",null,"input_select.select_option"),l("), or any other service call supported by Home Assistant. It serves as a bridge between Node-RED and Home Assistant, enabling automation flows to directly control devices or entities in your smart home setup.")],-1)),t("div",f,[e[1]||(e[1]=t("p",{class:"hint-container-title"},"Helpful Examples",-1)),t("p",null,[n(i,{to:"/guide/action.html"},{default:a(()=>e[0]||(e[0]=[l("Action Tips and Tricks")])),_:1})])]),e[33]||(e[33]=t("h2",{id:"configuration",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configuration"},[t("span",null,"Configuration")])],-1)),t("h3",c,[t("a",m,[t("span",null,[e[2]||(e[2]=l("Action ")),n(s,{text:"required"})])])]),t("ul",null,[e[5]||(e[5]=t("li",null,[l("Type: "),t("code",null,"string")],-1)),t("li",null,[e[4]||(e[4]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[3]||(e[3]=[l("Mustache Templates")])),_:1})])]),e[34]||(e[34]=t("p",null,"Action to perform",-1)),e[35]||(e[35]=t("h3",{id:"floor",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#floor"},[t("span",null,"Floor")])],-1)),t("ul",null,[e[9]||(e[9]=t("li",null,[l("Type: "),t("code",null,"an array of floor ids")],-1)),t("li",null,[e[7]||(e[7]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[6]||(e[6]=[l("Mustache Templates")])),_:1}),e[8]||(e[8]=l(" for ids"))])]),e[36]||(e[36]=t("p",null,"A list of floor ids that will be used as targets for the action",-1)),e[37]||(e[37]=t("h3",{id:"area",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#area"},[t("span",null,"Area")])],-1)),t("ul",null,[e[13]||(e[13]=t("li",null,[l("Type: "),t("code",null,"an array of area ids")],-1)),t("li",null,[e[11]||(e[11]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[10]||(e[10]=[l("Mustache Templates")])),_:1}),e[12]||(e[12]=l(" for ids"))])]),e[38]||(e[38]=t("p",null,"A list of area ids that will be used as targets for the action",-1)),e[39]||(e[39]=t("p",null,[l("Custom ids can be inserted into the list by adding a "),t("code",null,"#"),l(" at the end of the id")],-1)),e[40]||(e[40]=t("h3",{id:"device",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#device"},[t("span",null,"Device")])],-1)),t("ul",null,[e[17]||(e[17]=t("li",null,[l("Type: "),t("code",null,"an array of device ids")],-1)),t("li",null,[e[15]||(e[15]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[14]||(e[14]=[l("Mustache Templates")])),_:1}),e[16]||(e[16]=l(" for ids"))])]),e[41]||(e[41]=t("p",null,"A list of device ids that will be used as targets for the action",-1)),e[42]||(e[42]=t("p",null,[l("Custom ids can be inserted into the list by adding a "),t("code",null,"#"),l(" at the end of the id")],-1)),e[43]||(e[43]=t("h3",{id:"entity",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#entity"},[t("span",null,"Entity")])],-1)),t("ul",null,[e[21]||(e[21]=t("li",null,[l("Type: "),t("code",null,"an array of entity ids")],-1)),t("li",null,[e[19]||(e[19]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[18]||(e[18]=[l("Mustache Templates")])),_:1}),e[20]||(e[20]=l(" for ids"))])]),e[44]||(e[44]=t("p",null,"A list of entity ids that will be used as targets for the action",-1)),e[45]||(e[45]=t("h3",{id:"label",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#label"},[t("span",null,"Label")])],-1)),t("ul",null,[e[25]||(e[25]=t("li",null,[l("Type: "),t("code",null,"an array of label ids")],-1)),t("li",null,[e[23]||(e[23]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[22]||(e[22]=[l("Mustache Templates")])),_:1}),e[24]||(e[24]=l(" for ids"))])]),e[46]||(e[46]=t("p",null,"A list of label ids that will be used as targets for the action",-1)),e[47]||(e[47]=t("h3",{id:"data",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#data"},[t("span",null,"Data")])],-1)),t("ul",null,[e[29]||(e[29]=t("li",null,[l("Type: "),t("code",null,"JSONata | JSON")],-1)),t("li",null,[e[27]||(e[27]=l("Accepts ")),n(i,{to:"/guide/mustache-templates.html"},{default:a(()=>e[26]||(e[26]=[l("Mustache Templates")])),_:1}),e[28]||(e[28]=l(" when data type is JSON"))])]),e[48]||(e[48]=p(`

    JSON object to pass along.

    Merge Context

    If defined will attempt to merge the global and flow context variable into the config

    Alternative Template Tags

    Will change the tags used for the mustache template to <% and %>

    Queue

    Will store the first, last, or all messages received while disconnected from Home Assistant and send them once connected again

    Block Input Overrides

    Stop msg.payload values from overriding local config

    Input

    All properties need to be under msg.payload.

    Sample input

    {
    +    "action": "homeassistant.turn_on",
    +    "target": {
    +        "floor_id": ["first_floor"],
    +        "area_id": ["kitchen"],
    +        "device_id": ["8932894082930482903"],
    +        "entity_id": ["light.kitchen", "switch.garage_light"],
    +        "label_id": ["outdoor_lights"]
    +    }
    +    "data": {
    +        "brightness_pct": 50
    +    }
    +}
    +

    Merging

    If the incoming message has a payload property with action set it will override any config values if set.

    If the incoming message has a payload.data that is an object these properties will be merged with any config values set.

    If the node has a property value in its config for Merge Context then the flow and global contexts will be checked for this property which should be an object that will also be merged into the data payload.

    Merge Resolution

    As seen above the data property has a lot going on in the way of data merging, in the end, all of these are optional and the rightmost will win if a property exists in multiple objects

    Config Data, Global Data, Flow Data, Payload Data ( payload data property always wins if provided )

    action

    Action to call

    data

    Data to send with the action

    target

    Targets of the action

    Output

    Value types:

    References

    `,37)),n(d,null,{default:a(()=>[t("p",null,[n(i,{to:"/node/action.html"},{default:a(()=>e[30]||(e[30]=[l("External Docs")])),_:1})])]),_:1})])}const x=r(g,[["render",b],["__file","action.html.vue"]]),q=JSON.parse('{"path":"/node/action.html","title":"Action","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Action","slug":"action-1","link":"#action-1","children":[]},{"level":3,"title":"Floor","slug":"floor","link":"#floor","children":[]},{"level":3,"title":"Area","slug":"area","link":"#area","children":[]},{"level":3,"title":"Device","slug":"device","link":"#device","children":[]},{"level":3,"title":"Entity","slug":"entity","link":"#entity","children":[]},{"level":3,"title":"Label","slug":"label","link":"#label","children":[]},{"level":3,"title":"Data","slug":"data","link":"#data","children":[]},{"level":3,"title":"Merge Context","slug":"merge-context","link":"#merge-context","children":[]},{"level":3,"title":"Alternative Template Tags","slug":"alternative-template-tags","link":"#alternative-template-tags","children":[]},{"level":3,"title":"Queue","slug":"queue","link":"#queue","children":[]},{"level":3,"title":"Block Input Overrides","slug":"block-input-overrides","link":"#block-input-overrides","children":[]}]},{"level":2,"title":"Input","slug":"input","link":"#input","children":[{"level":3,"title":"action","slug":"action-2","link":"#action-2","children":[]},{"level":3,"title":"data","slug":"data-1","link":"#data-1","children":[]},{"level":3,"title":"target","slug":"target","link":"#target","children":[]}]},{"level":2,"title":"Output","slug":"output","link":"#output","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1727530280000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"node/action.md"}');export{x as comp,q as data}; diff --git a/assets/action.html-DpcS1Rnf.js b/assets/action.html-DpcS1Rnf.js new file mode 100644 index 0000000000..02ed6e4149 --- /dev/null +++ b/assets/action.html-DpcS1Rnf.js @@ -0,0 +1,13 @@ +import{_ as u,c,e,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/action_06-Dpyp8yfl.png",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbAAAAA0CAYAAADrGG1QAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA5+SURBVHhe7Z3vcxXVHcb7P+UVM06dYdQXvigvOlMd3vhGplNGkFLrqFXagFbAYpDQ1BAgifJLKpaCithWByrT4jApTM0oFW2sFqswIgkEIQnf7nN2z+73nD177yb37r25yfPMPJO7e37v3f1+7tk99+Z7QlEURVEdKAKMoiiK6kgRYBRFUVRHigCjKIqiOlIEGEVRFNWRIsAoiqKojhQBRlEURXWkCDCKoiiqI0WAURRFUR0pAoyiKIrqSBFgFEVRVEeKAKMoiqI6UnMC2NjYmIyMjMiZM2douunGuYVzbL6K5z9NN8+NXO+lATY+Pi6jo6PSv2NQtvYelO5N78q6Z09W7meeP0MvMm/celpeHDgqwy8dmFcgQ19279kvPXsOyyN7T8rDe9+j6QXtn+x6u3Kv3vWWbNy5X/p27jaMAWvKqjTAUPG23j55bMOoPPTkeEv840cvmr9rNwi9CL1u85jsGNg9LyCGPvRHF9gDB0flnj9eoekF76UHPpc7Bz80f1vh5cPvywvb+wxryqo0wDDzaiW8YAKMBsQwE2u3MPMivOjFZECllQCDATHMxMqqFMDw6RO3DX3AVG0CjIZxO7GdszC0jduGoYucpheqAZRWAwzG7cSy13spgOEhG555+YCp2gQYDeOZGM7Bdglt45lX6CKn6YVqwKQdAMMzsbLXeymAYaUIFlT4gKnaBBgNY2EHzsF2CW3jgXboIqfphWrApB0Aw8KOstd7JQD72foJ+XXvNdk+NCkD+2JvH5yUZ6J9a6O0UJmQCTAaJsBouvUGTBoB2A8O/VeG/nlVPr5yK7mSxLzGPqSFysBtBdiW/uvyp5M35eN/T8n4xG2Znhbjb8dnon3T8vaJm/KbF68Hy/omwGiYAKPp1hswmSvAnvrrZZm4NSNnv/5OfjtyRX76ztfGeI19SEOeUNm2AGzVU+Oy68CkfPHljEzeuC0ffTItR//8nQz//oa89OoNeT16/dGFKbk+eVs+vzhtZmUoE6rLmgCjYQKMpltvwGSuADt0fkI2nf7GzLS2R9B674tJY7zGPqQhT6hsUwB26dIlOXv2rKnoyJEj8tzWQ7J+8ynp3nRafr7+sxxsAK+vL8/IN9/OyMuHbsgvNk3I2u4YbDBeY9+e127Ilau35atLMcT8erQJsMXrx5+9JE9vOWvg1dN7xJyDOBdxTuLcrFr++f/04GsGYqv2/U1+9OqnwQuepheSAZNGbyH+79q0MWAF4/WX16ZytxB/uHdUVg6fkFVD70j3wCulr/cgwFBoaGhIjh07JsePH3f8+utvysDAoAGZBQ1uG35+MYbX09uupfvhXz1/TR59xn3uhWdhgBhmYrVuJ3YywB5asVq67j8XTJurH7y/q+l1zkcDXAMDQ9G5lj//cE7i3MQ5WpVqnf9H33hT+ncNGpCFLvrW+BO5876VcufLobT567u6V0rXffvkrkBaZowtOs+7Ipu8/naoTAPu3Shdq06F0zwvXdUld/SG0+55eZ8s6Zrje+L04ZTc0bVRlvp5QkabtY5JvfQ6BlgaXcSB24b19gFcuKaORNeWf73Vu95zAAPtUODcuXNy/vz5oJEGiGEmhgUbeOaFW4OYefkQuvjVjBw8mt+PmRjK4JlY0cIOAsz1YgAYZl6AV73zD+doFTOxsuc/Lri2zcQQ8KoI5pUagblEgDcgUAHc326qYzgWQmk2xnsyx34C7Eu6Pwmm1XQd+AK4c6o3MeDSKMDqGTMvXEtzvd5zAAPpQL1QRdqYiWEWhtWGWLCBZ164RehDqAhgT26eiMpMmYUdmJH56XBZgBlY4BOa8WpZ/oRNOyfLon3L1nh57z0sD2H7icNyd1ePLNflbZoqn6b58FjTk6VFtu04/XHqm6VN/2z9PbLMA5gBWpqepTljTOvRxyUui/7i790rDjvj1Mer1cbsCzOv0DmnjXO0illY2fMfM7F2zMLMLMa+VwnEcjMDPRtIPoUvTcqZgGY/mZugm9RVcxaiZkGBvHH7Ok8eVMiTltPtqrzO2KL933/M3Q7Dr1bf8rOZbBaItKycPX6mn+l+D6TqQ4PT16hNU06lF40xZP3+uTDzj6kLXJs367Ntxz0mtj7/+NbqEwzANAtgVv5+zL4w8wpdY9pF13sOYLjviKlbqBJt5MEzMSyPxwpDLNjAcy4fQkUAQ943/vKdfHt1xtThp8OlAGYg0iMPBrfLACx6M1MoxPnvXnE5en1Zlt9rXyPN2/bb9SBh2mlktpT0Le27hWVSp4GXhlSSbvKbslnfLFCz44BxxukxBL1+63G12HjmVfb8s/fJm2nUWbb99izscINYvO0FIwRPG0yj10uidOeTuA2uNthr4Nk8qeNA7wfVfJDNyjuwgk39MQziIKrAYPqSbetgHtp2XadvHnRg1Jem6+MU2fRNbZtxqONox+SPweRTx7PeGF2771823uS46vcI76MDqWhbnQumH857WtyHXB8DBmCqBhieeZW93nB9+moYYFiIgWXyWG0YWlVYBDDkxepElC1azDEngDkuA7D8zCSGhA8w7ThN1wtraDUKMKefibO+uXlj67G6/UO5ZfdHx8mWxTFLXufqDByTVno2AOvv76/EZdtvD8D8W3EFswwdTL0grtONawCssHy6z++PF0iT7RgaMXBcIOl9bjDPb7uu2zcFndgxFGz7/nEw21FfMiBmRlrhGMzxs/vqjdGzA1k13gD0YlDaffk6neOO8vrYmPrc96WeAZhFAzDAKAQw3Fr88MKU9Axcl0c2TKR5mgawJFibNyeyC5VGABZt21kP7MAkrjdN007KNgqwEKxCdZp9qn0NrRi+yWwLY03GYICm8jl1EmCl228LwPzAVhCkbRBGUHMDpxvEjQPBUufNBXQdHPVrY6+MrjvYju4PgrJO97e16/ctN3YH1OHyMSTgApCGxqDrNenZ9ajtvg+Jkd++fwpmDowSO3B2wAe74yksX6svngGYBQ8wewsR3/MK3ULEqsS/j9yST/8zJcdP3JRNfdfl4V9GUFo/kd5C7B0Mr0Sc7SIOE4zNG2QDcIMAszb5krpNWr5e3zUBputL63TzhPqh68zAZWefXp8AX4wzBRdAj7HibzZj7WSALcZbiE4QS7bdIKw/mavA66S7Adiv082bD3Y6f/32s6Aabkfl94NyLkhr1+tbYOwOfMLlY8f9ziCGvHG54BgMwGqk17Bz/FKYucfNWkPJKWdcfNx9W0iHx54ZgCkCGL6ErH9hY7bCUnrU0XSAzXYRBxZgmEUc0SwrtIgDxsxr8JVJ+ccHU3LqzC15/NkJs4jjX59Ox4s4vKX31rMFWOx4RpbNPpoAMOv0dqVuI5Avck2AlbDTz8RZ3+L2XYD6Y8V2vEDF9hPll62Ixqz6Nd8AxkUctY3gowMTtp1AlAvSLqxCUAh9Wo8dCvLxPtuHXPsmmKvZiGorFNzNPttHPRsJbTuu17f82J1xKuhg2/TDaUvVr45Z4RhqpNeyPn4oG/c9BCB3vDWPu8mr4O29D/UAZw1QFQEM3+dqVABg0xdxzGUZ/dsnb5pf38DSeB9C1qvXxd8J27Ljupmp7ftDvIwes7KGltH7z8CcABwH+ixAx0G+HMDykHKCvWlXl3XzNwqw4IwKfQ/2LRmnzh/YZ2dtGnzzDWBcRl/LfuCJt9NAZuAVvZ82WAVglYeCV4dnE/RVHe42ygZmOSbdDbjGJsiqfd62H5RzQdpzzb6ZujNAmbSorfTYmWOlAGe21Vg0EPQx88dgykV1F6Unx9c95tYuZPV4DQhz/bf9yx93B5y67+m27lPgvQkYoCoCWLPU9GX0EEiHAqAepm7aoS8y48vI+CIzvpxctCTeGs++sPQetw4/+2JKnvtd419kNkEYJ1FiHaDjgGzTItDZW2tpWhHA/LKRvRmRBYK1MyNLyyq4zta6/ajt5TX6tmxNAiwFo7h/RXCPPd8ABvOLzMUOB+LkPIiCpAlkNlhGaf6n7OxTvt3nfVoP2LZprIDhB2DYtm/KOHkTJ8HU1ucGet2PABwDLu6bm2aX+aftpf3I+h9Dw5bJ2kY9Otg7+VbtM/U6x1S/J5H99yA1+pD2OX8snf53o782vSBvCskYUA6QvT7VgxcMUJUBmN43/MFV8xp/oVB+LaQ19YvMVqAdCtnnAvV+Smrn/vinpAAxzMRwixAzLQALxiwL+zDzAry+ujTDn5KiC82fkqLpzAaaoQ8EFRpwaQXA4Kb+lJQvVFTmx3wBMczE4h/znTKLNLDSEMZrPPPCbUPMvHbs5Y/50uUMiOEcbJfQdnuWzNOL0v4twGRGVWbW1EwDLFXfQgzV3dZ/p4LbiXgmhsUZmGlhmfxUZLzGPjzzqnXbUJsAo2ECjF5sdm9n1rgNWaEBkyoXcVy4citY97z4h5Z4FoYl9rhNCGOpPFYb8h9a0rM1AUbTrTdgUgQwLIEHgOYqAHBe/T+wKkyA0TABRtOtN2BSBLAq3XSAjYyMSPemd3OAqdoEGA1v3HranIPtEtp+ZO/J4EVO0wvVgEk7ALZ611ulr/dSABsbG5OtvQdzgKnaBBgNvzhw1JyD7RLa7tlzOHiR0/RCNWDSDoBt3Lm/9PVeCmBQ/45BeWzDaA4yVZoAo9dtHpPhlw4kZ2H7tHvPfnng4GjwQqfphWjApNUAWz78vvTt3J1cdfVVGmCjo6OyrbevpRAjwBa3Aa8dA7vbOvuyQh/6owuLEKMXiwGUVgIM8Hphe59hTVmVBtj4+LipGDMx3E7EMzEs7KjaeIBPLy7jmRduG2LmNR/gZYW+YCaG24l4JoaFHTS9kI0FFVUbz7xw2xAzLzAGrCmr0gDTwoWMh2xYKULTzTbOrfkELl88/2m6eW7kep8TwCiKoiiq3SLAKIqiqI4UAUZRFEV1pAgwiqIoqiNFgFEURVEdKQKMoiiK6kgRYBRFUVRHigCjKIqiOlAi/wesWvgb+TZM6gAAAABJRU5ErkJggg==",q="/node-red-contrib-home-assistant-websocket/assets/action_03-DnNG0qjN.png",d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbUAAAArCAYAAAD/sRZaAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA2aSURBVHhe7Z39ixXXGcf7Py2+BFIEG/yxJSkohEB+sIIRtBTsj6UsKcFCrbG7Lq5790XclyRqjdrGWEs0MbEodqOYxa6NcUujtipdXLWNNuX0fs+ZM/OcM8+Zmfsyd+69Pl/4snfmvMyZOXOfz5yZc2e/o0QikUgk6hMJ1EQikUjUNxKoiUQikahvJFATiUQiUd9IoCYSiUSivpFATSQSiUR9o8JQW1paUvPz8+ry5ctisbjPje86vvO9Lolbve1mzsNMqK2srKiFhQU1Mjah3to/rbYOH1c/+s2J0v3GgT+KxeIKvaN2Ru2eOqomDs32JNzQ5onpObVn+n21c+YT9eOZT8Vt9hvjfyjdO8Y/VLtqc2qkNqFZBCblKRNqqGTv0D71ytA5tXr4i4544FcX9d8XarfEYnHF3jh2SY2OjfcU2NDW0XoQfP29BbXh+LK4BK9/5+9q3eR1/bcTfvXgJbV3eEQzKU+ZUMMIrZNAgwVqYnF3GWDDiK1XhBGaAK1cAzSdhBoMsGHElqcg1HC1g1uOPnTKtkBNLK7e62t/UT8fP672H6ip0dFRx7VaTZ05c0Y9efIkihbdI8Qt3HLkArG4fQZkOg01GLci8+4aBKGGB3R4huZDp2wL1MTi6r1nfE6dPn1a3+5ZXFx0jHVIO3z4cBQtukeIW3iGxgVicfsMwFQBNTxjQx9nKQg1zDzBpA0fOnneeuyWurPyTBufuTxZFqiJxdX6tbEL6tC7R1Mw833s2DF148aNKGJ0hxC3MImBC8Ti9hmAqQJqmDyCPs5S26D22jtfqstfP45KJ8I6pHFlOAvUxOJqjdmPGIlxIKNGnrwA02kJ1DpjAKYVqH3/6G01de2h+uvys6jnlP6MdUjjysAdgdr3xq6rk9eXo1JKPXr6rfr1+bva+GyFPMjL1UEtUBOLq3UjUMMzttnZWXXy5MnYFnbwrVu31IMHD6IoUL4Eap0xANMs1H52/oF69Ox/6sq9b9S++WX1k4/uaeMz1iENebiypUINgDpw8Z9q5ZsEXGOX7jngwue5K8kJjbwokwU3gZpYXK0bhVpRA3jXrl0r9FujZiVQ64wBmGahdnTxkfrlxX/pEdlwHWSffv1vbXzGOqQhD1e2NKj99IO/6WdmVh9/taJ+cHCRzQsjDXmsUBZ1cHkFamJxi367plZtPs2nFXBZUKMG4G7fvh1FhNZ0//59deXKFR2zTpw4oX4x+VsNtu2zf1Ibj3zFBmVxawZgWr39+I/H32oDYDA+333839Ttxx/OLKhtBz9W26c+UoNj7+o+Rl+jz9H3vpqCmtWN+/8JTgb53fXl1DrkRRkrPx1uHWqfqzUvD6jVb3JpnE+r1QNb1Jq3ubT2eu3mATXQQrDppNfu3KIGXq6ptUxabxrnRWf6OWjApuRzTZ9jA4mLfw8SN/pMDbcXAShrpGG9hczMzAwLNvjs2bMtjdwQ2KamptSpU6d0e6hP/v4DNTo+qeHGBeZ+80uD29TApln1EpO24fhNtW7TNrXuULR8aFa9EMybb8Cm1YkiuOWYtw4wQx+eqPel37/oc/Q9zgGqlqDGpVlDeI4WSoO4NIFad7j/oGb2adXOz9m0jrhkqOnzC31mR2pNbq+M2Y9Pnz7VZRCMQnBr9NkbrtIR1K5evZpqmzXSEBSfhxHb+u31/t/+GZu2YWiXAzzkfWHwZjpfQQM4rUItzxihoe/y+hfnAB2xlQo1iAOblb8eLgo1HXTjK1L7xTVAs+vjAKa/3Mn6JD+AlqyPQfjmIMnb+NWue7U8GIPBQG2Q3yYcbKdNG1Rr6H570KHbXbWzprdD6+ePmTU9FlvU6s0UaiYt6ziE9tnYPc4U7LpNm2t8v8HeMfGh5O4T3S62SY6XDfbNgDo69g2Xq9vpk3rfu5Bxz9f0BY973FLHpb4va2z9m48kF3NIa/HiqczfqWFkBohxcMOkkwsXLujt3LlzJyrBC1fouFr32+cbI7aqRmt69BT3IRkpwRgtxWkD6sUhLw0QAoxsHgdYGHnRsp+pF+t/OVA5bdg0pr5Lytn8me1kDOi0C2pW/nqM0jBC4/qUGucAHa21DWpZ8sFmRddZF4Kahg4JMs6yN1KLgmISkKNA4gRsEmj8unV5HwBh6yBLAiddNgEuqcsE5Ghbee2M0pPAZwKeDXROXViOgp2tz2+Xu59uXfG2aP4MZ+2zrdvfL7fdJF23yx4jv6y7nNpnZ9nkdUGBdUn+wtbHo/Fyug/i42ABZvctWo7b5y+b9icg85ajPkrSo+2hPNKc/W7cnXijCOCG25N+/Zy5GZYoi79coKNGnkomj2gg7VLro2UDjmhZp3m3A+myhZkFmZMeAS2GnAEa8jtgjG3yx2m6rqRdme0MGNApG2p4hla0f8Erq45ADaJgs6LlrZuCmmMTHJJAmHY66LqBxi+r8xcKEibwhLYdBx27TgemMDCddjJ5k/qYdkdBz6yj+5gY5XVQZI6ne4yynZWXPXa6bWZ76bL0GGYdTy7NHAcT6Pmy2Ge+vgyT9rLprJnt0z7kzmGSzh5TWobWFecx2zRX203sZ4bxnI0GjnYKz+EwcpucnGSBluXuh1q9L1K3BA1k3FGVu06DhZajUPMgFOcPggjQ84BJn6cF2xk2oPPcQ41OHLGi5a2L3X6MrmrZL28Iau4XPgkYWG+Dg5eHugjU2ECTuBjUAu1k8ib10X2wNvXo46DLkjqJAYBgAPXXBU3bzLSRbC9xEahF6bZM7rEz28uCmt6vIn3p7JPnIscl2LdmHXvMabp/rsC6ziyoRXb6u1EY8y4TalQAHLaDQHXkyBEWZNRdDbW66W09d6Rk+8e1gZo3soIJyLhnZ3o7oYkfHgSD5aM28KM914DOcw01fyakFV1n3ehEkSRo2i+4D7UkONlbNW5ASQKJzZsGYkFnBZq6U4HKyZ/TTqbupD66D9ZkX/LaxQXYhqBmTS82ImhxwZk4ve1AH+hRCjk+gX3C9jKhptc3GOj1tpopw/WJWVc61HRZOnJl8mW4215ojFuVdIYlftTd9bcfiTVI6uejBgYz0nKNkRUzEtPQ4kZ5UXpgpOUCjy9v7bSTSbcGdEJQww+n6ZtCGhWm9aOOyqHm24qb2m/lr4cbhZox/fJ6UGOCcxhqzQcB41AgNc6EWl47mSCW1Oftc5zfrstulwGGG7T5oFvUyfby6kmn5xzDOD+Xj/ZfqB7kCcAgZH0sG4Qat32/v/06STp73GgZ5nyIjbToPEsgz+TLcC+80LirJ4r4t/goTPKghpGcN+pKRlcclPJBlaTl3IrMqcsa8ApBDb83a1WAYuUTRXxDHNBsGsSlNfVMzfmCM1CjefVy/QSJAwaCDwkOOp0Gi8ZAlwpGZPu5UMtqJxPEaH16u6S8TiNB1U93g663j3pb9BhlO2uf7Xbo8aP5U2WddvlgcNuZ2mdn2S+bGPkaCvT6eNBjV8zuvpm2t3eiCD0fSDrSUA9zzhRxr7zQuKun9Ee3GJMRj5nMYZbNZwoODS0LF4DGGXUZ0Ni6zK1C73aisy1qD1L02Vy8HGpn2IBXCGrtUiVT+heb+PE1ylj56XDRkZoN2tY0eJngVl9vAz7NiyDjgcumu8EyKdNQAKzbbZu3nTho1e0Fncx2MgHKr4+WN1P6mfy2/rrdgG+CokmLpsLHATkMCGMbsK3d7Zq2k3QCMTfww962LNyt6fGr2+2rELQ9oz3x8SVl/OU2mB7z1fU+cfvQO27evrl94p2HHLD841x3uM/CbvTH11UKV+gIarhaR3uoK//xtR6RJX3hgMJ/rkYgBmi5IyVvdBWBKq530AOVZws9U6eBljPzMqudAQNeRaBG1x384qH+jL8Ql58KaR378TVecXWXvCbr3M2Hua/JQh4rlJXXZJVtBEQv6ImfDwNuKUAWdy9BDcJVOgIb2oLnbPKarPIN4HQCanBHXpMF46XEeIExfRM/Xl6c9UJj5PVfeuxboNaMzRU/vZJPj4DE4mLuNahRoT1VTwp5HgzYlH37kau7Y/96BrcarfAm/t3n72rTN/gjTxbMrLsXav4ttrSbudXTNmfc4hO33/6tXN+N3rLuJgvUxHkGYMqcKPLl8jO27o7/k9A/307/k1Csk38SKhb3jgVq4jwDMCGoYTo+oNSsAMVK/p9ayJgMgmdmcGgSSZYFamJxte6V2Y+cBGqdMQATglqZbglq8/Pzauvw8RR0yrZATSyu3r3wOzVOiFs7Zz5hA7G4fQZgqoDajvEPdR9nKQi1paUl9db+6RR0yrZATSyu3t32RpGiQtzaM/0+G4jF7TMAUwXUdtXmdB9nKQg1aGRsQr0ydC4FnjItUBOLu8sbxy6piUOzUVTofk1Mz6nX31tgg7G4PQZgOg21Vw9eUiO1iaiXw8qEGm4z7B3a11GwCdTE4u4xgDY6Np57ddxNQltH68FPwFaeAZlOQg1A2zs8opmUp0yo4SWiqAQjNtyKxDM2TB4p25h9JRaLq/OO2hm1e+qoHqH1EtCs0GaM2HArEs/YMHlE3F5j0kbZxjM03HLECA0sApPylAk1KpwkeECHmSdisbi/je96L8LMl8St3nYz52FhqIlEIpFI1O0SqIlEIpGobyRQE4lEIlHfSKAmEolEor6RQE0kEolEfSKl/g9Jcadr5XeaDAAAAABJRU5ErkJggg==",g="/node-red-contrib-home-assistant-websocket/assets/action_05-ClsCr7kS.png",y="/node-red-contrib-home-assistant-websocket/assets/action_02-DgYg4NzD.png",m="/node-red-contrib-home-assistant-websocket/assets/action_07-CDDnq17z.png",h="/node-red-contrib-home-assistant-websocket/assets/action_08-5Ct0UYzU.png",f={};function b(A,s){const a=r("RouteLink");return l(),c("div",null,[s[5]||(s[5]=e('

    Action Node Tips and Tricks

    Home Assistant Domain

    The homeassistant domain is versatile, allowing you to control multiple entities across different domains with various services.

    For example, you can use the homeassistant domain to turn off lights, switches, and any other devices in the laundry room with a single action call. This approach reduces the need for multiple action nodes.

    Screenshot of an action node using the Home Assistant domain

    Using Mustache Templates

    Mustache templates can be applied in the domain, service, and entity ID fields, which is especially useful for setting the service based on msg.payload or other message properties.

    For instance, you can use eztimer to set the output of a node to on or off, and then use that output in the action node to determine the service to use.

    Screenshot of flow

    Screenshot of the action node

    [{"id":"522c54b8de855062","type":"api-call-service","z":"04f15f38f9038e78","name":"","server":"","version":6,"debugenabled":false,"action":"homeassistant.turn_{{payload}}","floorId":[],"areaId":["75a88dfa58844f8aad752dde5bc51fc7"],"deviceId":[],"entityId":["light.front_porch","light.garage","light.kitchen"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"homeassistant","service":"turn_{{payload}}","x":670,"y":288,"wires":[[]]},{"id":"cca91c6fe47d7fa0","type":"eztimer","z":"04f15f38f9038e78","name":"","debug":false,"autoname":"sunset - dawn","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"1","ontimesun":"sunset","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dawn","offtimetod":"dusk","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":400,"y":288,"wires":[["522c54b8de855062"]]}]
    +

    Mustache templates are also supported in the data field when set to JSON format.

    Related Resources:

    `,13)),n("ul",null,[n("li",null,[t(a,{to:"/guide/mustache-templates.html"},{default:o(()=>s[0]||(s[0]=[p("Mustache Templates")])),_:1})])]),s[6]||(s[6]=e('

    Targets

    Target fields allow you to specify areas, devices, and/or entities, either individually or in combination. Note that not all services accept areas and devices.

    Mustache templates and environment variables can be used within each target list.

    Data Field

    Tips

    For the data field, it’s recommended to use the JSONata expression (J: Expression), as it offers several benefits over JSON:

    Inserting a Message Property into a String

    Example: Sending a TTS Message When a Door is Opened

    Screenshot of flow

    Screenshot of the action node

    { "message": "The " & data.attributes.friendly_name & " has been opened.", "entity_id": "all" }
    +
    [{"id":"cd1f9610a73addbc","type":"server-state-changed","z":"c89d915bdff0f798","name":"","server":"","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":[],"substring":[],"regex":["sensor\\\\..+_door$"]},"outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":446,"y":976,"wires":[["4e016826f6497b79"],[]]},{"id":"4e016826f6497b79","type":"api-call-service","z":"c89d915bdff0f798","name":"send tts","server":"","version":6,"debugenabled":false,"action":"tts.google_translate_say","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\\"message\\": \\"The \\" & data.attributes.friendly_name & \\" has been opened.\\", \\"entity_id\\": \\"all\\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"tts","service":"google_translate_say","output_location":"","output_location_type":"none","x":676,"y":976,"wires":[[]]}]
    +

    Retrieving a Property Value of a Home Assistant Entity

    Home Assistant nodes support custom JSONata functions to fetch properties of any HA entity.

    Example: Getting the Friendly Name of an Entity

    { "message": "The " & $entities("binary_sensor.front_door").attributes.friendly_name & " has been opened." }
    +

    Example: Getting Friendly Names of All Lights and Switches in an On State

    {
    +     "message": "The " & $join($entities().*[state = "on" and entity_id ~> /^light|^switch/].attributes.friendly_name, ", ") & " are on.",
    +     "title": "Left On"
    +}
    +

    Performing Arithmetic Operations

    Since Home Assistant states are represented as strings, you need to cast them to numbers in JSONata to perform arithmetic. Use the function $number() for this purpose. Although most entity attributes are in the correct state, casting them as numbers ensures accuracy.

    Example:

    $number($entities("sensor.kitchen_lux").state)
    +

    Example: Adding 3 to the Current Temperature of a Climate Entity

    Screenshot of action node

    { "temperature": $entities("climate.thermostat").attributes.temperature + 3 }
    +

    Creating a Comma-Delimited Entity ID List

    You can generate an entity ID list by retrieving entities using the get-entities node and then creating a comma-separated list to turn them off. In this example, the entity ID field is left blank as it is defined in the data field.

    Screenshot of flow

    Screenshot of action node

    { "entity_id": $join(payload.entity_id, ",") }
    +
    [{"id":"80c20ba2.f09cd8","type":"ha-get-entities","z":"c89d915bdff0f798","name":"get lights that are on","server":"","version":1,"rules":[{"condition":"state_object","property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"condition":"state_object","property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":false,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":516,"y":1152,"wires":[["cafbf446.080928"]]},{"id":"cafbf446.080928","type":"api-call-service","z":"c89d915bdff0f798","name":"turn them off","server":"","version":6,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\\"entity_id\\": $join(payload.entity_id,\\",\\")}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"light","service":"turn_off","output_location":"","output_location_type":"none","x":710,"y":1152,"wires":[[]]},{"id":"39666758.cee048","type":"inject","z":"c89d915bdff0f798","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":332,"y":1152,"wires":[["80c20ba2.f09cd8"]]}]
    +

    Additional Resources:

    `,32)),n("ul",null,[n("li",null,[t(a,{to:"/node/action.html"},{default:o(()=>s[1]||(s[1]=[p("Action Node Documentation")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[2]||(s[2]=[p("JSONata Guide")])),_:1})]),s[3]||(s[3]=n("li",null,[n("a",{href:"https://docs.jsonata.org",target:"_blank",rel:"noopener noreferrer"},"JSONata Documentation")],-1)),s[4]||(s[4]=n("li",null,[n("a",{href:"http://try.jsonata.org",target:"_blank",rel:"noopener noreferrer"},"JSONata Playground")],-1))])])}const j=u(f,[["render",b],["__file","action.html.vue"]]),x=JSON.parse('{"path":"/guide/action.html","title":"Action Node Tips and Tricks","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Home Assistant Domain","slug":"home-assistant-domain","link":"#home-assistant-domain","children":[]},{"level":2,"title":"Using Mustache Templates","slug":"using-mustache-templates","link":"#using-mustache-templates","children":[]},{"level":2,"title":"Targets","slug":"targets","link":"#targets","children":[]},{"level":2,"title":"Data Field","slug":"data-field","link":"#data-field","children":[{"level":3,"title":"Inserting a Message Property into a String","slug":"inserting-a-message-property-into-a-string","link":"#inserting-a-message-property-into-a-string","children":[]},{"level":3,"title":"Retrieving a Property Value of a Home Assistant Entity","slug":"retrieving-a-property-value-of-a-home-assistant-entity","link":"#retrieving-a-property-value-of-a-home-assistant-entity","children":[]},{"level":3,"title":"Performing Arithmetic Operations","slug":"performing-arithmetic-operations","link":"#performing-arithmetic-operations","children":[]},{"level":3,"title":"Creating a Comma-Delimited Entity ID List","slug":"creating-a-comma-delimited-entity-id-list","link":"#creating-a-comma-delimited-entity-id-list","children":[]}]}],"git":{"updatedTime":1724305054000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/action.md"}');export{j as comp,x as data}; diff --git a/assets/action_02-DgYg4NzD.png b/assets/action_02-DgYg4NzD.png new file mode 100644 index 0000000000..3da36dcab1 Binary files /dev/null and b/assets/action_02-DgYg4NzD.png differ diff --git a/assets/action_03-DnNG0qjN.png b/assets/action_03-DnNG0qjN.png new file mode 100644 index 0000000000..692e3360dc Binary files /dev/null and b/assets/action_03-DnNG0qjN.png differ diff --git a/assets/action_05-ClsCr7kS.png b/assets/action_05-ClsCr7kS.png new file mode 100644 index 0000000000..6f9d2de91b Binary files /dev/null and b/assets/action_05-ClsCr7kS.png differ diff --git a/assets/action_06-Dpyp8yfl.png b/assets/action_06-Dpyp8yfl.png new file mode 100644 index 0000000000..73d85dd698 Binary files /dev/null and b/assets/action_06-Dpyp8yfl.png differ diff --git a/assets/action_07-CDDnq17z.png b/assets/action_07-CDDnq17z.png new file mode 100644 index 0000000000..301c7d8ee2 Binary files /dev/null and b/assets/action_07-CDDnq17z.png differ diff --git a/assets/action_08-5Ct0UYzU.png b/assets/action_08-5Ct0UYzU.png new file mode 100644 index 0000000000..880f5f166b Binary files /dev/null and b/assets/action_08-5Ct0UYzU.png differ diff --git a/assets/actionable-notifications-subflow-for-android.html-C2aCe33_.js b/assets/actionable-notifications-subflow-for-android.html-C2aCe33_.js new file mode 100644 index 0000000000..416f58668c --- /dev/null +++ b/assets/actionable-notifications-subflow-for-android.html-C2aCe33_.js @@ -0,0 +1 @@ +import{_ as t,c as p,e as o,a as n,b as e,w as u,r as c,o as r,d as l}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/actionable-notifications-subflow-for-android_01-Ff8j17af.png",q="/node-red-contrib-home-assistant-websocket/assets/actionable-notifications-subflow-for-android_02-E9GuL3i2.png",i="/node-red-contrib-home-assistant-websocket/assets/actionable-notifications-subflow-for-android_03-CpQYr5Am.png",y="/node-red-contrib-home-assistant-websocket/assets/actionable-notifications-subflow-for-android_04-p0E-PxHx.png",g={};function d(b,s){const a=c("RouteLink");return r(),p("div",null,[s[1]||(s[1]=o('

    Actionable Notifications Subflow for Android

    Questions and Discussion

    Post questions and follow the discussion about this recipe here

    screenshot

    v1.1.0 - Requires version 0.68.0

    [{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.2\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"ha_config","type":"server","value":"","ui":{"label":{"en-US":"HA config"},"type":"conf-types"}},{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"select","opts":{"opts":[{"l":{"en-US":"Jason"},"v":"mobile_app_jason"}]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{"module":"Android actionable notification","version":"1.0.2","license":"MIT"},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        action: `notify.${service}`,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"timeout":"","noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"${ha_config}","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"${ha_config}","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_cleared","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"${ha_config}","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_action","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"${ha_config}","version":6,"debugenabled":false,"action":"","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","domain":"notify","x":550,"y":80,"wires":[[]]},{"id":"8a2ecff38edf7efd","type":"subflow:6dc0247c.d7210c","z":"bd764bbe2981bf8f","g":"88a81b994490d984","name":"","env":[{"name":"ha_config","value":"_ADD_","type":"conf-type"},{"name":"group","value":"","type":"str"},{"name":"HA config","value":"","type":"str"}],"x":196,"y":80,"wires":[[],[],[],[]]}]\n

    Changes

    Old versions

    v1.0.1 - Requires version 0.68.0

    [{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.1\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        action: `notify.${service}`,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"timeout":"","noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_cleared","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_action","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"","version":6,"debugenabled":false,"action":"","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","domain":"notify","x":550,"y":80,"wires":[[]]},{"id":"8a2ecff38edf7efd","type":"subflow:6dc0247c.d7210c","z":"bd764bbe2981bf8f","name":"","env":[{"name":"group","value":null,"type":"str"}],"x":180,"y":96,"wires":[[],[],[],[]]}]\n

    v1.0.0

    [{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.0\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"","version":1,"event_type":"mobile_app_notification_cleared","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"","version":1,"event_type":"mobile_app_notification_action","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"","version":4,"debugenabled":false,"domain":"notify","target":{"areaId":[],"deviceId":[],"entityId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":550,"y":80,"wires":[[]]},{"id":"8a2ecff38edf7efd","type":"subflow:6dc0247c.d7210c","z":"a38123c1.2fd3f","name":"","x":516,"y":544,"wires":[[],[],[],[]]}]\n

    v0.0.0

    [{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1172,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1172,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1172,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"color":"#DDAA99","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"const actions = [];\\n[1,2,3].forEach(i => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = env.get(`${name}Title`);\\n    const uri = env.get(`${name}Uri`);\\n    const action = !!uri.length ? 'URI' : title ? flow.get(`${name}Id`) : undefined;\\n    \\n    actions.push({\\n        action,\\n        title,\\n        uri\\n    });\\n});\\n\\nmsg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            title: env.get('title'),\\n            message: env.get('message'),\\n            data: {\\n                tag: flow.get('notificationTag'),\\n                actions,\\n                color: env.get(\\"color\\"),\\n                group: env.get(\\"group\\"),\\n                sticky: env.get(\\"sticky\\"),\\n                timeout: env.get(\\"timeout\\"),\\n                icon: env.get(\\"icon\\")\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","location":"userData","locationType":"msg","responseType":"json","x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","event_type":"mobile_app_notification_cleared","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","event_type":"mobile_app_notification_action","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","version":1,"debugenabled":false,"service_domain":"notify","service":"","entityId":"","data":"","dataType":"json","mergecontext":"callServiceData","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":80,"wires":[[]]}]\n
    OptionsDescriptionDocumentation
    HA configHome Assistant configuration node
    Notify ServiceCan take multiple services as a comma delimited list e.g.: mobile_app_username, mobile_app_username2
    TitleTop line of textlink
    MessageSecond line of text accepts HTML tagslink
    Action TitleThe button titlelink
    Action URIlovelace dashboard, https:// or app://. If URI is defined no action is returned to Node-REDlink
    User InfoWill resolve user info in Node-RED and place it in msg.userData
    StickySet whether to dismiss the notification upon selecting it or notlink
    Groupstringlink
    ColorColor name or the hex codelink
    TimeoutHow long a notification will be shown on a users device before being removed automaticallylink
    IconPath to iconlink

    Any setting can be set or overwritten using msg.actionable to pass a notification object into the node.

    Demo flow

    screenshot

    [{"id":"a54a9c807b16be0f","type":"group","z":"bd764bbe2981bf8f","name":"demo.json","style":{"label":true},"nodes":["aa8e9e73.4957f","d2b46240.6de89","a63fb7bc.64af88","2f4904b8.568d3c","75334c15.956694","81797230.4299e","7b116fa205bb7db2"],"x":50,"y":199,"w":692,"h":178},{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.1\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        action: `notify.${service}`,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"timeout":"","noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_cleared","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_action","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"","version":6,"debugenabled":false,"action":"","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","domain":"notify","x":550,"y":80,"wires":[[]]},{"id":"aa8e9e73.4957f","type":"inject","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"abc","payload":"default payload","payloadType":"str","x":186,"y":288,"wires":[["7b116fa205bb7db2"]]},{"id":"d2b46240.6de89","type":"debug","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"action1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":636,"y":240,"wires":[]},{"id":"a63fb7bc.64af88","type":"debug","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"action2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":636,"y":272,"wires":[]},{"id":"2f4904b8.568d3c","type":"debug","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"action3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":636,"y":304,"wires":[]},{"id":"75334c15.956694","type":"debug","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"cleared","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":636,"y":336,"wires":[]},{"id":"81797230.4299e","type":"inject","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"clear_notification","props":[{"p":"clear_notification","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":192,"y":336,"wires":[["7b116fa205bb7db2"]]},{"id":"7b116fa205bb7db2","type":"subflow:6dc0247c.d7210c","z":"bd764bbe2981bf8f","g":"a54a9c807b16be0f","name":"","env":[{"name":"group","value":null,"type":"str"}],"x":428,"y":288,"wires":[["d2b46240.6de89"],["a63fb7bc.64af88"],["2f4904b8.568d3c"],["75334c15.956694"]]}]\n

    Use Case 1: Get a notification when garage door is left open with ability to ignore the alert for an amount of time

    screenshot

    [{"id":"10f78dfbdda44e3b","type":"group","z":"bd764bbe2981bf8f","name":"use-case-01","style":{"label":true},"nodes":["bec57b08.0a8f08","31d5412.74a31be","587bab85.857fe4","e85a9609.74ddd8","1d0b3f5b.37aab1","8c90dfc.28f2f2","df484d95.35a35","6566fa4.a832004","88fd9ca4.3ea69","9e5e4c22.4d925","13c8aaf9.466e05","8f5a5cc3.fb235","5485b497.b4d90c","1b96dc9e.4f1fe3","5b765a47a35c3f91"],"x":22,"y":439,"w":1368,"h":210},{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.1\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        action: `notify.${service}`,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"timeout":"","noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_cleared","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_action","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"","version":6,"debugenabled":false,"action":"","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","domain":"notify","x":550,"y":80,"wires":[[]]},{"id":"bec57b08.0a8f08","type":"time-range-switch","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","lat":"","lon":"","startTime":"sunsetStart","endTime":"6:00","startOffset":"-15","endOffset":0,"x":490,"y":496,"wires":[["1b96dc9e.4f1fe3"],[]]},{"id":"31d5412.74a31be","type":"poll-state","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"garage door open?","server":"","version":3,"exposeAsEntityConfig":"","updateInterval":"30","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":true,"outputOnChanged":true,"entityId":"cover.garage_door","stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputs":2,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":138,"y":528,"wires":[["6566fa4.a832004"],["5485b497.b4d90c"]]},{"id":"587bab85.857fe4","type":"subflow:6dc0247c.d7210c","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"close garage door?","env":[{"name":"service","value":"mobile_app_jason","type":"str"},{"name":"title","value":"Garage Door","type":"str"},{"name":"message","value":"Garage Door is Open","type":"str"},{"name":"action1Title","value":"Close Door","type":"str"},{"name":"action2Title","value":"Ignore 1 hour","type":"str"},{"name":"action3Title","value":"Ignore 2 hours","type":"str"},{"name":"group","value":"","type":"str"}],"x":1066,"y":544,"wires":[["e85a9609.74ddd8"],["8c90dfc.28f2f2"],["df484d95.35a35"],["13c8aaf9.466e05"]],"icon":"font-awesome/fa-car"},{"id":"e85a9609.74ddd8","type":"api-call-service","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"close garage door","server":"","version":6,"debugenabled":false,"action":"cover.close_cover","floorId":[],"areaId":[],"deviceId":[],"entityId":["cover.garage_door"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"cover","service":"close_cover","output_location":"","output_location_type":"none","x":1274,"y":496,"wires":[[]]},{"id":"1d0b3f5b.37aab1","type":"api-current-state","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"not home?","server":"","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","entity_id":"person.jason","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":678,"y":544,"wires":[["5b765a47a35c3f91"],[]]},{"id":"8c90dfc.28f2f2","type":"change","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","rules":[{"t":"set","p":"ignore","pt":"msg","to":"60","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1199,"y":544,"wires":[["88fd9ca4.3ea69"]],"l":false},{"id":"df484d95.35a35","type":"change","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","rules":[{"t":"set","p":"ignore","pt":"msg","to":"120","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1199,"y":576,"wires":[["88fd9ca4.3ea69"]],"l":false},{"id":"6566fa4.a832004","type":"function","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"ignore?","func":"if(msg.ignore) {\\n    const timeout = Date.now() + msg.ignore * 60000;\\n    const d = new Date(timeout);\\n    context.set('timeout', timeout)\\n    node.status({text: `Ignoring until ${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}`, fill: \\"red\\"});\\n    return;\\n}\\n\\nconst timeout = context.get('timeout') || 0;\\n\\nif(timeout > Date.now()) return;\\n\\nnode.status({});\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":316,"y":528,"wires":[["bec57b08.0a8f08","8f5a5cc3.fb235"]]},{"id":"88fd9ca4.3ea69","type":"link out","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"Ignore","links":["9e5e4c22.4d925"],"x":1314,"y":544,"wires":[],"l":true},{"id":"9e5e4c22.4d925","type":"link in","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","links":["88fd9ca4.3ea69"],"x":207,"y":480,"wires":[["6566fa4.a832004"]]},{"id":"13c8aaf9.466e05","type":"change","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","rules":[{"t":"set","p":"ignore","pt":"msg","to":"30","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1199,"y":608,"wires":[["88fd9ca4.3ea69"]],"l":false},{"id":"8f5a5cc3.fb235","type":"trigger","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"2","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":470,"y":544,"wires":[["1d0b3f5b.37aab1"]]},{"id":"5485b497.b4d90c","type":"change","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":306,"y":576,"wires":[["8f5a5cc3.fb235","1b96dc9e.4f1fe3"]]},{"id":"1b96dc9e.4f1fe3","type":"trigger","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":678,"y":496,"wires":[["5b765a47a35c3f91"]]},{"id":"5b765a47a35c3f91","type":"delay","z":"bd764bbe2981bf8f","g":"10f78dfbdda44e3b","name":"Once / 30 mins","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"30","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":864,"y":544,"wires":[["587bab85.857fe4"]]}]\n

    Required Nodes

    Use Case 2: Ask if vacation mode should be turned on after being away for 24 hours

    screenshot

    [{"id":"eeda20dfef44e955","type":"group","z":"bd764bbe2981bf8f","name":"use-case-02.json","style":{"label":true},"nodes":["b35b9988.72c6d8","4587eb7f.fb86a4","be568091.56bbb","e5d8423c.2ccfe"],"x":34,"y":695,"w":864,"h":113},{"id":"6dc0247c.d7210c","type":"subflow","name":"Actionable Notification","info":"Android actionable notification v1.0.1\\n\\n[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"HA Actions","in":[{"x":84,"y":80,"wires":[{"id":"9d85d137.fe487"}]}],"out":[{"x":1188,"y":128,"wires":[{"id":"974bd48d.c253e8","port":0}]},{"x":1188,"y":176,"wires":[{"id":"974bd48d.c253e8","port":1}]},{"x":1188,"y":224,"wires":[{"id":"974bd48d.c253e8","port":2}]},{"x":964,"y":240,"wires":[{"id":"5bc7345c.07b1cc","port":1}]}],"env":[{"name":"service","type":"str","value":"mobile_app_jason","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#46B1EF","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"icon":"font-awesome/fa-mobile-phone","status":{"x":244,"y":272,"wires":[{"id":"204dbcfc.144ae4","port":0}]}},{"id":"f9e57204.71076","type":"function","z":"6dc0247c.d7210c","name":"create service call","func":"msg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nconst actions = [1, 2, 3].reduce((acc, i) => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = getActionProperty(i, \\"title\\") ?? env.get(`${name}Title`);\\n    const uri = getActionProperty(i, \\"uri\\") ?? env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? id : undefined;\\n\\n    acc.push({ action, title, uri });\\n\\n    return acc;\\n}, []);\\n\\nconst tag = flow.get('notificationTag');\\nconst data = mergeDeep({\\n        title: env.get('title'),\\n        message: env.get('message'),\\n        data: {\\n            tag,\\n            color: env.get(\\"color\\"),\\n            group: env.get(\\"group\\"),\\n            sticky: env.get(\\"sticky\\"),\\n            timeout: env.get(\\"timeout\\"),\\n            icon: env.get(\\"icon\\")\\n        },\\n    },    \\n    msg.actionable,    \\n    {data: {actions}},\\n);\\n\\nif(tag !== data?.data?.tag) {\\n    flow.set('notificationTag', data?.data?.tag);\\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        action: `notify.${service}`,\\n        data,\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();\\n\\nfunction getActionProperty(index, prop) {\\n    const i = index - 1;\\n\\n    return msg?.actionable?.data?.actions?.[i]?.[prop];\\n}\\n\\n/**\\n * Simple object check.\\n * @param item\\n * @returns {boolean}\\n */\\nfunction isObject(item) {\\n    return (item && typeof item === 'object' && !Array.isArray(item));\\n}\\n\\n/**\\n * Deep merge two objects.\\n * @param target\\n * @param sources\\n */\\nfunction mergeDeep(target, ...sources) {\\n    if (!sources.length) return target;\\n    const source = sources.shift();\\n\\n    if (isObject(target) && isObject(source)) {\\n        for (const key in source) {\\n            if (isObject(source[key])) {\\n                if (!target[key]) Object.assign(target, { [key]: {} });\\n                mergeDeep(target[key], source[key]);\\n            } else {\\n                Object.assign(target, { [key]: source[key] });\\n            }\\n        }\\n    }\\n\\n    return mergeDeep(target, ...sources);\\n}\\n","outputs":1,"timeout":"","noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","libs":[],"x":298,"y":80,"wires":[["368c9723.5876f8"]]},{"id":"974bd48d.c253e8","type":"switch","z":"6dc0247c.d7210c","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"204dbcfc.144ae4","type":"status","z":"6dc0247c.d7210c","name":"","scope":["f9e57204.71076","5bc7345c.07b1cc","a622c92a.2d9898","368c9723.5876f8"],"x":124,"y":272,"wires":[[]]},{"id":"5bc7345c.07b1cc","type":"function","z":"6dc0247c.d7210c","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\ndelete latestMessage.actionable;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":832,"y":176,"wires":[["974bd48d.c253e8"],[]]},{"id":"8d3bdc0c.37493","type":"switch","z":"6dc0247c.d7210c","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["83ad2004.d04d"]]},{"id":"271e4479.b9249c","type":"ha-api","z":"6dc0247c.d7210c","name":"get user info","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"userData","propertyType":"msg","value":"","valueType":"results"}],"x":822,"y":128,"wires":[["5bc7345c.07b1cc"]]},{"id":"3618f055.6909a","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_cleared","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_cleared","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":224,"wires":[["8d3bdc0c.37493"]]},{"id":"83ad2004.d04d","type":"switch","z":"6dc0247c.d7210c","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["271e4479.b9249c"],["5bc7345c.07b1cc"]]},{"id":"9d85d137.fe487","type":"switch","z":"6dc0247c.d7210c","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["f9e57204.71076"],["a622c92a.2d9898"]],"l":false},{"id":"a622c92a.2d9898","type":"function","z":"6dc0247c.d7210c","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.status({text: \\"cleared\\"});\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":318,"y":128,"wires":[["368c9723.5876f8"]]},{"id":"9bfe567c.3d10c8","type":"server-events","z":"6dc0247c.d7210c","name":"mobile_app_notification_action","server":"","version":3,"exposeAsEntityConfig":"","eventType":"mobile_app_notification_action","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\\"eventData\\").event_type","valueType":"jsonata"}],"x":194,"y":176,"wires":[["8d3bdc0c.37493"]]},{"id":"368c9723.5876f8","type":"api-call-service","z":"6dc0247c.d7210c","name":"","server":"","version":6,"debugenabled":false,"action":"","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","domain":"notify","x":550,"y":80,"wires":[[]]},{"id":"b35b9988.72c6d8","type":"server-state-changed","z":"bd764bbe2981bf8f","g":"eeda20dfef44e955","name":"Away?","server":"","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["person.jason"],"substring":[],"regex":[]},"outputInitially":true,"stateType":"str","ifState":"home","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"24","forType":"num","forUnits":"hours","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":736,"wires":[["4587eb7f.fb86a4"],[]]},{"id":"4587eb7f.fb86a4","type":"api-current-state","z":"bd764bbe2981bf8f","g":"eeda20dfef44e955","name":"Vacation mode off?","server":"","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.vacation_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":278,"y":736,"wires":[["e5d8423c.2ccfe"],[]]},{"id":"be568091.56bbb","type":"api-call-service","z":"bd764bbe2981bf8f","g":"eeda20dfef44e955","name":"Turn On Vacation Mode","server":"","version":6,"debugenabled":false,"action":"input_boolean.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["input_boolean.vacation_mode"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"input_boolean","service":"turn_on","output_location":"","output_location_type":"none","x":762,"y":736,"wires":[[]]},{"id":"e5d8423c.2ccfe","type":"subflow:6dc0247c.d7210c","z":"bd764bbe2981bf8f","g":"eeda20dfef44e955","name":"Turn on Vacation Mode?","env":[{"name":"service","value":"mobile_app_jason","type":"str"},{"name":"title","value":"Vacation Mode","type":"str"},{"name":"message","value":"You've been away for 24 hours.<br>Do you want to turn on vacation mode?","type":"str"},{"name":"action1Title","value":"Yes","type":"str"},{"name":"action2Title","value":"No","type":"str"},{"name":"group","value":"","type":"str"}],"x":506,"y":752,"wires":[["be568091.56bbb"],[],[],[]]}]\n

    Also see:

    ',22)),n("ul",null,[n("li",null,[e(a,{to:"/cookbook/vacation-mode.html"},{default:u(()=>s[0]||(s[0]=[l("Cookbook: Vacation Mode")])),_:1})])])])}const f=t(g,[["render",d],["__file","actionable-notifications-subflow-for-android.html.vue"]]),v=JSON.parse('{"path":"/cookbook/actionable-notifications-subflow-for-android.html","title":"Actionable Notifications Subflow for Android","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Demo flow","slug":"demo-flow","link":"#demo-flow","children":[]},{"level":2,"title":"Use Case 1: Get a notification when garage door is left open with ability to ignore the alert for an amount of time","slug":"use-case-1-get-a-notification-when-garage-door-is-left-open-with-ability-to-ignore-the-alert-for-an-amount-of-time","link":"#use-case-1-get-a-notification-when-garage-door-is-left-open-with-ability-to-ignore-the-alert-for-an-amount-of-time","children":[]},{"level":2,"title":"Use Case 2: Ask if vacation mode should be turned on after being away for 24 hours","slug":"use-case-2-ask-if-vacation-mode-should-be-turned-on-after-being-away-for-24-hours","link":"#use-case-2-ask-if-vacation-mode-should-be-turned-on-after-being-away-for-24-hours","children":[]}],"git":{"updatedTime":1725024932000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":3},{"name":"Mauricio Bonani","email":"bonanitech@gmail.com","commits":1}]},"filePathRelative":"cookbook/actionable-notifications-subflow-for-android.md"}');export{f as comp,v as data}; diff --git a/assets/actionable-notifications-subflow-for-android_01-Ff8j17af.png b/assets/actionable-notifications-subflow-for-android_01-Ff8j17af.png new file mode 100644 index 0000000000..36302f4515 Binary files /dev/null and b/assets/actionable-notifications-subflow-for-android_01-Ff8j17af.png differ diff --git a/assets/actionable-notifications-subflow-for-android_02-E9GuL3i2.png b/assets/actionable-notifications-subflow-for-android_02-E9GuL3i2.png new file mode 100644 index 0000000000..4416bd797e Binary files /dev/null and b/assets/actionable-notifications-subflow-for-android_02-E9GuL3i2.png differ diff --git a/assets/actionable-notifications-subflow-for-android_03-CpQYr5Am.png b/assets/actionable-notifications-subflow-for-android_03-CpQYr5Am.png new file mode 100644 index 0000000000..7718831898 Binary files /dev/null and b/assets/actionable-notifications-subflow-for-android_03-CpQYr5Am.png differ diff --git a/assets/actionable-notifications-subflow-for-android_04-p0E-PxHx.png b/assets/actionable-notifications-subflow-for-android_04-p0E-PxHx.png new file mode 100644 index 0000000000..9fe308febc Binary files /dev/null and b/assets/actionable-notifications-subflow-for-android_04-p0E-PxHx.png differ diff --git a/assets/app-CefLgoES.js b/assets/app-CefLgoES.js new file mode 100644 index 0000000000..10bad26d93 --- /dev/null +++ b/assets/app-CefLgoES.js @@ -0,0 +1,28 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/play-jellyfin-show-using-sentence-node.html-CsvMb0ZJ.js","assets/play-jellyfin-show-using-sentence-node_03-B3fhig1f.js","assets/sun-events.html-cUR6Nkho.js","assets/first-automation_05-BSXfHgTV.js","assets/first-automation.html-BYONk5Lb.js","assets/sentence.html-hzBKu6RK.js"])))=>i.map(i=>d[i]); +/** +* @vue/shared v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Zi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const _e={},yn=[],yt=()=>{},Ya=()=>!1,sl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xi=e=>e.startsWith("onUpdate:"),Re=Object.assign,eo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Za=Object.prototype.hasOwnProperty,he=(e,t)=>Za.call(e,t),Z=Array.isArray,kn=e=>al(e)==="[object Map]",Yl=e=>al(e)==="[object Set]",Ho=e=>al(e)==="[object Date]",ie=e=>typeof e=="function",Te=e=>typeof e=="string",kt=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",ts=e=>(ve(e)||ie(e))&&ie(e.then)&&ie(e.catch),ns=Object.prototype.toString,al=e=>ns.call(e),Xa=e=>al(e).slice(8,-1),ls=e=>al(e)==="[object Object]",to=e=>Te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,En=Zi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zl=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ec=/-(\w)/g,Qe=Zl(e=>e.replace(ec,(t,n)=>n?n.toUpperCase():"")),tc=/\B([A-Z])/g,qt=Zl(e=>e.replace(tc,"-$1").toLowerCase()),cl=Zl(e=>e.charAt(0).toUpperCase()+e.slice(1)),mi=Zl(e=>e?`on${cl(e)}`:""),Bt=(e,t)=>!Object.is(e,t),Il=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Ni=e=>{const t=parseFloat(e);return isNaN(t)?e:t},nc=e=>{const t=Te(e)?Number(e):NaN;return isNaN(t)?e:t};let Fo;const os=()=>Fo||(Fo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ul(e){if(Z(e)){const t={};for(let n=0;n{if(n){const l=n.split(ic);l.length>1&&(t[l[0].trim()]=l[1].trim())}}),t}function nt(e){let t="";if(Te(e))t=e;else if(Z(e))for(let n=0;nXl(n,t))}const as=e=>!!(e&&e.__v_isRef===!0),Se=e=>Te(e)?e:e==null?"":Z(e)||ve(e)&&(e.toString===ns||!ie(e.toString))?as(e)?Se(e.value):JSON.stringify(e,cs,2):String(e),cs=(e,t)=>as(t)?cs(e,t.value):kn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[l,i],o)=>(n[vi(l,o)+" =>"]=i,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>vi(n))}:kt(t)?vi(t):ve(t)&&!Z(t)&&!ls(t)?String(t):t,vi=(e,t="")=>{var n;return kt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let We;class uc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=We,!t&&We&&(this.index=(We.scopes||(We.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(Un){let t=Un;for(Un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;zn;){let t=zn;for(zn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(l){e||(e=l)}t=n}}if(e)throw e}function ps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gs(e){let t,n=e.depsTail,l=n;for(;l;){const i=l.prevDep;l.version===-1?(l===n&&(n=i),io(l),fc(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=i}e.deps=t,e.depsTail=n}function Hi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ms(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ms(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qn))return;e.globalVersion=Qn;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Hi(e)){e.flags&=-3;return}const n=Ee,l=ut;Ee=e,ut=!0;try{ps(e);const i=e.fn(e._value);(t.version===0||Bt(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ee=n,ut=l,gs(e),e.flags&=-3}}function io(e,t=!1){const{dep:n,prevSub:l,nextSub:i}=e;if(l&&(l.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l),!n.subs&&n.computed){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)io(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ut=!0;const vs=[];function Gt(){vs.push(ut),ut=!1}function Jt(){const e=vs.pop();ut=e===void 0?!0:e}function Vo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let Qn=0;class hc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ei{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ee||!ut||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new hc(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,_s(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const l=n.nextDep;l.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=l),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=l)}return n}trigger(t){this.version++,Qn++,this.notify(t)}notify(t){no();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{lo()}}}function _s(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let l=t.deps;l;l=l.nextDep)_s(l)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Vl=new WeakMap,sn=Symbol(""),Fi=Symbol(""),Yn=Symbol("");function Be(e,t,n){if(ut&&Ee){let l=Vl.get(e);l||Vl.set(e,l=new Map);let i=l.get(n);i||(l.set(n,i=new ei),i.map=l,i.key=n),i.track()}}function Pt(e,t,n,l,i,o){const r=Vl.get(e);if(!r){Qn++;return}const s=a=>{a&&a.trigger()};if(no(),t==="clear")r.forEach(s);else{const a=Z(e),c=a&&to(n);if(a&&n==="length"){const u=Number(l);r.forEach((d,h)=>{(h==="length"||h===Yn||!kt(h)&&h>=u)&&s(d)})}else switch(n!==void 0&&s(r.get(n)),c&&s(r.get(Yn)),t){case"add":a?c&&s(r.get("length")):(s(r.get(sn)),kn(e)&&s(r.get(Fi)));break;case"delete":a||(s(r.get(sn)),kn(e)&&s(r.get(Fi)));break;case"set":kn(e)&&s(r.get(sn));break}}lo()}function pc(e,t){const n=Vl.get(e);return n&&n.get(t)}function pn(e){const t=de(e);return t===e?t:(Be(t,"iterate",Yn),st(e)?t:t.map($e))}function ti(e){return Be(e=de(e),"iterate",Yn),e}const gc={__proto__:null,[Symbol.iterator](){return bi(this,Symbol.iterator,$e)},concat(...e){return pn(this).concat(...e.map(t=>Z(t)?pn(t):t))},entries(){return bi(this,"entries",e=>(e[1]=$e(e[1]),e))},every(e,t){return xt(this,"every",e,t,void 0,arguments)},filter(e,t){return xt(this,"filter",e,t,n=>n.map($e),arguments)},find(e,t){return xt(this,"find",e,t,$e,arguments)},findIndex(e,t){return xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xt(this,"findLast",e,t,$e,arguments)},findLastIndex(e,t){return xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xt(this,"forEach",e,t,void 0,arguments)},includes(...e){return yi(this,"includes",e)},indexOf(...e){return yi(this,"indexOf",e)},join(e){return pn(this).join(e)},lastIndexOf(...e){return yi(this,"lastIndexOf",e)},map(e,t){return xt(this,"map",e,t,void 0,arguments)},pop(){return Nn(this,"pop")},push(...e){return Nn(this,"push",e)},reduce(e,...t){return $o(this,"reduce",e,t)},reduceRight(e,...t){return $o(this,"reduceRight",e,t)},shift(){return Nn(this,"shift")},some(e,t){return xt(this,"some",e,t,void 0,arguments)},splice(...e){return Nn(this,"splice",e)},toReversed(){return pn(this).toReversed()},toSorted(e){return pn(this).toSorted(e)},toSpliced(...e){return pn(this).toSpliced(...e)},unshift(...e){return Nn(this,"unshift",e)},values(){return bi(this,"values",$e)}};function bi(e,t,n){const l=ti(e),i=l[t]();return l!==e&&!st(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.value&&(o.value=n(o.value)),o}),i}const mc=Array.prototype;function xt(e,t,n,l,i,o){const r=ti(e),s=r!==e&&!st(e),a=r[t];if(a!==mc[t]){const d=a.apply(e,o);return s?$e(d):d}let c=n;r!==e&&(s?c=function(d,h){return n.call(this,$e(d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=a.call(r,c,l);return s&&i?i(u):u}function $o(e,t,n,l){const i=ti(e);let o=n;return i!==e&&(st(e)?n.length>3&&(o=function(r,s,a){return n.call(this,r,s,a,e)}):o=function(r,s,a){return n.call(this,r,$e(s),a,e)}),i[t](o,...l)}function yi(e,t,n){const l=de(e);Be(l,"iterate",Yn);const i=l[t](...n);return(i===-1||i===!1)&&ao(n[0])?(n[0]=de(n[0]),l[t](...n)):i}function Nn(e,t,n=[]){Gt(),no();const l=de(e)[t].apply(e,n);return lo(),Jt(),l}const vc=Zi("__proto__,__v_isRef,__isVue"),bs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kt));function _c(e){kt(e)||(e=String(e));const t=de(this);return Be(t,"has",e),t.hasOwnProperty(e)}class ys{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,l){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return l===(i?o?Oc:xs:o?ws:Es).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(l)?t:void 0;const r=Z(t);if(!i){let a;if(r&&(a=gc[n]))return a;if(n==="hasOwnProperty")return _c}const s=Reflect.get(t,n,Oe(t)?t:l);return(kt(n)?bs.has(n):vc(n))||(i||Be(t,"get",n),o)?s:Oe(s)?r&&to(n)?s:s.value:ve(s)?i?li(s):dl(s):s}}class ks extends ys{constructor(t=!1){super(!1,t)}set(t,n,l,i){let o=t[n];if(!this._isShallow){const a=hn(o);if(!st(l)&&!hn(l)&&(o=de(o),l=de(l)),!Z(t)&&Oe(o)&&!Oe(l))return a?!1:(o.value=l,!0)}const r=Z(t)&&to(n)?Number(n)e,ni=e=>Reflect.getPrototypeOf(e);function _l(e,t,n=!1,l=!1){e=e.__v_raw;const i=de(e),o=de(t);n||(Bt(t,o)&&Be(i,"get",t),Be(i,"get",o));const{has:r}=ni(i),s=l?oo:n?co:$e;if(r.call(i,t))return s(e.get(t));if(r.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function bl(e,t=!1){const n=this.__v_raw,l=de(n),i=de(e);return t||(Bt(e,i)&&Be(l,"has",e),Be(l,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function yl(e,t=!1){return e=e.__v_raw,!t&&Be(de(e),"iterate",sn),Reflect.get(e,"size",e)}function jo(e,t=!1){!t&&!st(e)&&!hn(e)&&(e=de(e));const n=de(this);return ni(n).has.call(n,e)||(n.add(e),Pt(n,"add",e,e)),this}function Bo(e,t,n=!1){!n&&!st(t)&&!hn(t)&&(t=de(t));const l=de(this),{has:i,get:o}=ni(l);let r=i.call(l,e);r||(e=de(e),r=i.call(l,e));const s=o.call(l,e);return l.set(e,t),r?Bt(t,s)&&Pt(l,"set",e,t):Pt(l,"add",e,t),this}function zo(e){const t=de(this),{has:n,get:l}=ni(t);let i=n.call(t,e);i||(e=de(e),i=n.call(t,e)),l&&l.call(t,e);const o=t.delete(e);return i&&Pt(t,"delete",e,void 0),o}function Uo(){const e=de(this),t=e.size!==0,n=e.clear();return t&&Pt(e,"clear",void 0,void 0),n}function kl(e,t){return function(l,i){const o=this,r=o.__v_raw,s=de(r),a=t?oo:e?co:$e;return!e&&Be(s,"iterate",sn),r.forEach((c,u)=>l.call(i,a(c),a(u),o))}}function El(e,t,n){return function(...l){const i=this.__v_raw,o=de(i),r=kn(o),s=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,c=i[e](...l),u=n?oo:t?co:$e;return!t&&Be(o,"iterate",a?Fi:sn),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:s?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Mt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function wc(){const e={get(o){return _l(this,o)},get size(){return yl(this)},has:bl,add:jo,set:Bo,delete:zo,clear:Uo,forEach:kl(!1,!1)},t={get(o){return _l(this,o,!1,!0)},get size(){return yl(this)},has:bl,add(o){return jo.call(this,o,!0)},set(o,r){return Bo.call(this,o,r,!0)},delete:zo,clear:Uo,forEach:kl(!1,!0)},n={get(o){return _l(this,o,!0)},get size(){return yl(this,!0)},has(o){return bl.call(this,o,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:kl(!0,!1)},l={get(o){return _l(this,o,!0,!0)},get size(){return yl(this,!0)},has(o){return bl.call(this,o,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:kl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=El(o,!1,!1),n[o]=El(o,!0,!1),t[o]=El(o,!1,!0),l[o]=El(o,!0,!0)}),[e,n,t,l]}const[xc,Sc,Lc,Cc]=wc();function ro(e,t){const n=t?e?Cc:Lc:e?Sc:xc;return(l,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?l:Reflect.get(he(n,i)&&i in l?n:l,i,o)}const Tc={get:ro(!1,!1)},Ac={get:ro(!1,!0)},Pc={get:ro(!0,!1)};const Es=new WeakMap,ws=new WeakMap,xs=new WeakMap,Oc=new WeakMap;function Rc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ic(e){return e.__v_skip||!Object.isExtensible(e)?0:Rc(Xa(e))}function dl(e){return hn(e)?e:so(e,!1,yc,Tc,Es)}function Ss(e){return so(e,!1,Ec,Ac,ws)}function li(e){return so(e,!0,kc,Pc,xs)}function so(e,t,n,l,i){if(!ve(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=Ic(e);if(r===0)return e;const s=new Proxy(e,r===2?l:n);return i.set(e,s),s}function an(e){return hn(e)?an(e.__v_raw):!!(e&&e.__v_isReactive)}function hn(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function ao(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Dc(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&is(e,"__v_skip",!0),e}const $e=e=>ve(e)?dl(e):e,co=e=>ve(e)?li(e):e;function Oe(e){return e?e.__v_isRef===!0:!1}function ae(e){return Ls(e,!1)}function Et(e){return Ls(e,!0)}function Ls(e,t){return Oe(e)?e:new Mc(e,t)}class Mc{constructor(t,n){this.dep=new ei,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:de(t),this._value=n?t:$e(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,l=this.__v_isShallow||st(t)||hn(t);t=l?t:de(t),Bt(t,n)&&(this._rawValue=t,this._value=l?t:$e(t),this.dep.trigger())}}function cn(e){return Oe(e)?e.value:e}const Nc={get:(e,t,n)=>t==="__v_raw"?e:cn(Reflect.get(e,t,n)),set:(e,t,n,l)=>{const i=e[t];return Oe(i)&&!Oe(n)?(i.value=n,!0):Reflect.set(e,t,n,l)}};function Cs(e){return an(e)?e:new Proxy(e,Nc)}class Hc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new ei,{get:l,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=l,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Fc(e){return new Hc(e)}function uo(e){const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=Ts(e,n);return t}class Vc{constructor(t,n,l){this._object=t,this._key=n,this._defaultValue=l,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return pc(de(this._object),this._key)}}class $c{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function jc(e,t,n){return Oe(e)?e:ie(e)?new $c(e):ve(e)&&arguments.length>1?Ts(e,t,n):ae(e)}function Ts(e,t,n){const l=e[t];return Oe(l)?l:new Vc(e,t,n)}class Bc{constructor(t,n,l){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ei(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return hs(this,!0),!0}get value(){const t=this.dep.track();return ms(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zc(e,t,n=!1){let l,i;return ie(e)?l=e:(l=e.get,i=e.set),new Bc(l,i,n)}const wl={},$l=new WeakMap;let tn;function Uc(e,t=!1,n=tn){if(n){let l=$l.get(n);l||$l.set(n,l=[]),l.push(e)}}function Wc(e,t,n=_e){const{immediate:l,deep:i,once:o,scheduler:r,augmentJob:s,call:a}=n,c=v=>i?v:st(v)||i===!1||i===0?At(v,1):At(v);let u,d,h,m,b=!1,y=!1;if(Oe(e)?(d=()=>e.value,b=st(e)):an(e)?(d=()=>c(e),b=!0):Z(e)?(y=!0,b=e.some(v=>an(v)||st(v)),d=()=>e.map(v=>{if(Oe(v))return v.value;if(an(v))return c(v);if(ie(v))return a?a(v,2):v()})):ie(e)?t?d=a?()=>a(e,2):e:d=()=>{if(h){Gt();try{h()}finally{Jt()}}const v=tn;tn=u;try{return a?a(e,3,[m]):e(m)}finally{tn=v}}:d=yt,t&&i){const v=d,M=i===!0?1/0:i;d=()=>At(v(),M)}const T=us(),C=()=>{u.stop(),T&&eo(T.effects,u)};if(o&&t){const v=t;t=(...M)=>{v(...M),C()}}let w=y?new Array(e.length).fill(wl):wl;const g=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(t){const M=u.run();if(i||b||(y?M.some((G,D)=>Bt(G,w[D])):Bt(M,w))){h&&h();const G=tn;tn=u;try{const D=[M,w===wl?void 0:y&&w[0]===wl?[]:w,m];a?a(t,3,D):t(...D),w=M}finally{tn=G}}}else u.run()};return s&&s(g),u=new ds(d),u.scheduler=r?()=>r(g,!1):g,m=v=>Uc(v,!1,u),h=u.onStop=()=>{const v=$l.get(u);if(v){if(a)a(v,4);else for(const M of v)M();$l.delete(u)}},t?l?g(!0):w=u.run():r?r(g.bind(null,!0),!0):u.run(),C.pause=u.pause.bind(u),C.resume=u.resume.bind(u),C.stop=C,C}function At(e,t=1/0,n){if(t<=0||!ve(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Oe(e))At(e.value,t,n);else if(Z(e))for(let l=0;l{At(l,t,n)});else if(ls(e)){for(const l in e)At(e[l],t,n);for(const l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&At(e[l],t,n)}return e}/** +* @vue/runtime-core v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function fl(e,t,n,l){try{return l?e(...l):e()}catch(i){hl(i,t,n)}}function dt(e,t,n,l){if(ie(e)){const i=fl(e,t,n,l);return i&&ts(i)&&i.catch(o=>{hl(o,t,n)}),i}if(Z(e)){const i=[];for(let o=0;o>>1,i=Ke[l],o=Zn(i);o=Zn(n)?Ke.push(e):Ke.splice(qc(t),0,e),e.flags|=1,Ps()}}function Ps(){jl||(jl=As.then(Os))}function Gc(e){Z(e)?wn.push(...e):Ft&&e.id===-1?Ft.splice(vn+1,0,e):e.flags&1||(wn.push(e),e.flags|=1),Ps()}function Wo(e,t,n=_t+1){for(;nZn(n)-Zn(l));if(wn.length=0,Ft){Ft.push(...t);return}for(Ft=t,vn=0;vne.id==null?e.flags&2?-1:1/0:e.id;function Os(e){try{for(_t=0;_t{l._d&&lr(-1);const o=zl(t);let r;try{r=e(...i)}finally{zl(o),l._d&&lr(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function Ul(e,t){if(Me===null)return e;const n=ci(Me),l=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport,Vt=Symbol("_leaveCb"),xl=Symbol("_enterCb");function Qc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ze(()=>{e.isMounted=!0}),oi(()=>{e.isUnmounting=!0}),e}const it=[Function,Array],Ds={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:it,onEnter:it,onAfterEnter:it,onEnterCancelled:it,onBeforeLeave:it,onLeave:it,onAfterLeave:it,onLeaveCancelled:it,onBeforeAppear:it,onAppear:it,onAfterAppear:it,onAppearCancelled:it},Ms=e=>{const t=e.subTree;return t.component?Ms(t.component):t},Yc={name:"BaseTransition",props:Ds,setup(e,{slots:t}){const n=ai(),l=Qc();return()=>{const i=t.default&&Fs(t.default(),!0);if(!i||!i.length)return;const o=Ns(i),r=de(e),{mode:s}=r;if(l.isLeaving)return ki(o);const a=Ko(o);if(!a)return ki(o);let c=Vi(a,r,l,n,h=>c=h);a.type!==je&&Xn(a,c);const u=n.subTree,d=u&&Ko(u);if(d&&d.type!==je&&!ln(a,d)&&Ms(n).type!==je){const h=Vi(d,r,l,n);if(Xn(d,h),s==="out-in"&&a.type!==je)return l.isLeaving=!0,h.afterLeave=()=>{l.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave},ki(o);s==="in-out"&&a.type!==je&&(h.delayLeave=(m,b,y)=>{const T=Hs(l,d);T[String(d.key)]=d,m[Vt]=()=>{b(),m[Vt]=void 0,delete c.delayedLeave},c.delayedLeave=y})}return o}}};function Ns(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==je){t=n;break}}return t}const Zc=Yc;function Hs(e,t){const{leavingVNodes:n}=e;let l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function Vi(e,t,n,l,i){const{appear:o,mode:r,persisted:s=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:m,onAfterLeave:b,onLeaveCancelled:y,onBeforeAppear:T,onAppear:C,onAfterAppear:w,onAppearCancelled:g}=t,v=String(e.key),M=Hs(n,e),G=(z,S)=>{z&&dt(z,l,9,S)},D=(z,S)=>{const V=S[1];G(z,S),Z(z)?z.every(k=>k.length<=1)&&V():z.length<=1&&V()},E={mode:r,persisted:s,beforeEnter(z){let S=a;if(!n.isMounted)if(o)S=T||a;else return;z[Vt]&&z[Vt](!0);const V=M[v];V&&ln(e,V)&&V.el[Vt]&&V.el[Vt](),G(S,[z])},enter(z){let S=c,V=u,k=d;if(!n.isMounted)if(o)S=C||c,V=w||u,k=g||d;else return;let N=!1;const X=z[xl]=re=>{N||(N=!0,re?G(k,[z]):G(V,[z]),E.delayedLeave&&E.delayedLeave(),z[xl]=void 0)};S?D(S,[z,X]):X()},leave(z,S){const V=String(e.key);if(z[xl]&&z[xl](!0),n.isUnmounting)return S();G(h,[z]);let k=!1;const N=z[Vt]=X=>{k||(k=!0,S(),X?G(y,[z]):G(b,[z]),z[Vt]=void 0,M[V]===e&&delete M[V])};M[V]=e,m?D(m,[z,N]):N()},clone(z){const S=Vi(z,t,n,l,i);return i&&i(S),S}};return E}function ki(e){if(pl(e))return e=Ut(e),e.children=null,e}function Ko(e){if(!pl(e))return Is(e.type)&&e.children?Ns(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function Xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Xn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Fs(e,t=!1,n){let l=[],i=0;for(let o=0;o1)for(let o=0;oWl(b,t&&(Z(t)?t[y]:t),n,l,i));return}if(un(l)&&!i)return;const o=l.shapeFlag&4?ci(l.component):l.el,r=i?null:o,{i:s,r:a}=e,c=t&&t.r,u=s.refs===_e?s.refs={}:s.refs,d=s.setupState,h=de(d),m=d===_e?()=>!1:b=>he(h,b);if(c!=null&&c!==a&&(Te(c)?(u[c]=null,m(c)&&(d[c]=null)):Oe(c)&&(c.value=null)),ie(a))fl(a,s,12,[r,u]);else{const b=Te(a),y=Oe(a);if(b||y){const T=()=>{if(e.f){const C=b?m(a)?d[a]:u[a]:a.value;i?Z(C)&&eo(C,o):Z(C)?C.includes(o)||C.push(o):b?(u[a]=[o],m(a)&&(d[a]=u[a])):(a.value=[o],e.k&&(u[e.k]=a.value))}else b?(u[a]=r,m(a)&&(d[a]=r)):y&&(a.value=r,e.k&&(u[e.k]=r))};r?(T.id=-1,et(T,n)):T()}}}let qo=!1;const gn=()=>{qo||(console.error("Hydration completed but contains mismatches."),qo=!0)},Xc=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",eu=e=>e.namespaceURI.includes("MathML"),Sl=e=>{if(e.nodeType===1){if(Xc(e))return"svg";if(eu(e))return"mathml"}},bn=e=>e.nodeType===8;function tu(e){const{mt:t,p:n,o:{patchProp:l,createText:i,nextSibling:o,parentNode:r,remove:s,insert:a,createComment:c}}=e,u=(g,v)=>{if(!v.hasChildNodes()){n(null,g,v),Bl(),v._vnode=g;return}d(v.firstChild,g,null,null,null),Bl(),v._vnode=g},d=(g,v,M,G,D,E=!1)=>{E=E||!!v.dynamicChildren;const z=bn(g)&&g.data==="[",S=()=>y(g,v,M,G,D,z),{type:V,ref:k,shapeFlag:N,patchFlag:X}=v;let re=g.nodeType;v.el=g,X===-2&&(E=!1,v.dynamicChildren=null);let R=null;switch(V){case fn:re!==3?v.children===""?(a(v.el=i(""),r(g),g),R=g):R=S():(g.data!==v.children&&(gn(),g.data=v.children),R=o(g));break;case je:w(g)?(R=o(g),C(v.el=g.content.firstChild,g,M)):re!==8||z?R=S():R=o(g);break;case Kn:if(z&&(g=o(g),re=g.nodeType),re===1||re===3){R=g;const Q=!v.children.length;for(let W=0;W{E=E||!!v.dynamicChildren;const{type:z,props:S,patchFlag:V,shapeFlag:k,dirs:N,transition:X}=v,re=z==="input"||z==="option";if(re||V!==-1){N&&bt(v,null,M,"created");let R=!1;if(w(g)){R=Zs(G,X)&&M&&M.vnode.props&&M.vnode.props.appear;const W=g.content.firstChild;R&&X.beforeEnter(W),C(W,g,M),v.el=g=W}if(k&16&&!(S&&(S.innerHTML||S.textContent))){let W=m(g.firstChild,v,g,M,G,D,E);for(;W;){Ll(g,1)||gn();const ye=W;W=W.nextSibling,s(ye)}}else if(k&8){let W=v.children;W[0]===` +`&&(g.tagName==="PRE"||g.tagName==="TEXTAREA")&&(W=W.slice(1)),g.textContent!==W&&(Ll(g,0)||gn(),g.textContent=v.children)}if(S){if(re||!E||V&48){const W=g.tagName.includes("-");for(const ye in S)(re&&(ye.endsWith("value")||ye==="indeterminate")||sl(ye)&&!En(ye)||ye[0]==="."||W)&&l(g,ye,null,S[ye],void 0,M)}else if(S.onClick)l(g,"onClick",null,S.onClick,void 0,M);else if(V&4&&an(S.style))for(const W in S.style)S.style[W]}let Q;(Q=S&&S.onVnodeBeforeMount)&&ot(Q,M,v),N&&bt(v,null,M,"beforeMount"),((Q=S&&S.onVnodeMounted)||N||R)&&ia(()=>{Q&&ot(Q,M,v),R&&X.enter(g),N&&bt(v,null,M,"mounted")},G)}return g.nextSibling},m=(g,v,M,G,D,E,z)=>{z=z||!!v.dynamicChildren;const S=v.children,V=S.length;for(let k=0;k{const{slotScopeIds:z}=v;z&&(D=D?D.concat(z):z);const S=r(g),V=m(o(g),v,S,M,G,D,E);return V&&bn(V)&&V.data==="]"?o(v.anchor=V):(gn(),a(v.anchor=c("]"),S,V),V)},y=(g,v,M,G,D,E)=>{if(Ll(g.parentElement,1)||gn(),v.el=null,E){const V=T(g);for(;;){const k=o(g);if(k&&k!==V)s(k);else break}}const z=o(g),S=r(g);return s(g),n(null,v,S,z,M,G,Sl(S),D),z},T=(g,v="[",M="]")=>{let G=0;for(;g;)if(g=o(g),g&&bn(g)&&(g.data===v&&G++,g.data===M)){if(G===0)return o(g);G--}return g},C=(g,v,M)=>{const G=v.parentNode;G&&G.replaceChild(g,v);let D=M;for(;D;)D.vnode.el===v&&(D.vnode.el=D.subTree.el=g),D=D.parent},w=g=>g.nodeType===1&&g.tagName==="TEMPLATE";return[u,d]}const Go="data-allow-mismatch",nu={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ll(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Go);)e=e.parentElement;const n=e&&e.getAttribute(Go);if(n==null)return!1;if(n==="")return!0;{const l=n.split(",");return t===0&&l.includes("children")?!0:n.split(",").includes(nu[t])}}function lu(e,t){if(bn(e)&&e.data==="["){let n=1,l=e.nextSibling;for(;l;){if(l.nodeType===1){if(t(l)===!1)break}else if(bn(l))if(l.data==="]"){if(--n===0)break}else l.data==="["&&n++;l=l.nextSibling}}else t(e)}const un=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Dl(e){ie(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:l,delay:i=200,hydrate:o,timeout:r,suspensible:s=!0,onError:a}=e;let c=null,u,d=0;const h=()=>(d++,c=null,m()),m=()=>{let b;return c||(b=c=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),a)return new Promise((T,C)=>{a(y,()=>T(h()),()=>C(y),d+1)});throw y}).then(y=>b!==c&&c?c:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),u=y,y)))};return fe({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(b,y,T){const C=o?()=>{const w=o(T,g=>lu(b,g));w&&(y.bum||(y.bum=[])).push(w)}:T;u?C():m().then(()=>!y.isUnmounted&&C())},get __asyncResolved(){return u},setup(){const b=De;if(ho(b),u)return()=>Ei(u,b);const y=g=>{c=null,hl(g,b,13,!l)};if(s&&b.suspense||ml)return m().then(g=>()=>Ei(g,b)).catch(g=>(y(g),()=>l?oe(l,{error:g}):null));const T=ae(!1),C=ae(),w=ae(!!i);return i&&setTimeout(()=>{w.value=!1},i),r!=null&&setTimeout(()=>{if(!T.value&&!C.value){const g=new Error(`Async component timed out after ${r}ms.`);y(g),C.value=g}},r),m().then(()=>{T.value=!0,b.parent&&pl(b.parent.vnode)&&b.parent.update()}).catch(g=>{y(g),C.value=g}),()=>{if(T.value&&u)return Ei(u,b);if(C.value&&l)return oe(l,{error:C.value});if(n&&!w.value)return oe(n)}}})}function Ei(e,t){const{ref:n,props:l,children:i,ce:o}=t.vnode,r=oe(e,l,i);return r.ref=n,r.ce=o,delete t.vnode.ce,r}const pl=e=>e.type.__isKeepAlive;function iu(e,t){Vs(e,"a",t)}function ou(e,t){Vs(e,"da",t)}function Vs(e,t,n=De){const l=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(ii(t,l,n),n){let i=n.parent;for(;i&&i.parent;)pl(i.parent.vnode)&&ru(l,t,n,i),i=i.parent}}function ru(e,t,n,l){const i=ii(t,e,l,!0);ri(()=>{eo(l[t],i)},n)}function ii(e,t,n=De,l=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Gt();const s=gl(n),a=dt(t,n,e,r);return s(),Jt(),a});return l?i.unshift(o):i.push(o),o}}const Ot=e=>(t,n=De)=>{(!ml||e==="sp")&&ii(e,(...l)=>t(...l),n)},su=Ot("bm"),ze=Ot("m"),au=Ot("bu"),cu=Ot("u"),oi=Ot("bum"),ri=Ot("um"),uu=Ot("sp"),du=Ot("rtg"),fu=Ot("rtc");function hu(e,t=De){ii("ec",e,t)}const pu="components";function po(e,t){return mu(pu,e,!0,t)||e}const gu=Symbol.for("v-ndc");function mu(e,t,n=!0,l=!1){const i=Me||De;if(i){const o=i.type;{const s=nd(o,!1);if(s&&(s===t||s===Qe(t)||s===cl(Qe(t))))return o}const r=Jo(i[e]||o[e],t)||Jo(i.appContext[e],t);return!r&&l?o:r}}function Jo(e,t){return e&&(e[t]||e[Qe(t)]||e[cl(Qe(t))])}function zt(e,t,n,l){let i;const o=n,r=Z(e);if(r||Te(e)){const s=r&&an(e);let a=!1;s&&(a=!st(e),e=ti(e)),i=new Array(e.length);for(let c=0,u=e.length;ct(s,a,void 0,o));else{const s=Object.keys(e);i=new Array(s.length);for(let a=0,c=s.length;atl(t)?!(t.type===je||t.type===be&&!$s(t.children)):!0)?e:null}const $i=e=>e?sa(e)?ci(e):$i(e.parent):null,Wn=Re(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$i(e.parent),$root:e=>$i(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>go(e),$forceUpdate:e=>e.f||(e.f=()=>{fo(e.update)}),$nextTick:e=>e.n||(e.n=On.bind(e.proxy)),$watch:e=>Hu.bind(e)}),wi=(e,t)=>e!==_e&&!e.__isScriptSetup&&he(e,t),vu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:l,data:i,props:o,accessCache:r,type:s,appContext:a}=e;let c;if(t[0]!=="$"){const m=r[t];if(m!==void 0)switch(m){case 1:return l[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(wi(l,t))return r[t]=1,l[t];if(i!==_e&&he(i,t))return r[t]=2,i[t];if((c=e.propsOptions[0])&&he(c,t))return r[t]=3,o[t];if(n!==_e&&he(n,t))return r[t]=4,n[t];ji&&(r[t]=0)}}const u=Wn[t];let d,h;if(u)return t==="$attrs"&&Be(e.attrs,"get",""),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==_e&&he(n,t))return r[t]=4,n[t];if(h=a.config.globalProperties,he(h,t))return h[t]},set({_:e},t,n){const{data:l,setupState:i,ctx:o}=e;return wi(i,t)?(i[t]=n,!0):l!==_e&&he(l,t)?(l[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:i,propsOptions:o}},r){let s;return!!n[r]||e!==_e&&he(e,r)||wi(t,r)||(s=o[0])&&he(s,r)||he(l,r)||he(Wn,r)||he(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Qo(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ji=!0;function _u(e){const t=go(e),n=e.proxy,l=e.ctx;ji=!1,t.beforeCreate&&Yo(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:s,provide:a,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:m,updated:b,activated:y,deactivated:T,beforeDestroy:C,beforeUnmount:w,destroyed:g,unmounted:v,render:M,renderTracked:G,renderTriggered:D,errorCaptured:E,serverPrefetch:z,expose:S,inheritAttrs:V,components:k,directives:N,filters:X}=t;if(c&&bu(c,l,null),r)for(const Q in r){const W=r[Q];ie(W)&&(l[Q]=W.bind(n))}if(i){const Q=i.call(n,n);ve(Q)&&(e.data=dl(Q))}if(ji=!0,o)for(const Q in o){const W=o[Q],ye=ie(W)?W.bind(n,n):ie(W.get)?W.get.bind(n,n):yt,Ne=!ie(W)&&ie(W.set)?W.set.bind(n):yt,Ge=I({get:ye,set:Ne});Object.defineProperty(l,Q,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:Fe=>Ge.value=Fe})}if(s)for(const Q in s)js(s[Q],l,n,Q);if(a){const Q=ie(a)?a.call(n):a;Reflect.ownKeys(Q).forEach(W=>{dn(W,Q[W])})}u&&Yo(u,e,"c");function R(Q,W){Z(W)?W.forEach(ye=>Q(ye.bind(n))):W&&Q(W.bind(n))}if(R(su,d),R(ze,h),R(au,m),R(cu,b),R(iu,y),R(ou,T),R(hu,E),R(fu,G),R(du,D),R(oi,w),R(ri,v),R(uu,z),Z(S))if(S.length){const Q=e.exposed||(e.exposed={});S.forEach(W=>{Object.defineProperty(Q,W,{get:()=>n[W],set:ye=>n[W]=ye})})}else e.exposed||(e.exposed={});M&&e.render===yt&&(e.render=M),V!=null&&(e.inheritAttrs=V),k&&(e.components=k),N&&(e.directives=N),z&&ho(e)}function bu(e,t,n=yt){Z(e)&&(e=Bi(e));for(const l in e){const i=e[l];let o;ve(i)?"default"in i?o=qe(i.from||l,i.default,!0):o=qe(i.from||l):o=qe(i),Oe(o)?Object.defineProperty(t,l,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[l]=o}}function Yo(e,t,n){dt(Z(e)?e.map(l=>l.bind(t.proxy)):e.bind(t.proxy),t,n)}function js(e,t,n,l){let i=l.includes(".")?ta(n,l):()=>n[l];if(Te(e)){const o=t[e];ie(o)&&He(i,o)}else if(ie(e))He(i,e.bind(n));else if(ve(e))if(Z(e))e.forEach(o=>js(o,t,n,l));else{const o=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(o)&&He(i,o,e)}}function go(e){const t=e.type,{mixins:n,extends:l}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,s=o.get(t);let a;return s?a=s:!i.length&&!n&&!l?a=t:(a={},i.length&&i.forEach(c=>Kl(a,c,r,!0)),Kl(a,t,r)),ve(t)&&o.set(t,a),a}function Kl(e,t,n,l=!1){const{mixins:i,extends:o}=t;o&&Kl(e,o,n,!0),i&&i.forEach(r=>Kl(e,r,n,!0));for(const r in t)if(!(l&&r==="expose")){const s=yu[r]||n&&n[r];e[r]=s?s(e[r],t[r]):t[r]}return e}const yu={data:Zo,props:Xo,emits:Xo,methods:jn,computed:jn,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:jn,directives:jn,watch:Eu,provide:Zo,inject:ku};function Zo(e,t){return t?e?function(){return Re(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function ku(e,t){return jn(Bi(e),Bi(t))}function Bi(e){if(Z(e)){const t={};for(let n=0;n1)return n&&ie(t)?t.call(l&&l.proxy):t}}const zs={},Us=()=>Object.create(zs),Ws=e=>Object.getPrototypeOf(e)===zs;function Su(e,t,n,l=!1){const i={},o=Us();e.propsDefaults=Object.create(null),Ks(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=l?i:Ss(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Lu(e,t,n,l){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,s=de(i),[a]=e.propsOptions;let c=!1;if((l||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[h,m]=qs(d,t,!0);Re(r,h),m&&s.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return ve(e)&&l.set(e,yn),yn;if(Z(o))for(let u=0;ue[0]==="_"||e==="$stable",mo=e=>Z(e)?e.map(rt):[rt(e)],Tu=(e,t,n)=>{if(t._n)return t;const l=Ae((...i)=>mo(t(...i)),n);return l._c=!1,l},Js=(e,t,n)=>{const l=e._ctx;for(const i in e){if(Gs(i))continue;const o=e[i];if(ie(o))t[i]=Tu(i,o,l);else if(o!=null){const r=mo(o);t[i]=()=>r}}},Qs=(e,t)=>{const n=mo(t);e.slots.default=()=>n},Ys=(e,t,n)=>{for(const l in t)(n||l!=="_")&&(e[l]=t[l])},Au=(e,t,n)=>{const l=e.slots=Us();if(e.vnode.shapeFlag&32){const i=t._;i?(Ys(l,t,n),n&&is(l,"_",i,!0)):Js(t,l)}else t&&Qs(e,t)},Pu=(e,t,n)=>{const{vnode:l,slots:i}=e;let o=!0,r=_e;if(l.shapeFlag&32){const s=t._;s?n&&s===1?o=!1:Ys(i,t,n):(o=!t.$stable,Js(t,i)),r=t}else t&&(Qs(e,t),r={default:1});if(o)for(const s in i)!Gs(s)&&r[s]==null&&delete i[s]},et=ia;function Ou(e){return Ru(e,tu)}function Ru(e,t){const n=os();n.__VUE__=!0;const{insert:l,remove:i,patchProp:o,createElement:r,createText:s,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:m=yt,insertStaticContent:b}=e,y=(f,p,_,A=null,x=null,P=null,B=void 0,F=null,H=!!p.dynamicChildren)=>{if(f===p)return;f&&!ln(f,p)&&(A=L(f),Fe(f,x,P,!0),f=null),p.patchFlag===-2&&(H=!1,p.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:K}=p;switch(O){case fn:T(f,p,_,A);break;case je:C(f,p,_,A);break;case Kn:f==null&&w(p,_,A,B);break;case be:k(f,p,_,A,x,P,B,F,H);break;default:K&1?M(f,p,_,A,x,P,B,F,H):K&6?N(f,p,_,A,x,P,B,F,H):(K&64||K&128)&&O.process(f,p,_,A,x,P,B,F,H,J)}ee!=null&&x&&Wl(ee,f&&f.ref,P,p||f,!p)},T=(f,p,_,A)=>{if(f==null)l(p.el=s(p.children),_,A);else{const x=p.el=f.el;p.children!==f.children&&c(x,p.children)}},C=(f,p,_,A)=>{f==null?l(p.el=a(p.children||""),_,A):p.el=f.el},w=(f,p,_,A)=>{[f.el,f.anchor]=b(f.children,p,_,A,f.el,f.anchor)},g=({el:f,anchor:p},_,A)=>{let x;for(;f&&f!==p;)x=h(f),l(f,_,A),f=x;l(p,_,A)},v=({el:f,anchor:p})=>{let _;for(;f&&f!==p;)_=h(f),i(f),f=_;i(p)},M=(f,p,_,A,x,P,B,F,H)=>{p.type==="svg"?B="svg":p.type==="math"&&(B="mathml"),f==null?G(p,_,A,x,P,B,F,H):z(f,p,x,P,B,F,H)},G=(f,p,_,A,x,P,B,F)=>{let H,O;const{props:ee,shapeFlag:K,transition:Y,dirs:ne}=f;if(H=f.el=r(f.type,P,ee&&ee.is,ee),K&8?u(H,f.children):K&16&&E(f.children,H,null,A,x,xi(f,P),B,F),ne&&bt(f,null,A,"created"),D(H,f,f.scopeId,B,A),ee){for(const ke in ee)ke!=="value"&&!En(ke)&&o(H,ke,null,ee[ke],P,A);"value"in ee&&o(H,"value",null,ee.value,P),(O=ee.onVnodeBeforeMount)&&ot(O,A,f)}ne&&bt(f,null,A,"beforeMount");const ue=Zs(x,Y);ue&&Y.beforeEnter(H),l(H,p,_),((O=ee&&ee.onVnodeMounted)||ue||ne)&&et(()=>{O&&ot(O,A,f),ue&&Y.enter(H),ne&&bt(f,null,A,"mounted")},x)},D=(f,p,_,A,x)=>{if(_&&m(f,_),A)for(let P=0;P{for(let O=H;O{const F=p.el=f.el;let{patchFlag:H,dynamicChildren:O,dirs:ee}=p;H|=f.patchFlag&16;const K=f.props||_e,Y=p.props||_e;let ne;if(_&&Yt(_,!1),(ne=Y.onVnodeBeforeUpdate)&&ot(ne,_,p,f),ee&&bt(p,f,_,"beforeUpdate"),_&&Yt(_,!0),(K.innerHTML&&Y.innerHTML==null||K.textContent&&Y.textContent==null)&&u(F,""),O?S(f.dynamicChildren,O,F,_,A,xi(p,x),P):B||W(f,p,F,null,_,A,xi(p,x),P,!1),H>0){if(H&16)V(F,K,Y,_,x);else if(H&2&&K.class!==Y.class&&o(F,"class",null,Y.class,x),H&4&&o(F,"style",K.style,Y.style,x),H&8){const ue=p.dynamicProps;for(let ke=0;ke{ne&&ot(ne,_,p,f),ee&&bt(p,f,_,"updated")},A)},S=(f,p,_,A,x,P,B)=>{for(let F=0;F{if(p!==_){if(p!==_e)for(const P in p)!En(P)&&!(P in _)&&o(f,P,p[P],null,x,A);for(const P in _){if(En(P))continue;const B=_[P],F=p[P];B!==F&&P!=="value"&&o(f,P,F,B,x,A)}"value"in _&&o(f,"value",p.value,_.value,x)}},k=(f,p,_,A,x,P,B,F,H)=>{const O=p.el=f?f.el:s(""),ee=p.anchor=f?f.anchor:s("");let{patchFlag:K,dynamicChildren:Y,slotScopeIds:ne}=p;ne&&(F=F?F.concat(ne):ne),f==null?(l(O,_,A),l(ee,_,A),E(p.children||[],_,ee,x,P,B,F,H)):K>0&&K&64&&Y&&f.dynamicChildren?(S(f.dynamicChildren,Y,_,x,P,B,F),(p.key!=null||x&&p===x.subTree)&&Xs(f,p,!0)):W(f,p,_,ee,x,P,B,F,H)},N=(f,p,_,A,x,P,B,F,H)=>{p.slotScopeIds=F,f==null?p.shapeFlag&512?x.ctx.activate(p,_,A,B,H):X(p,_,A,x,P,B,H):re(f,p,H)},X=(f,p,_,A,x,P,B)=>{const F=f.component=Yu(f,A,x);if(pl(f)&&(F.ctx.renderer=J),Zu(F,!1,B),F.asyncDep){if(x&&x.registerDep(F,R,B),!f.el){const H=F.subTree=oe(je);C(null,H,p,_)}}else R(F,f,p,_,x,P,B)},re=(f,p,_)=>{const A=p.component=f.component;if(Bu(f,p,_))if(A.asyncDep&&!A.asyncResolved){Q(A,p,_);return}else A.next=p,A.update();else p.el=f.el,A.vnode=p},R=(f,p,_,A,x,P,B)=>{const F=()=>{if(f.isMounted){let{next:K,bu:Y,u:ne,parent:ue,vnode:ke}=f;{const Ze=ea(f);if(Ze){K&&(K.el=ke.el,Q(f,K,B)),Ze.asyncDep.then(()=>{f.isUnmounted||F()});return}}let pe=K,Ye;Yt(f,!1),K?(K.el=ke.el,Q(f,K,B)):K=ke,Y&&Il(Y),(Ye=K.props&&K.props.onVnodeBeforeUpdate)&&ot(Ye,ue,K,ke),Yt(f,!0);const Ve=Si(f),ct=f.subTree;f.subTree=Ve,y(ct,Ve,d(ct.el),L(ct),f,x,P),K.el=Ve.el,pe===null&&zu(f,Ve.el),ne&&et(ne,x),(Ye=K.props&&K.props.onVnodeUpdated)&&et(()=>ot(Ye,ue,K,ke),x)}else{let K;const{el:Y,props:ne}=p,{bm:ue,m:ke,parent:pe,root:Ye,type:Ve}=f,ct=un(p);if(Yt(f,!1),ue&&Il(ue),!ct&&(K=ne&&ne.onVnodeBeforeMount)&&ot(K,pe,p),Yt(f,!0),Y&&me){const Ze=()=>{f.subTree=Si(f),me(Y,f.subTree,f,x,null)};ct&&Ve.__asyncHydrate?Ve.__asyncHydrate(Y,f,Ze):Ze()}else{Ye.ce&&Ye.ce._injectChildStyle(Ve);const Ze=f.subTree=Si(f);y(null,Ze,_,A,f,x,P),p.el=Ze.el}if(ke&&et(ke,x),!ct&&(K=ne&&ne.onVnodeMounted)){const Ze=p;et(()=>ot(K,pe,Ze),x)}(p.shapeFlag&256||pe&&un(pe.vnode)&&pe.vnode.shapeFlag&256)&&f.a&&et(f.a,x),f.isMounted=!0,p=_=A=null}};f.scope.on();const H=f.effect=new ds(F);f.scope.off();const O=f.update=H.run.bind(H),ee=f.job=H.runIfDirty.bind(H);ee.i=f,ee.id=f.uid,H.scheduler=()=>fo(ee),Yt(f,!0),O()},Q=(f,p,_)=>{p.component=f;const A=f.vnode.props;f.vnode=p,f.next=null,Lu(f,p.props,A,_),Pu(f,p.children,_),Gt(),Wo(f),Jt()},W=(f,p,_,A,x,P,B,F,H=!1)=>{const O=f&&f.children,ee=f?f.shapeFlag:0,K=p.children,{patchFlag:Y,shapeFlag:ne}=p;if(Y>0){if(Y&128){Ne(O,K,_,A,x,P,B,F,H);return}else if(Y&256){ye(O,K,_,A,x,P,B,F,H);return}}ne&8?(ee&16&&Je(O,x,P),K!==O&&u(_,K)):ee&16?ne&16?Ne(O,K,_,A,x,P,B,F,H):Je(O,x,P,!0):(ee&8&&u(_,""),ne&16&&E(K,_,A,x,P,B,F,H))},ye=(f,p,_,A,x,P,B,F,H)=>{f=f||yn,p=p||yn;const O=f.length,ee=p.length,K=Math.min(O,ee);let Y;for(Y=0;Yee?Je(f,x,P,!0,!1,K):E(p,_,A,x,P,B,F,H,K)},Ne=(f,p,_,A,x,P,B,F,H)=>{let O=0;const ee=p.length;let K=f.length-1,Y=ee-1;for(;O<=K&&O<=Y;){const ne=f[O],ue=p[O]=H?$t(p[O]):rt(p[O]);if(ln(ne,ue))y(ne,ue,_,null,x,P,B,F,H);else break;O++}for(;O<=K&&O<=Y;){const ne=f[K],ue=p[Y]=H?$t(p[Y]):rt(p[Y]);if(ln(ne,ue))y(ne,ue,_,null,x,P,B,F,H);else break;K--,Y--}if(O>K){if(O<=Y){const ne=Y+1,ue=neY)for(;O<=K;)Fe(f[O],x,P,!0),O++;else{const ne=O,ue=O,ke=new Map;for(O=ue;O<=Y;O++){const Xe=p[O]=H?$t(p[O]):rt(p[O]);Xe.key!=null&&ke.set(Xe.key,O)}let pe,Ye=0;const Ve=Y-ue+1;let ct=!1,Ze=0;const Mn=new Array(Ve);for(O=0;O=Ve){Fe(Xe,x,P,!0);continue}let vt;if(Xe.key!=null)vt=ke.get(Xe.key);else for(pe=ue;pe<=Y;pe++)if(Mn[pe-ue]===0&&ln(Xe,p[pe])){vt=pe;break}vt===void 0?Fe(Xe,x,P,!0):(Mn[vt-ue]=O+1,vt>=Ze?Ze=vt:ct=!0,y(Xe,p[vt],_,null,x,P,B,F,H),Ye++)}const Mo=ct?Iu(Mn):yn;for(pe=Mo.length-1,O=Ve-1;O>=0;O--){const Xe=ue+O,vt=p[Xe],No=Xe+1{const{el:P,type:B,transition:F,children:H,shapeFlag:O}=f;if(O&6){Ge(f.component.subTree,p,_,A);return}if(O&128){f.suspense.move(p,_,A);return}if(O&64){B.move(f,p,_,J);return}if(B===be){l(P,p,_);for(let K=0;KF.enter(P),x);else{const{leave:K,delayLeave:Y,afterLeave:ne}=F,ue=()=>l(P,p,_),ke=()=>{K(P,()=>{ue(),ne&&ne()})};Y?Y(P,ue,ke):ke()}else l(P,p,_)},Fe=(f,p,_,A=!1,x=!1)=>{const{type:P,props:B,ref:F,children:H,dynamicChildren:O,shapeFlag:ee,patchFlag:K,dirs:Y,cacheIndex:ne}=f;if(K===-2&&(x=!1),F!=null&&Wl(F,null,_,f,!0),ne!=null&&(p.renderCache[ne]=void 0),ee&256){p.ctx.deactivate(f);return}const ue=ee&1&&Y,ke=!un(f);let pe;if(ke&&(pe=B&&B.onVnodeBeforeUnmount)&&ot(pe,p,f),ee&6)mt(f.component,_,A);else{if(ee&128){f.suspense.unmount(_,A);return}ue&&bt(f,null,p,"beforeUnmount"),ee&64?f.type.remove(f,p,_,J,A):O&&!O.hasOnce&&(P!==be||K>0&&K&64)?Je(O,p,_,!1,!0):(P===be&&K&384||!x&&ee&16)&&Je(H,p,_),A&&It(f)}(ke&&(pe=B&&B.onVnodeUnmounted)||ue)&&et(()=>{pe&&ot(pe,p,f),ue&&bt(f,null,p,"unmounted")},_)},It=f=>{const{type:p,el:_,anchor:A,transition:x}=f;if(p===be){Dt(_,A);return}if(p===Kn){v(f);return}const P=()=>{i(_),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(f.shapeFlag&1&&x&&!x.persisted){const{leave:B,delayLeave:F}=x,H=()=>B(_,P);F?F(f.el,P,H):H()}else P()},Dt=(f,p)=>{let _;for(;f!==p;)_=h(f),i(f),f=_;i(p)},mt=(f,p,_)=>{const{bum:A,scope:x,job:P,subTree:B,um:F,m:H,a:O}=f;tr(H),tr(O),A&&Il(A),x.stop(),P&&(P.flags|=8,Fe(B,f,p,_)),F&&et(F,p),et(()=>{f.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},Je=(f,p,_,A=!1,x=!1,P=0)=>{for(let B=P;B{if(f.shapeFlag&6)return L(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=h(f.anchor||f.el),_=p&&p[Jc];return _?h(_):p};let U=!1;const j=(f,p,_)=>{f==null?p._vnode&&Fe(p._vnode,null,null,!0):y(p._vnode||null,f,p,null,null,null,_),p._vnode=f,U||(U=!0,Wo(),Bl(),U=!1)},J={p:y,um:Fe,m:Ge,r:It,mt:X,mc:E,pc:W,pbc:S,n:L,o:e};let ce,me;return t&&([ce,me]=t(J)),{render:j,hydrate:ce,createApp:xu(j,ce)}}function xi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Yt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zs(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xs(e,t,n=!1){const l=e.children,i=t.children;if(Z(l)&&Z(i))for(let o=0;o>1,e[n[s]]0&&(t[l]=n[o-1]),n[o]=l)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function ea(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ea(t)}function tr(e){if(e)for(let t=0;tqe(Du);function Nu(e,t){return vo(e,null,t)}function He(e,t,n){return vo(e,t,n)}function vo(e,t,n=_e){const{immediate:l,deep:i,flush:o,once:r}=n,s=Re({},n);let a;if(ml)if(o==="sync"){const h=Mu();a=h.__watcherHandles||(h.__watcherHandles=[])}else if(!t||l)s.once=!0;else{const h=()=>{};return h.stop=yt,h.resume=yt,h.pause=yt,h}const c=De;s.call=(h,m,b)=>dt(h,c,m,b);let u=!1;o==="post"?s.scheduler=h=>{et(h,c&&c.suspense)}:o!=="sync"&&(u=!0,s.scheduler=(h,m)=>{m?h():fo(h)}),s.augmentJob=h=>{t&&(h.flags|=4),u&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=Wc(e,t,s);return a&&a.push(d),d}function Hu(e,t,n){const l=this.proxy,i=Te(e)?e.includes(".")?ta(l,e):()=>l[e]:e.bind(l,l);let o;ie(t)?o=t:(o=t.handler,n=t);const r=gl(this),s=vo(i,o.bind(l),n);return r(),s}function ta(e,t){const n=t.split(".");return()=>{let l=e;for(let i=0;it==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Qe(t)}Modifiers`]||e[`${qt(t)}Modifiers`];function Vu(e,t,...n){if(e.isUnmounted)return;const l=e.vnode.props||_e;let i=n;const o=t.startsWith("update:"),r=o&&Fu(l,t.slice(7));r&&(r.trim&&(i=n.map(u=>Te(u)?u.trim():u)),r.number&&(i=n.map(Ni)));let s,a=l[s=mi(t)]||l[s=mi(Qe(t))];!a&&o&&(a=l[s=mi(qt(t))]),a&&dt(a,e,6,i);const c=l[s+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,dt(c,e,6,i)}}function na(e,t,n=!1){const l=t.emitsCache,i=l.get(e);if(i!==void 0)return i;const o=e.emits;let r={},s=!1;if(!ie(e)){const a=c=>{const u=na(c,t,!0);u&&(s=!0,Re(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!s?(ve(e)&&l.set(e,null),null):(Z(o)?o.forEach(a=>r[a]=null):Re(r,o),ve(e)&&l.set(e,r),r)}function si(e,t){return!e||!sl(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,qt(t))||he(e,t))}function Si(e){const{type:t,vnode:n,proxy:l,withProxy:i,propsOptions:[o],slots:r,attrs:s,emit:a,render:c,renderCache:u,props:d,data:h,setupState:m,ctx:b,inheritAttrs:y}=e,T=zl(e);let C,w;try{if(n.shapeFlag&4){const v=i||l,M=v;C=rt(c.call(M,v,u,d,m,h,b)),w=s}else{const v=t;C=rt(v.length>1?v(d,{attrs:s,slots:r,emit:a}):v(d,null)),w=t.props?s:$u(s)}}catch(v){qn.length=0,hl(v,e,1),C=oe(je)}let g=C;if(w&&y!==!1){const v=Object.keys(w),{shapeFlag:M}=g;v.length&&M&7&&(o&&v.some(Xi)&&(w=ju(w,o)),g=Ut(g,w,!1,!0))}return n.dirs&&(g=Ut(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&Xn(g,n.transition),C=g,zl(T),C}const $u=e=>{let t;for(const n in e)(n==="class"||n==="style"||sl(n))&&((t||(t={}))[n]=e[n]);return t},ju=(e,t)=>{const n={};for(const l in e)(!Xi(l)||!(l.slice(9)in t))&&(n[l]=e[l]);return n};function Bu(e,t,n){const{props:l,children:i,component:o}=e,{props:r,children:s,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return l?nr(l,r,c):!!r;if(a&8){const u=t.dynamicProps;for(let d=0;de.__isSuspense;function ia(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):Gc(e)}const be=Symbol.for("v-fgt"),fn=Symbol.for("v-txt"),je=Symbol.for("v-cmt"),Kn=Symbol.for("v-stc"),qn=[];let tt=null;function q(e=!1){qn.push(tt=e?null:[])}function Uu(){qn.pop(),tt=qn[qn.length-1]||null}let el=1;function lr(e){el+=e,e<0&&tt&&(tt.hasOnce=!0)}function oa(e){return e.dynamicChildren=el>0?tt||yn:null,Uu(),el>0&&tt&&tt.push(e),e}function te(e,t,n,l,i,o){return oa(le(e,t,n,l,i,o,!0))}function Ce(e,t,n,l,i){return oa(oe(e,t,n,l,i,!0))}function tl(e){return e?e.__v_isVNode===!0:!1}function ln(e,t){return e.type===t.type&&e.key===t.key}const ra=({key:e})=>e??null,Ml=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Te(e)||Oe(e)||ie(e)?{i:Me,r:e,k:t,f:!!n}:e:null);function le(e,t=null,n=null,l=0,i=null,o=e===be?0:1,r=!1,s=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ra(t),ref:t&&Ml(t),scopeId:Rs,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:l,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Me};return s?(_o(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Te(n)?8:16),el>0&&!r&&tt&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&tt.push(a),a}const oe=Wu;function Wu(e,t=null,n=null,l=0,i=null,o=!1){if((!e||e===gu)&&(e=je),tl(e)){const s=Ut(e,t,!0);return n&&_o(s,n),el>0&&!o&&tt&&(s.shapeFlag&6?tt[tt.indexOf(e)]=s:tt.push(s)),s.patchFlag=-2,s}if(ld(e)&&(e=e.__vccOpts),t){t=Ku(t);let{class:s,style:a}=t;s&&!Te(s)&&(t.class=nt(s)),ve(a)&&(ao(a)&&!Z(a)&&(a=Re({},a)),t.style=ul(a))}const r=Te(e)?1:la(e)?128:Is(e)?64:ve(e)?4:ie(e)?2:0;return le(e,t,n,l,i,r,o,!0)}function Ku(e){return e?ao(e)||Ws(e)?Re({},e):e:null}function Ut(e,t,n=!1,l=!1){const{props:i,ref:o,patchFlag:r,children:s,transition:a}=e,c=t?Gu(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ra(c),ref:t&&t.ref?n&&o?Z(o)?o.concat(Ml(t)):[o,Ml(t)]:Ml(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ut(e.ssContent),ssFallback:e.ssFallback&&Ut(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&Xn(u,a.clone(u)),u}function Wt(e=" ",t=0){return oe(fn,null,e,t)}function qu(e,t){const n=oe(Kn,null,e);return n.staticCount=t,n}function Pe(e="",t=!1){return t?(q(),Ce(je,null,e)):oe(je,null,e)}function rt(e){return e==null||typeof e=="boolean"?oe(je):Z(e)?oe(be,null,e.slice()):tl(e)?$t(e):oe(fn,null,String(e))}function $t(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ut(e)}function _o(e,t){let n=0;const{shapeFlag:l}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(l&65){const i=t.default;i&&(i._c&&(i._d=!1),_o(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Ws(t)?t._ctx=Me:i===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Me},n=32):(t=String(t),l&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Gu(...e){const t={};for(let n=0;nDe||Me;let ql,Ui;{const e=os(),t=(n,l)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(l),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};ql=t("__VUE_INSTANCE_SETTERS__",n=>De=n),Ui=t("__VUE_SSR_SETTERS__",n=>ml=n)}const gl=e=>{const t=De;return ql(e),e.scope.on(),()=>{e.scope.off(),ql(t)}},ir=()=>{De&&De.scope.off(),ql(null)};function sa(e){return e.vnode.shapeFlag&4}let ml=!1;function Zu(e,t=!1,n=!1){t&&Ui(t);const{props:l,children:i}=e.vnode,o=sa(e);Su(e,l,o,t),Au(e,i,n);const r=o?Xu(e,t):void 0;return t&&Ui(!1),r}function Xu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vu);const{setup:l}=n;if(l){const i=e.setupContext=l.length>1?td(e):null,o=gl(e);Gt();const r=fl(l,e,0,[e.props,i]);if(Jt(),o(),ts(r)){if(un(e)||ho(e),r.then(ir,ir),t)return r.then(s=>{or(e,s,t)}).catch(s=>{hl(s,e,0)});e.asyncDep=r}else or(e,r,t)}else aa(e,t)}function or(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ve(t)&&(e.setupState=Cs(t)),aa(e,n)}let rr;function aa(e,t,n){const l=e.type;if(!e.render){if(!t&&rr&&!l.render){const i=l.template||go(e).template;if(i){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:a}=l,c=Re(Re({isCustomElement:o,delimiters:s},r),a);l.render=rr(i,c)}}e.render=l.render||yt}{const i=gl(e);Gt();try{_u(e)}finally{Jt(),i()}}}const ed={get(e,t){return Be(e,"get",""),e[t]}};function td(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ed),slots:e.slots,emit:e.emit,expose:t}}function ci(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cs(Dc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wn)return Wn[n](e)},has(t,n){return n in t||n in Wn}})):e.proxy}function nd(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function ld(e){return ie(e)&&"__vccOpts"in e}const I=(e,t)=>zc(e,t,ml);function se(e,t,n){const l=arguments.length;return l===2?ve(t)&&!Z(t)?tl(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(l>3?n=Array.prototype.slice.call(arguments,2):l===3&&tl(n)&&(n=[n]),oe(e,t,n))}const id="3.5.11";/** +* @vue/runtime-dom v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Wi;const sr=typeof window<"u"&&window.trustedTypes;if(sr)try{Wi=sr.createPolicy("vue",{createHTML:e=>e})}catch{}const ca=Wi?e=>Wi.createHTML(e):e=>e,od="http://www.w3.org/2000/svg",rd="http://www.w3.org/1998/Math/MathML",Tt=typeof document<"u"?document:null,ar=Tt&&Tt.createElement("template"),sd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{const i=t==="svg"?Tt.createElementNS(od,e):t==="mathml"?Tt.createElementNS(rd,e):n?Tt.createElement(e,{is:n}):Tt.createElement(e);return e==="select"&&l&&l.multiple!=null&&i.setAttribute("multiple",l.multiple),i},createText:e=>Tt.createTextNode(e),createComment:e=>Tt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Tt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,i,o){const r=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{ar.innerHTML=ca(l==="svg"?`${e}`:l==="mathml"?`${e}`:e);const s=ar.content;if(l==="svg"||l==="mathml"){const a=s.firstChild;for(;a.firstChild;)s.appendChild(a.firstChild);s.removeChild(a)}t.insertBefore(s,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nt="transition",Hn="animation",nl=Symbol("_vtc"),ua={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ad=Re({},Ds,ua),cd=e=>(e.displayName="Transition",e.props=ad,e),bo=cd((e,{slots:t})=>se(Zc,ud(e),t)),Zt=(e,t=[])=>{Z(e)?e.forEach(n=>n(...t)):e&&e(...t)},cr=e=>e?Z(e)?e.some(t=>t.length>1):e.length>1:!1;function ud(e){const t={};for(const k in e)k in ua||(t[k]=e[k]);if(e.css===!1)return t;const{name:n="v",type:l,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:c=r,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=dd(i),y=b&&b[0],T=b&&b[1],{onBeforeEnter:C,onEnter:w,onEnterCancelled:g,onLeave:v,onLeaveCancelled:M,onBeforeAppear:G=C,onAppear:D=w,onAppearCancelled:E=g}=t,z=(k,N,X)=>{Xt(k,N?u:s),Xt(k,N?c:r),X&&X()},S=(k,N)=>{k._isLeaving=!1,Xt(k,d),Xt(k,m),Xt(k,h),N&&N()},V=k=>(N,X)=>{const re=k?D:w,R=()=>z(N,k,X);Zt(re,[N,R]),ur(()=>{Xt(N,k?a:o),Ht(N,k?u:s),cr(re)||dr(N,l,y,R)})};return Re(t,{onBeforeEnter(k){Zt(C,[k]),Ht(k,o),Ht(k,r)},onBeforeAppear(k){Zt(G,[k]),Ht(k,a),Ht(k,c)},onEnter:V(!1),onAppear:V(!0),onLeave(k,N){k._isLeaving=!0;const X=()=>S(k,N);Ht(k,d),Ht(k,h),pd(),ur(()=>{k._isLeaving&&(Xt(k,d),Ht(k,m),cr(v)||dr(k,l,T,X))}),Zt(v,[k,X])},onEnterCancelled(k){z(k,!1),Zt(g,[k])},onAppearCancelled(k){z(k,!0),Zt(E,[k])},onLeaveCancelled(k){S(k),Zt(M,[k])}})}function dd(e){if(e==null)return null;if(ve(e))return[Li(e.enter),Li(e.leave)];{const t=Li(e);return[t,t]}}function Li(e){return nc(e)}function Ht(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[nl]||(e[nl]=new Set)).add(t)}function Xt(e,t){t.split(/\s+/).forEach(l=>l&&e.classList.remove(l));const n=e[nl];n&&(n.delete(t),n.size||(e[nl]=void 0))}function ur(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let fd=0;function dr(e,t,n,l){const i=e._endId=++fd,o=()=>{i===e._endId&&l()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:s,propCount:a}=hd(e,t);if(!r)return l();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,h),o()},h=m=>{m.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[b]||"").split(", "),i=l(`${Nt}Delay`),o=l(`${Nt}Duration`),r=fr(i,o),s=l(`${Hn}Delay`),a=l(`${Hn}Duration`),c=fr(s,a);let u=null,d=0,h=0;t===Nt?r>0&&(u=Nt,d=r,h=o.length):t===Hn?c>0&&(u=Hn,d=c,h=a.length):(d=Math.max(r,c),u=d>0?r>c?Nt:Hn:null,h=u?u===Nt?o.length:a.length:0);const m=u===Nt&&/\b(transform|all)(,|$)/.test(l(`${Nt}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:m}}function fr(e,t){for(;e.lengthhr(n)+hr(e[l])))}function hr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function pd(){return document.body.offsetHeight}function gd(e,t,n){const l=e[nl];l&&(t=(t?[t,...l]:[...l]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Gl=Symbol("_vod"),da=Symbol("_vsh"),Jl={beforeMount(e,{value:t},{transition:n}){e[Gl]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),Fn(e,!0),l.enter(e)):l.leave(e,()=>{Fn(e,!1)}):Fn(e,t))},beforeUnmount(e,{value:t}){Fn(e,t)}};function Fn(e,t){e.style.display=t?e[Gl]:"none",e[da]=!t}const md=Symbol(""),vd=/(^|;)\s*display\s*:/;function _d(e,t,n){const l=e.style,i=Te(n);let o=!1;if(n&&!i){if(t)if(Te(t))for(const r of t.split(";")){const s=r.slice(0,r.indexOf(":")).trim();n[s]==null&&Nl(l,s,"")}else for(const r in t)n[r]==null&&Nl(l,r,"");for(const r in n)r==="display"&&(o=!0),Nl(l,r,n[r])}else if(i){if(t!==n){const r=l[md];r&&(n+=";"+r),l.cssText=n,o=vd.test(n)}}else t&&e.removeAttribute("style");Gl in e&&(e[Gl]=o?l.display:"",e[da]&&(l.display="none"))}const pr=/\s*!important$/;function Nl(e,t,n){if(Z(n))n.forEach(l=>Nl(e,t,l));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const l=bd(e,t);pr.test(n)?e.setProperty(qt(l),n.replace(pr,""),"important"):e[l]=n}}const gr=["Webkit","Moz","ms"],Ci={};function bd(e,t){const n=Ci[t];if(n)return n;let l=Qe(t);if(l!=="filter"&&l in e)return Ci[t]=l;l=cl(l);for(let i=0;iTi||(wd.then(()=>Ti=0),Ti=Date.now());function Sd(e,t){const n=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=n.attached)return;dt(Ld(l,n.value),t,5,[l])};return n.value=e,n.attached=xd(),n}function Ld(e,t){if(Z(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(l=>i=>!i._stopped&&l&&l(i))}else return t}const kr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cd=(e,t,n,l,i,o)=>{const r=i==="svg";t==="class"?gd(e,l,r):t==="style"?_d(e,n,l):sl(t)?Xi(t)||kd(e,t,n,l,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Td(e,t,l,r))?(_r(e,t,l),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&vr(e,t,l,r,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Te(l))?_r(e,Qe(t),l):(t==="true-value"?e._trueValue=l:t==="false-value"&&(e._falseValue=l),vr(e,t,l,r))};function Td(e,t,n,l){if(l)return!!(t==="innerHTML"||t==="textContent"||t in e&&kr(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return kr(t)&&Te(n)?!1:t in e}const Ql=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>Il(t,n):t};function Ad(e){e.target.composing=!0}function Er(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),a_={created(e,{modifiers:{lazy:t,trim:n,number:l}},i){e[Sn]=Ql(i);const o=l||i.props&&i.props.type==="number";on(e,t?"change":"input",r=>{if(r.target.composing)return;let s=e.value;n&&(s=s.trim()),o&&(s=Ni(s)),e[Sn](s)}),n&&on(e,"change",()=>{e.value=e.value.trim()}),t||(on(e,"compositionstart",Ad),on(e,"compositionend",Er),on(e,"change",Er))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:i,number:o}},r){if(e[Sn]=Ql(r),e.composing)return;const s=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ni(e.value):e.value,a=t??"";s!==a&&(document.activeElement===e&&e.type!=="range"&&(l&&t===n||i&&e.value.trim()===a)||(e.value=a))}},c_={deep:!0,created(e,t,n){e[Sn]=Ql(n),on(e,"change",()=>{const l=e._modelValue,i=Pd(e),o=e.checked,r=e[Sn];if(Z(l)){const s=ss(l,i),a=s!==-1;if(o&&!a)r(l.concat(i));else if(!o&&a){const c=[...l];c.splice(s,1),r(c)}}else if(Yl(l)){const s=new Set(l);o?s.add(i):s.delete(i),r(s)}else r(fa(e,o))})},mounted:wr,beforeUpdate(e,t,n){e[Sn]=Ql(n),wr(e,t,n)}};function wr(e,{value:t},n){e._modelValue=t;let l;Z(t)?l=ss(t,n.props.value)>-1:Yl(t)?l=t.has(n.props.value):l=Xl(t,fa(e,!0)),e.checked!==l&&(e.checked=l)}function Pd(e){return"_value"in e?e._value:e.value}function fa(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Od={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rd=(e,t)=>{const n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=i=>{if(!("key"in i))return;const o=qt(i.key);if(t.some(r=>r===o||Od[r]===o))return e(i)})},Id=Re({patchProp:Cd},sd);let Ai,xr=!1;function Dd(){return Ai=xr?Ai:Ou(Id),xr=!0,Ai}const Md=(...e)=>{const t=Dd().createApp(...e),{mount:n}=t;return t.mount=l=>{const i=Hd(l);if(i)return n(i,!0,Nd(i))},t};function Nd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hd(e){return Te(e)?document.querySelector(e):e}var vl=e=>/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith("//"),Fd=/.md((\?|#).*)?$/,Vd=(e,t="/")=>vl(e)||e.startsWith("/")&&!e.startsWith(t)&&!Fd.test(e),ui=e=>/^(https?:)?\/\//.test(e),Sr=e=>{if(!e||e.endsWith("/"))return e;let t=e.replace(/(^|\/)README.md$/i,"$1index.html");return t.endsWith(".md")?t=t.substring(0,t.length-3)+".html":t.endsWith(".html")||(t=t+".html"),t.endsWith("/index.html")&&(t=t.substring(0,t.length-10)),t},$d="http://.",jd=(e,t)=>{if(!e.startsWith("/")&&t){const n=t.slice(0,t.lastIndexOf("/"));return Sr(new URL(`${n}/${e}`,$d).pathname)}return Sr(e)},Bd=(e,t)=>{const n=Object.keys(e).sort((l,i)=>{const o=i.split("/").length-l.split("/").length;return o!==0?o:i.length-l.length});for(const l of n)if(t.startsWith(l))return l;return"/"},zd=/(#|\?)/,ha=e=>{const[t,...n]=e.split(zd);return{pathname:t,hashAndQueries:n.join("")}},Ud=["link","meta","script","style","noscript","template"],Wd=["title","base"],Kd=([e,t,n])=>Wd.includes(e)?e:Ud.includes(e)?e==="meta"&&t.name?`${e}.${t.name}`:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,Object.entries(t).map(([l,i])=>typeof i=="boolean"?i?[l,""]:null:[l,i]).filter(l=>l!=null).sort(([l],[i])=>l.localeCompare(i)),n]):null,qd=e=>{const t=new Set,n=[];return e.forEach(l=>{const i=Kd(l);i&&!t.has(i)&&(t.add(i),n.push(l))}),n},Gd=e=>e[e.length-1]==="/"||e.endsWith(".html")?e:`${e}/`,pa=e=>e[e.length-1]==="/"?e.slice(0,-1):e,ga=e=>e[0]==="/"?e.slice(1):e,yo=e=>Object.prototype.toString.call(e)==="[object Object]",at=e=>typeof e=="string";const Jd="modulepreload",Qd=function(e){return"/node-red-contrib-home-assistant-websocket/"+e},Lr={},$=function(t,n,l){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),s=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=Qd(a),a in Lr)return;Lr[a]=!0;const c=a.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Jd,c||(d.as="script"),d.crossOrigin="",d.href=a,s&&d.setAttribute("nonce",s),document.head.appendChild(d),c)return new Promise((h,m)=>{d.addEventListener("load",h),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(r){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r}return i.then(r=>{for(const s of r||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})},Yd=JSON.parse("{}"),Zd=Object.fromEntries([["/FAQ.html",{loader:()=>$(()=>import("./FAQ.html-Dbka2djZ.js"),[]),meta:{title:"FAQ"}}],["/",{loader:()=>$(()=>import("./index.html-DM7m0Nlu.js"),[]),meta:{title:""}}],["/cookbook/actionable-notifications-subflow-for-android.html",{loader:()=>$(()=>import("./actionable-notifications-subflow-for-android.html-C2aCe33_.js"),[]),meta:{title:"Actionable Notifications Subflow for Android"}}],["/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html",{loader:()=>$(()=>import("./check-if-an-entity-was-turned-on-in-the-last-24-hours.html-CcLo08bo.js"),[]),meta:{title:"Check if an entity was a certain state in the last 24 hours"}}],["/cookbook/events-by-label.html",{loader:()=>$(()=>import("./events-by-label.html-CPBhLpQj.js"),[]),meta:{title:"Events by Label"}}],["/cookbook/expiration-date-monitor.html",{loader:()=>$(()=>import("./expiration-date-monitor.html-iEz7TEU6.js"),[]),meta:{title:"Expiration Date Monitor with notification"}}],["/cookbook/get-state_changed-events-based-on-area.html",{loader:()=>$(()=>import("./get-state_changed-events-based-on-area.html-BYhJ4E6e.js"),[]),meta:{title:"Get state_changed Events Based on Area"}}],["/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html",{loader:()=>$(()=>import("./holiday-lights-scheduler-and-demo-mode-for-wled.html-mqFFTo0l.js"),[]),meta:{title:"Holiday lights scheduler and demo mode for WLED"}}],["/cookbook/",{loader:()=>$(()=>import("./index.html-BZB1rhDi.js"),[]),meta:{title:"Cookbook"}}],["/cookbook/motion-triggered-light.html",{loader:()=>$(()=>import("./motion-triggered-light.html-DqSmmixp.js"),[]),meta:{title:"Motion Triggered Light"}}],["/cookbook/play-jellyfin-show-using-sentence-node.html",{loader:()=>$(()=>import("./play-jellyfin-show-using-sentence-node.html-CsvMb0ZJ.js"),__vite__mapDeps([0,1])),meta:{title:"Play a Jellyfin Show Using the Sentence Node"}}],["/cookbook/saving-and-restoring-states.html",{loader:()=>$(()=>import("./saving-and-restoring-states.html-IPQZ0Zh-.js"),[]),meta:{title:"Saving and Restoring States"}}],["/cookbook/starting-flow-after-home-assistant-restart.html",{loader:()=>$(()=>import("./starting-flow-after-home-assistant-restart.html-CSlrAA6l.js"),[]),meta:{title:"Starting a flow after a Home Assistant restart"}}],["/cookbook/sun-events.html",{loader:()=>$(()=>import("./sun-events.html-cUR6Nkho.js"),__vite__mapDeps([2,3])),meta:{title:"Turn Light On/Off with Sunset/Sunrise"}}],["/cookbook/using-date-and-time-entities-to-trigger-flows.html",{loader:()=>$(()=>import("./using-date-and-time-entities-to-trigger-flows.html-B5ih83NL.js"),[]),meta:{title:"Using Date and Time entities to trigger flows"}}],["/cookbook/vacation-mode.html",{loader:()=>$(()=>import("./vacation-mode.html-nf33t2Mq.js"),[]),meta:{title:"Vacation Mode"}}],["/guide/action.html",{loader:()=>$(()=>import("./action.html-DpcS1Rnf.js"),[]),meta:{title:"Action Node Tips and Tricks"}}],["/guide/conditionals.html",{loader:()=>$(()=>import("./conditionals.html-CBA0fNuv.js"),[]),meta:{title:"Conditionals"}}],["/guide/development.html",{loader:()=>$(()=>import("./development.html-DoDYJ5BC.js"),[]),meta:{title:"Development"}}],["/guide/diagnostics.html",{loader:()=>$(()=>import("./diagnostics.html-BcQQWJ2q.js"),[]),meta:{title:"Diagnostics Information"}}],["/guide/documentation.html",{loader:()=>$(()=>import("./documentation.html-EIu1gqB9.js"),[]),meta:{title:"Documentation"}}],["/guide/first-automation.html",{loader:()=>$(()=>import("./first-automation.html-BYONk5Lb.js"),__vite__mapDeps([4,3])),meta:{title:"First Automation"}}],["/guide/",{loader:()=>$(()=>import("./index.html-wDz1CEsG.js"),[]),meta:{title:"Getting Started"}}],["/guide/migration.html",{loader:()=>$(()=>import("./migration.html-D6ccKEm6.js"),[]),meta:{title:"Migration"}}],["/guide/mustache-templates.html",{loader:()=>$(()=>import("./mustache-templates.html-DdYaquw5.js"),[]),meta:{title:"Mustache Templates"}}],["/node/API.html",{loader:()=>$(()=>import("./API.html-CoY0rX1m.js"),[]),meta:{title:"API"}}],["/node/action.html",{loader:()=>$(()=>import("./action.html-CueRyjyR.js"),[]),meta:{title:"Action"}}],["/node/binary-sensor.html",{loader:()=>$(()=>import("./binary-sensor.html-DpRO3Fca.js"),[]),meta:{title:"Binary Sensor"}}],["/node/button.html",{loader:()=>$(()=>import("./button.html-nN_e7Cn2.js"),[]),meta:{title:"Button"}}],["/node/config-server.html",{loader:()=>$(()=>import("./config-server.html-Cr4_zaGv.js"),[]),meta:{title:"Server Config"}}],["/node/current-state.html",{loader:()=>$(()=>import("./current-state.html-iUU17wBN.js"),[]),meta:{title:"Current State"}}],["/node/device-config.html",{loader:()=>$(()=>import("./device-config.html-CLVeK5h2.js"),[]),meta:{title:"Device Config"}}],["/node/device.html",{loader:()=>$(()=>import("./device.html-BC-eSPOC.js"),[]),meta:{title:"Device"}}],["/node/entity-config.html",{loader:()=>$(()=>import("./entity-config.html-B7KWX0GA.js"),[]),meta:{title:"Entity Config"}}],["/node/entity.html",{loader:()=>$(()=>import("./entity.html-C290Kyy8.js"),[]),meta:{title:"Entity"}}],["/node/events-all.html",{loader:()=>$(()=>import("./events-all.html-DaUOW7Yj.js"),[]),meta:{title:"Events: all"}}],["/node/events-calendar.html",{loader:()=>$(()=>import("./events-calendar.html-DVxN8ryu.js"),[]),meta:{title:"Events: calendar"}}],["/node/events-state.html",{loader:()=>$(()=>import("./events-state.html-B-ki2v7A.js"),[]),meta:{title:"Events: state"}}],["/node/fire-event.html",{loader:()=>$(()=>import("./fire-event.html-CRNw0weX.js"),[]),meta:{title:"Fire Event"}}],["/node/get-entities.html",{loader:()=>$(()=>import("./get-entities.html-DDxfqZLb.js"),[]),meta:{title:"Get Entities"}}],["/node/get-history.html",{loader:()=>$(()=>import("./get-history.html-BhCpE7NY.js"),[]),meta:{title:"Get History"}}],["/node/",{loader:()=>$(()=>import("./index.html-B93_d2Ov.js"),[]),meta:{title:"Nodes"}}],["/node/number.html",{loader:()=>$(()=>import("./number.html-B78yuMPe.js"),[]),meta:{title:"Number"}}],["/node/poll-state.html",{loader:()=>$(()=>import("./poll-state.html-DyOdcTV_.js"),[]),meta:{title:"Poll State"}}],["/node/render-template.html",{loader:()=>$(()=>import("./render-template.html-BLNecktW.js"),[]),meta:{title:"Render Template"}}],["/node/select.html",{loader:()=>$(()=>import("./select.html-lQV-KKW4.js"),[]),meta:{title:"Select"}}],["/node/sensor.html",{loader:()=>$(()=>import("./sensor.html-DWyr03gG.js"),[]),meta:{title:"Sensor"}}],["/node/sentence.html",{loader:()=>$(()=>import("./sentence.html-hzBKu6RK.js"),__vite__mapDeps([5,1])),meta:{title:"Sentence"}}],["/node/switch.html",{loader:()=>$(()=>import("./switch.html-Bhvk304d.js"),[]),meta:{title:"Switch"}}],["/node/tag.html",{loader:()=>$(()=>import("./tag.html-ByJ95BCf.js"),[]),meta:{title:"Tag"}}],["/node/text.html",{loader:()=>$(()=>import("./text.html-uo1hSvmv.js"),[]),meta:{title:"Text"}}],["/node/time-entity.html",{loader:()=>$(()=>import("./time-entity.html-3VEsG7Bu.js"),[]),meta:{title:"Time"}}],["/node/time.html",{loader:()=>$(()=>import("./time.html-BptDmMJt.js"),[]),meta:{title:"Time"}}],["/node/trigger-state.html",{loader:()=>$(()=>import("./trigger-state.html-CY-rAJPk.js"),[]),meta:{title:"Trigger: state"}}],["/node/update-config.html",{loader:()=>$(()=>import("./update-config.html-D7qJGits.js"),[]),meta:{title:"Update Config"}}],["/node/wait-until.html",{loader:()=>$(()=>import("./wait-until.html-_CDC3EjJ.js"),[]),meta:{title:"Wait Until"}}],["/node/webhook.html",{loader:()=>$(()=>import("./webhook.html-DJ_g8RC7.js"),[]),meta:{title:"Webhook"}}],["/node/zone.html",{loader:()=>$(()=>import("./zone.html-e_71GTE4.js"),[]),meta:{title:"Zone"}}],["/scrubber/",{loader:()=>$(()=>import("./index.html-BHJtTjPi.js"),[]),meta:{title:"Scrubber Tool"}}],["/cookbook/jsonata/action.html",{loader:()=>$(()=>import("./action.html-COjyZO0k.js"),[]),meta:{title:"Action Node JSONata Examples"}}],["/cookbook/jsonata/change-node.html",{loader:()=>$(()=>import("./change-node.html-Zdmn2unv.js"),[]),meta:{title:"Change node"}}],["/cookbook/jsonata/current-state.html",{loader:()=>$(()=>import("./current-state.html-Bfj39oy2.js"),[]),meta:{title:"Current State"}}],["/cookbook/jsonata/events-state.html",{loader:()=>$(()=>import("./events-state.html-K_yvOPle.js"),[]),meta:{title:"Events: state"}}],["/cookbook/jsonata/functions.html",{loader:()=>$(()=>import("./functions.html-DkwcU8r9.js"),[]),meta:{title:"Other functions"}}],["/cookbook/jsonata/sensor.html",{loader:()=>$(()=>import("./sensor.html-DO1GtXG9.js"),[]),meta:{title:"Sensor"}}],["/cookbook/jsonata/switch-node.html",{loader:()=>$(()=>import("./switch-node.html-C5J6Vd72.js"),[]),meta:{title:"Switch node"}}],["/cookbook/jsonata/trigger-state.html",{loader:()=>$(()=>import("./trigger-state.html-jy6oIFcc.js"),[]),meta:{title:"Trigger: state"}}],["/guide/custom_integration/exposed-nodes.html",{loader:()=>$(()=>import("./exposed-nodes.html-YvdovF3I.js"),[]),meta:{title:"Exposed Nodes"}}],["/guide/custom_integration/",{loader:()=>$(()=>import("./index.html-DTYPDoQS.js"),[]),meta:{title:"Getting Started"}}],["/guide/jsonata/",{loader:()=>$(()=>import("./index.html-D06ojgm6.js"),[]),meta:{title:"JSONata"}}],["/guide/jsonata/jsonata-primer.html",{loader:()=>$(()=>import("./jsonata-primer.html-DvrDlwTO.js"),[]),meta:{title:"JSONata primer"}}],["/404.html",{loader:()=>$(()=>import("./404.html-DwTfz_GW.js"),[]),meta:{title:""}}]]);/*! + * vue-router v4.4.3 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const _n=typeof document<"u";function Xd(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ge=Object.assign;function Pi(e,t){const n={};for(const l in t){const i=t[l];n[l]=ft(i)?i.map(e):e(i)}return n}const Gn=()=>{},ft=Array.isArray,ma=/#/g,ef=/&/g,tf=/\//g,nf=/=/g,lf=/\?/g,va=/\+/g,of=/%5B/g,rf=/%5D/g,_a=/%5E/g,sf=/%60/g,ba=/%7B/g,af=/%7C/g,ya=/%7D/g,cf=/%20/g;function ko(e){return encodeURI(""+e).replace(af,"|").replace(of,"[").replace(rf,"]")}function uf(e){return ko(e).replace(ba,"{").replace(ya,"}").replace(_a,"^")}function Ki(e){return ko(e).replace(va,"%2B").replace(cf,"+").replace(ma,"%23").replace(ef,"%26").replace(sf,"`").replace(ba,"{").replace(ya,"}").replace(_a,"^")}function df(e){return Ki(e).replace(nf,"%3D")}function ff(e){return ko(e).replace(ma,"%23").replace(lf,"%3F")}function hf(e){return e==null?"":ff(e).replace(tf,"%2F")}function ll(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const pf=/\/$/,gf=e=>e.replace(pf,"");function Oi(e,t,n="/"){let l,i={},o="",r="";const s=t.indexOf("#");let a=t.indexOf("?");return s=0&&(a=-1),a>-1&&(l=t.slice(0,a),o=t.slice(a+1,s>-1?s:t.length),i=e(o)),s>-1&&(l=l||t.slice(0,s),r=t.slice(s,t.length)),l=bf(l??t,n),{fullPath:l+(o&&"?")+o+r,path:l,query:i,hash:ll(r)}}function mf(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Cr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function vf(e,t,n){const l=t.matched.length-1,i=n.matched.length-1;return l>-1&&l===i&&Tn(t.matched[l],n.matched[i])&&ka(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Tn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ka(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!_f(e[n],t[n]))return!1;return!0}function _f(e,t){return ft(e)?Tr(e,t):ft(t)?Tr(t,e):e===t}function Tr(e,t){return ft(t)?e.length===t.length&&e.every((n,l)=>n===t[l]):e.length===1&&e[0]===t}function bf(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),l=e.split("/"),i=l[l.length-1];(i===".."||i===".")&&l.push("");let o=n.length-1,r,s;for(r=0;r1&&o--;else break;return n.slice(0,o).join("/")+"/"+l.slice(r).join("/")}const Ct={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var il;(function(e){e.pop="pop",e.push="push"})(il||(il={}));var Jn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Jn||(Jn={}));function yf(e){if(!e)if(_n){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),gf(e)}const kf=/^[^#]+#/;function Ef(e,t){return e.replace(kf,"#")+t}function wf(e,t){const n=document.documentElement.getBoundingClientRect(),l=e.getBoundingClientRect();return{behavior:t.behavior,left:l.left-n.left-(t.left||0),top:l.top-n.top-(t.top||0)}}const di=()=>({left:window.scrollX,top:window.scrollY});function xf(e){let t;if("el"in e){const n=e.el,l=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?l?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=wf(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ar(e,t){return(history.state?history.state.position-t:-1)+e}const qi=new Map;function Sf(e,t){qi.set(e,t)}function Lf(e){const t=qi.get(e);return qi.delete(e),t}let Cf=()=>location.protocol+"//"+location.host;function Ea(e,t){const{pathname:n,search:l,hash:i}=t,o=e.indexOf("#");if(o>-1){let s=i.includes(e.slice(o))?e.slice(o).length:1,a=i.slice(s);return a[0]!=="/"&&(a="/"+a),Cr(a,"")}return Cr(n,e)+l+i}function Tf(e,t,n,l){let i=[],o=[],r=null;const s=({state:h})=>{const m=Ea(e,location),b=n.value,y=t.value;let T=0;if(h){if(n.value=m,t.value=h,r&&r===b){r=null;return}T=y?h.position-y.position:0}else l(m);i.forEach(C=>{C(n.value,b,{delta:T,type:il.pop,direction:T?T>0?Jn.forward:Jn.back:Jn.unknown})})};function a(){r=n.value}function c(h){i.push(h);const m=()=>{const b=i.indexOf(h);b>-1&&i.splice(b,1)};return o.push(m),m}function u(){const{history:h}=window;h.state&&h.replaceState(ge({},h.state,{scroll:di()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:a,listen:c,destroy:d}}function Pr(e,t,n,l=!1,i=!1){return{back:e,current:t,forward:n,replaced:l,position:window.history.length,scroll:i?di():null}}function Af(e){const{history:t,location:n}=window,l={value:Ea(e,n)},i={value:t.state};i.value||o(l.value,{back:null,current:l.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,c,u){const d=e.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:Cf()+e+a;try{t[u?"replaceState":"pushState"](c,"",h),i.value=c}catch(m){console.error(m),n[u?"replace":"assign"](h)}}function r(a,c){const u=ge({},t.state,Pr(i.value.back,a,i.value.forward,!0),c,{position:i.value.position});o(a,u,!0),l.value=a}function s(a,c){const u=ge({},i.value,t.state,{forward:a,scroll:di()});o(u.current,u,!0);const d=ge({},Pr(l.value,a,null),{position:u.position+1},c);o(a,d,!1),l.value=a}return{location:l,state:i,push:s,replace:r}}function Pf(e){e=yf(e);const t=Af(e),n=Tf(e,t.state,t.location,t.replace);function l(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=ge({location:"",base:e,go:l,createHref:Ef.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Of(e){return typeof e=="string"||e&&typeof e=="object"}function wa(e){return typeof e=="string"||typeof e=="symbol"}const xa=Symbol("");var Or;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Or||(Or={}));function An(e,t){return ge(new Error,{type:e,[xa]:!0},t)}function St(e,t){return e instanceof Error&&xa in e&&(t==null||!!(e.type&t))}const Rr="[^/]+?",Rf={sensitive:!1,strict:!1,start:!0,end:!0},If=/[.+*?^${}()[\]/\\]/g;function Df(e,t){const n=ge({},Rf,t),l=[];let i=n.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function Sa(e,t){let n=0;const l=e.score,i=t.score;for(;n0&&t[t.length-1]<0}const Nf={type:0,value:""},Hf=/[a-zA-Z0-9_]/;function Ff(e){if(!e)return[[]];if(e==="/")return[[Nf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${c}": ${m}`)}let n=0,l=n;const i=[];let o;function r(){o&&i.push(o),o=[]}let s=0,a,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function h(){c+=a}for(;s{r(g)}:Gn}function r(d){if(wa(d)){const h=l.get(d);h&&(l.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(r),h.alias.forEach(r))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&l.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function s(){return n}function a(d){const h=Uf(d,n);n.splice(h,0,d),d.record.name&&!Mr(d)&&l.set(d.record.name,d)}function c(d,h){let m,b={},y,T;if("name"in d&&d.name){if(m=l.get(d.name),!m)throw An(1,{location:d});T=m.record.name,b=ge(Dr(h.params,m.keys.filter(g=>!g.optional).concat(m.parent?m.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&Dr(d.params,m.keys.map(g=>g.name))),y=m.stringify(b)}else if(d.path!=null)y=d.path,m=n.find(g=>g.re.test(y)),m&&(b=m.parse(y),T=m.record.name);else{if(m=h.name?l.get(h.name):n.find(g=>g.re.test(h.path)),!m)throw An(1,{location:d,currentLocation:h});T=m.record.name,b=ge({},h.params,d.params),y=m.stringify(b)}const C=[];let w=m;for(;w;)C.unshift(w.record),w=w.parent;return{name:T,path:y,params:b,matched:C,meta:zf(C)}}e.forEach(d=>o(d));function u(){n.length=0,l.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Dr(e,t){const n={};for(const l of t)l in e&&(n[l]=e[l]);return n}function jf(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Bf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Bf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const l in e.components)t[l]=typeof n=="object"?n[l]:n;return t}function Mr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function zf(e){return e.reduce((t,n)=>ge(t,n.meta),{})}function Nr(e,t){const n={};for(const l in e)n[l]=l in t?t[l]:e[l];return n}function Uf(e,t){let n=0,l=t.length;for(;n!==l;){const o=n+l>>1;Sa(e,t[o])<0?l=o:n=o+1}const i=Wf(e);return i&&(l=t.lastIndexOf(i,l-1)),l}function Wf(e){let t=e;for(;t=t.parent;)if(La(t)&&Sa(e,t)===0)return t}function La({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Kf(e){const t={};if(e===""||e==="?")return t;const l=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;io&&Ki(o)):[l&&Ki(l)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function qf(e){const t={};for(const n in e){const l=e[n];l!==void 0&&(t[n]=ft(l)?l.map(i=>i==null?null:""+i):l==null?l:""+l)}return t}const Gf=Symbol(""),Fr=Symbol(""),fi=Symbol(""),Eo=Symbol(""),Gi=Symbol("");function Vn(){let e=[];function t(l){return e.push(l),()=>{const i=e.indexOf(l);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function jt(e,t,n,l,i,o=r=>r()){const r=l&&(l.enterCallbacks[i]=l.enterCallbacks[i]||[]);return()=>new Promise((s,a)=>{const c=h=>{h===!1?a(An(4,{from:n,to:t})):h instanceof Error?a(h):Of(h)?a(An(2,{from:t,to:h})):(r&&l.enterCallbacks[i]===r&&typeof h=="function"&&r.push(h),s())},u=o(()=>e.call(l&&l.instances[i],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(h=>a(h))})}function Ri(e,t,n,l,i=o=>o()){const o=[];for(const r of e)for(const s in r.components){let a=r.components[s];if(!(t!=="beforeRouteEnter"&&!r.instances[s]))if(Jf(a)){const u=(a.__vccOpts||a)[t];u&&o.push(jt(u,n,l,r,s,i))}else{let c=a();o.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${r.path}"`));const d=Xd(u)?u.default:u;r.components[s]=d;const m=(d.__vccOpts||d)[t];return m&&jt(m,n,l,r,s,i)()}))}}return o}function Jf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Vr(e){const t=qe(fi),n=qe(Eo),l=I(()=>{const a=cn(e.to);return t.resolve(a)}),i=I(()=>{const{matched:a}=l.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(Tn.bind(null,u));if(h>-1)return h;const m=$r(a[c-2]);return c>1&&$r(u)===m&&d[d.length-1].path!==m?d.findIndex(Tn.bind(null,a[c-2])):h}),o=I(()=>i.value>-1&&Xf(n.params,l.value.params)),r=I(()=>i.value>-1&&i.value===n.matched.length-1&&ka(n.params,l.value.params));function s(a={}){return Zf(a)?t[cn(e.replace)?"replace":"push"](cn(e.to)).catch(Gn):Promise.resolve()}return{route:l,href:I(()=>l.value.href),isActive:o,isExactActive:r,navigate:s}}const Qf=fe({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Vr,setup(e,{slots:t}){const n=dl(Vr(e)),{options:l}=qe(fi),i=I(()=>({[jr(e.activeClass,l.linkActiveClass,"router-link-active")]:n.isActive,[jr(e.exactActiveClass,l.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:se("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),Yf=Qf;function Zf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Xf(e,t){for(const n in t){const l=t[n],i=e[n];if(typeof l=="string"){if(l!==i)return!1}else if(!ft(i)||i.length!==l.length||l.some((o,r)=>o!==i[r]))return!1}return!0}function $r(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const jr=(e,t,n)=>e??t??n,eh=fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const l=qe(Gi),i=I(()=>e.route||l.value),o=qe(Fr,0),r=I(()=>{let c=cn(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),s=I(()=>i.value.matched[r.value]);dn(Fr,I(()=>r.value+1)),dn(Gf,s),dn(Gi,i);const a=ae();return He(()=>[a.value,s.value,e.name],([c,u,d],[h,m,b])=>{u&&(u.instances[d]=c,m&&m!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),c&&u&&(!m||!Tn(u,m)||!h)&&(u.enterCallbacks[d]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=i.value,u=e.name,d=s.value,h=d&&d.components[u];if(!h)return Br(n.default,{Component:h,route:c});const m=d.props[u],b=m?m===!0?c.params:typeof m=="function"?m(c):m:null,T=se(h,ge({},b,t,{onVnodeUnmounted:C=>{C.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return Br(n.default,{Component:T,route:c})||T}}});function Br(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const th=eh;function nh(e){const t=$f(e.routes,e),n=e.parseQuery||Kf,l=e.stringifyQuery||Hr,i=e.history,o=Vn(),r=Vn(),s=Vn(),a=Et(Ct);let c=Ct;_n&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Pi.bind(null,L=>""+L),d=Pi.bind(null,hf),h=Pi.bind(null,ll);function m(L,U){let j,J;return wa(L)?(j=t.getRecordMatcher(L),J=U):J=L,t.addRoute(J,j)}function b(L){const U=t.getRecordMatcher(L);U&&t.removeRoute(U)}function y(){return t.getRoutes().map(L=>L.record)}function T(L){return!!t.getRecordMatcher(L)}function C(L,U){if(U=ge({},U||a.value),typeof L=="string"){const p=Oi(n,L,U.path),_=t.resolve({path:p.path},U),A=i.createHref(p.fullPath);return ge(p,_,{params:h(_.params),hash:ll(p.hash),redirectedFrom:void 0,href:A})}let j;if(L.path!=null)j=ge({},L,{path:Oi(n,L.path,U.path).path});else{const p=ge({},L.params);for(const _ in p)p[_]==null&&delete p[_];j=ge({},L,{params:d(p)}),U.params=d(U.params)}const J=t.resolve(j,U),ce=L.hash||"";J.params=u(h(J.params));const me=mf(l,ge({},L,{hash:uf(ce),path:J.path})),f=i.createHref(me);return ge({fullPath:me,hash:ce,query:l===Hr?qf(L.query):L.query||{}},J,{redirectedFrom:void 0,href:f})}function w(L){return typeof L=="string"?Oi(n,L,a.value.path):ge({},L)}function g(L,U){if(c!==L)return An(8,{from:U,to:L})}function v(L){return D(L)}function M(L){return v(ge(w(L),{replace:!0}))}function G(L){const U=L.matched[L.matched.length-1];if(U&&U.redirect){const{redirect:j}=U;let J=typeof j=="function"?j(L):j;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=w(J):{path:J},J.params={}),ge({query:L.query,hash:L.hash,params:J.path!=null?{}:L.params},J)}}function D(L,U){const j=c=C(L),J=a.value,ce=L.state,me=L.force,f=L.replace===!0,p=G(j);if(p)return D(ge(w(p),{state:typeof p=="object"?ge({},ce,p.state):ce,force:me,replace:f}),U||j);const _=j;_.redirectedFrom=U;let A;return!me&&vf(l,J,j)&&(A=An(16,{to:_,from:J}),Ge(J,J,!0,!1)),(A?Promise.resolve(A):S(_,J)).catch(x=>St(x)?St(x,2)?x:Ne(x):W(x,_,J)).then(x=>{if(x){if(St(x,2))return D(ge({replace:f},w(x.to),{state:typeof x.to=="object"?ge({},ce,x.to.state):ce,force:me}),U||_)}else x=k(_,J,!0,f,ce);return V(_,J,x),x})}function E(L,U){const j=g(L,U);return j?Promise.reject(j):Promise.resolve()}function z(L){const U=Dt.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(L):L()}function S(L,U){let j;const[J,ce,me]=lh(L,U);j=Ri(J.reverse(),"beforeRouteLeave",L,U);for(const p of J)p.leaveGuards.forEach(_=>{j.push(jt(_,L,U))});const f=E.bind(null,L,U);return j.push(f),Je(j).then(()=>{j=[];for(const p of o.list())j.push(jt(p,L,U));return j.push(f),Je(j)}).then(()=>{j=Ri(ce,"beforeRouteUpdate",L,U);for(const p of ce)p.updateGuards.forEach(_=>{j.push(jt(_,L,U))});return j.push(f),Je(j)}).then(()=>{j=[];for(const p of me)if(p.beforeEnter)if(ft(p.beforeEnter))for(const _ of p.beforeEnter)j.push(jt(_,L,U));else j.push(jt(p.beforeEnter,L,U));return j.push(f),Je(j)}).then(()=>(L.matched.forEach(p=>p.enterCallbacks={}),j=Ri(me,"beforeRouteEnter",L,U,z),j.push(f),Je(j))).then(()=>{j=[];for(const p of r.list())j.push(jt(p,L,U));return j.push(f),Je(j)}).catch(p=>St(p,8)?p:Promise.reject(p))}function V(L,U,j){s.list().forEach(J=>z(()=>J(L,U,j)))}function k(L,U,j,J,ce){const me=g(L,U);if(me)return me;const f=U===Ct,p=_n?history.state:{};j&&(J||f?i.replace(L.fullPath,ge({scroll:f&&p&&p.scroll},ce)):i.push(L.fullPath,ce)),a.value=L,Ge(L,U,j,f),Ne()}let N;function X(){N||(N=i.listen((L,U,j)=>{if(!mt.listening)return;const J=C(L),ce=G(J);if(ce){D(ge(ce,{replace:!0}),J).catch(Gn);return}c=J;const me=a.value;_n&&Sf(Ar(me.fullPath,j.delta),di()),S(J,me).catch(f=>St(f,12)?f:St(f,2)?(D(f.to,J).then(p=>{St(p,20)&&!j.delta&&j.type===il.pop&&i.go(-1,!1)}).catch(Gn),Promise.reject()):(j.delta&&i.go(-j.delta,!1),W(f,J,me))).then(f=>{f=f||k(J,me,!1),f&&(j.delta&&!St(f,8)?i.go(-j.delta,!1):j.type===il.pop&&St(f,20)&&i.go(-1,!1)),V(J,me,f)}).catch(Gn)}))}let re=Vn(),R=Vn(),Q;function W(L,U,j){Ne(L);const J=R.list();return J.length?J.forEach(ce=>ce(L,U,j)):console.error(L),Promise.reject(L)}function ye(){return Q&&a.value!==Ct?Promise.resolve():new Promise((L,U)=>{re.add([L,U])})}function Ne(L){return Q||(Q=!L,X(),re.list().forEach(([U,j])=>L?j(L):U()),re.reset()),L}function Ge(L,U,j,J){const{scrollBehavior:ce}=e;if(!_n||!ce)return Promise.resolve();const me=!j&&Lf(Ar(L.fullPath,0))||(J||!j)&&history.state&&history.state.scroll||null;return On().then(()=>ce(L,U,me)).then(f=>f&&xf(f)).catch(f=>W(f,L,U))}const Fe=L=>i.go(L);let It;const Dt=new Set,mt={currentRoute:a,listening:!0,addRoute:m,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:T,getRoutes:y,resolve:C,options:e,push:v,replace:M,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:o.add,beforeResolve:r.add,afterEach:s.add,onError:R.add,isReady:ye,install(L){const U=this;L.component("RouterLink",Yf),L.component("RouterView",th),L.config.globalProperties.$router=U,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>cn(a)}),_n&&!It&&a.value===Ct&&(It=!0,v(i.location).catch(ce=>{}));const j={};for(const ce in Ct)Object.defineProperty(j,ce,{get:()=>a.value[ce],enumerable:!0});L.provide(fi,U),L.provide(Eo,Ss(j)),L.provide(Gi,a);const J=L.unmount;Dt.add(L),L.unmount=function(){Dt.delete(L),Dt.size<1&&(c=Ct,N&&N(),N=null,a.value=Ct,It=!1,Q=!1),J()}}};function Je(L){return L.reduce((U,j)=>U.then(()=>z(j)),Promise.resolve())}return mt}function lh(e,t){const n=[],l=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let r=0;rTn(c,s))?l.push(s):n.push(s));const a=e.matched[r];a&&(t.matched.find(c=>Tn(c,a))||i.push(a))}return[n,l,i]}function Qt(){return qe(fi)}function Rt(e){return qe(Eo)}var wo=Symbol(""),wt=()=>{const e=qe(wo);if(!e)throw new Error("useClientData() is called without provider.");return e},ih=()=>wt().pageComponent,Rn=()=>wt().pageData,pt=()=>wt().pageFrontmatter,oh=()=>wt().pageHead,rh=()=>wt().pageLang,sh=()=>wt().pageLayout,In=()=>wt().routeLocale,ah=()=>wt().routes,Ca=()=>wt().siteData,xo=()=>wt().siteLocaleData,ch=Symbol(""),Ji=Et(Yd),Ln=Et(Zd),Ta=(e,t)=>{const n=jd(e,t);if(Ln.value[n])return n;const l=encodeURI(n);if(Ln.value[l])return l;const i=Ji.value[n]||Ji.value[l];return i||n},ol=(e,t)=>{const{pathname:n,hashAndQueries:l}=ha(e),i=Ta(n,t),o=i+l;return Ln.value[i]?{...Ln.value[i],path:o,notFound:!1}:{...Ln.value["/404.html"],path:o,notFound:!0}},uh=(e,t)=>{const{pathname:n,hashAndQueries:l}=ha(e);return Ta(n,t)+l},dh=e=>{if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget){const t=e.currentTarget.getAttribute("target");if(t!=null&&t.match(/\b_blank\b/i))return}return e.preventDefault(),!0}},hi=fe({name:"RouteLink",props:{to:{type:String,required:!0},active:Boolean,activeClass:{type:String,default:"route-link-active"}},slots:Object,setup(e,{slots:t}){const n=Qt(),l=Rt(),i=I(()=>e.to.startsWith("#")||e.to.startsWith("?")?e.to:`/node-red-contrib-home-assistant-websocket/${uh(e.to,l.path).substring(1)}`);return()=>{var o;return se("a",{class:["route-link",{[e.activeClass]:e.active}],href:i.value,onClick:(r={})=>{dh(r)&&n.push(e.to).catch()}},(o=t.default)==null?void 0:o.call(t))}}}),Dn=fe({name:"AutoLink",props:{config:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){const n=jc(e,"config"),l=Rt(),i=Ca(),o=I(()=>vl(n.value.link)),r=I(()=>n.value.target||(o.value?"_blank":void 0)),s=I(()=>r.value==="_blank"),a=I(()=>!o.value&&!s.value),c=I(()=>n.value.rel||(s.value?"noopener noreferrer":null)),u=I(()=>n.value.ariaLabel??n.value.text),d=I(()=>{if(n.value.exact)return!1;const m=Object.keys(i.value.locales);return m.length?m.every(b=>b!==n.value.link):n.value.link!=="/"}),h=I(()=>a.value?n.value.activeMatch?(n.value.activeMatch instanceof RegExp?n.value.activeMatch:new RegExp(n.value.activeMatch,"u")).test(l.path):d.value?l.path.startsWith(n.value.link):l.path===n.value.link:!1);return()=>{const{before:m,after:b,default:y}=t,T=(y==null?void 0:y(n.value))||[m==null?void 0:m(n.value),n.value.text,b==null?void 0:b(n.value)];return a.value?se(hi,{class:"auto-link",to:n.value.link,active:h.value,"aria-label":u.value},()=>T):se("a",{class:"auto-link external-link",href:n.value.link,"aria-label":u.value,rel:c.value,target:r.value},T)}}}),So=fe({name:"ClientOnly",setup(e,t){const n=ae(!1);return ze(()=>{n.value=!0}),()=>{var l,i;return n.value?(i=(l=t.slots).default)==null?void 0:i.call(l):null}}}),Lo=fe({name:"Content",props:{path:{type:String,required:!1,default:""}},setup(e){const t=ih(),n=I(()=>{if(!e.path)return t.value;const l=ol(e.path);return Dl(()=>l.loader().then(({comp:i})=>i))});return()=>se(n.value)}}),fh="Layout",hh="en-US",en=dl({resolveLayouts:e=>e.reduce((t,n)=>({...t,...n.layouts}),{}),resolvePageHead:(e,t,n)=>{const l=at(t.description)?t.description:n.description,i=[...Array.isArray(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:l}]];return qd(i)},resolvePageHeadTitle:(e,t)=>[e.title,t.title].filter(n=>!!n).join(" | "),resolvePageLang:(e,t)=>e.lang||t.lang||hh,resolvePageLayout:(e,t)=>{const n=at(e.frontmatter.layout)?e.frontmatter.layout:fh;if(!t[n])throw new Error(`[vuepress] Cannot resolve layout: ${n}`);return t[n]},resolveRouteLocale:(e,t)=>Bd(e,decodeURI(t)),resolveSiteLocaleData:({base:e,locales:t,...n},l)=>{var i;return{...n,...t[l],head:[...((i=t[l])==null?void 0:i.head)??[],...n.head??[]]}}}),gt=(e={})=>e,Co=e=>ui(e)?e:`/node-red-contrib-home-assistant-websocket/${ga(e)}`;function pi(e){return us()?(dc(e),!0):!1}function ht(e){return typeof e=="function"?e():cn(e)}const To=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ph=Object.prototype.toString,gh=e=>ph.call(e)==="[object Object]",Qi=()=>{};function Aa(e,t){function n(...l){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})).then(i).catch(o)})}return n}const Pa=e=>e();function mh(e,t={}){let n,l,i=Qi;const o=s=>{clearTimeout(s),i(),i=Qi};return s=>{const a=ht(e),c=ht(t.maxWait);return n&&o(n),a<=0||c!==void 0&&c<=0?(l&&(o(l),l=null),Promise.resolve(s())):new Promise((u,d)=>{i=t.rejectOnCancel?d:u,c&&!l&&(l=setTimeout(()=>{n&&o(n),l=null,u(s())},c)),n=setTimeout(()=>{l&&o(l),l=null,u(s())},a)})}}function vh(e=Pa){const t=ae(!0);function n(){t.value=!1}function l(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:li(t),pause:n,resume:l,eventFilter:i}}function _h(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const l=t;t=void 0,l&&await l},n}function bh(e){return ai()}function yh(e,t=200,n={}){return Aa(mh(t,n),e)}function kh(e,t,n={}){const{eventFilter:l=Pa,...i}=n;return He(e,Aa(l,t),i)}function Eh(e,t,n={}){const{eventFilter:l,...i}=n,{eventFilter:o,pause:r,resume:s,isActive:a}=vh(l);return{stop:kh(e,t,{...i,eventFilter:o}),pause:r,resume:s,isActive:a}}function Ao(e,t=!0,n){bh()?ze(e,n):t?e():On(e)}function wh(e,t,n={}){const{immediate:l=!0}=n,i=ae(!1);let o=null;function r(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,r()}function a(...c){r(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...c)},ht(t))}return l&&(i.value=!0,To&&a()),pi(s),{isPending:li(i),start:a,stop:s}}function xh(e=!1,t={}){const{truthyValue:n=!0,falsyValue:l=!1}=t,i=Oe(e),o=ae(e);function r(s){if(arguments.length)return o.value=s,o.value;{const a=ht(n);return o.value=o.value===a?ht(l):a,o.value}}return i?r:[o,r]}const Kt=To?window:void 0,Oa=To?window.navigator:void 0;function rn(e){var t;const n=ht(e);return(t=n==null?void 0:n.$el)!=null?t:n}function lt(...e){let t,n,l,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,l,i]=e,t=Kt):[t,n,l,i]=e,!t)return Qi;Array.isArray(n)||(n=[n]),Array.isArray(l)||(l=[l]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},s=(u,d,h,m)=>(u.addEventListener(d,h,m),()=>u.removeEventListener(d,h,m)),a=He(()=>[rn(t),ht(i)],([u,d])=>{if(r(),!u)return;const h=gh(d)?{...d}:d;o.push(...n.flatMap(m=>l.map(b=>s(u,m,b,h))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return pi(c),c}function Sh(){const e=ae(!1),t=ai();return t&&ze(()=>{e.value=!0},t),e}function gi(e){const t=Sh();return I(()=>(t.value,!!e()))}function Po(e,t={}){const{window:n=Kt}=t,l=gi(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let i;const o=ae(!1),r=c=>{o.value=c.matches},s=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",r):i.removeListener(r))},a=Nu(()=>{l.value&&(s(),i=n.matchMedia(ht(e)),"addEventListener"in i?i.addEventListener("change",r):i.addListener(r),o.value=i.matches)});return pi(()=>{a(),s(),i=void 0}),o}function zr(e,t={}){const{controls:n=!1,navigator:l=Oa}=t,i=gi(()=>l&&"permissions"in l),o=Et(),r=typeof e=="string"?{name:e}:e,s=Et(),a=()=>{var u,d;s.value=(d=(u=o.value)==null?void 0:u.state)!=null?d:"prompt"};lt(o,"change",a);const c=_h(async()=>{if(i.value){if(!o.value)try{o.value=await l.permissions.query(r)}catch{o.value=void 0}finally{a()}if(n)return de(o.value)}});return c(),n?{state:s,isSupported:i,query:c}:s}function Lh(e={}){const{navigator:t=Oa,read:n=!1,source:l,copiedDuring:i=1500,legacy:o=!1}=e,r=gi(()=>t&&"clipboard"in t),s=zr("clipboard-read"),a=zr("clipboard-write"),c=I(()=>r.value||o),u=ae(""),d=ae(!1),h=wh(()=>d.value=!1,i);function m(){r.value&&C(s.value)?t.clipboard.readText().then(w=>{u.value=w}):u.value=T()}c.value&&n&<(["copy","cut"],m);async function b(w=ht(l)){c.value&&w!=null&&(r.value&&C(a.value)?await t.clipboard.writeText(w):y(w),u.value=w,d.value=!0,h.start())}function y(w){const g=document.createElement("textarea");g.value=w??"",g.style.position="absolute",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove()}function T(){var w,g,v;return(v=(g=(w=document==null?void 0:document.getSelection)==null?void 0:w.call(document))==null?void 0:g.toString())!=null?v:""}function C(w){return w==="granted"||w==="prompt"}return{isSupported:c,text:u,copied:d,copy:b}}const Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Tl="__vueuse_ssr_handlers__",Ch=Th();function Th(){return Tl in Cl||(Cl[Tl]=Cl[Tl]||{}),Cl[Tl]}function Ah(e,t){return Ch[e]||t}function Ph(e){return Po("(prefers-color-scheme: dark)",e)}function Oh(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Rh={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ur="vueuse-storage";function Oo(e,t,n,l={}){var i;const{flush:o="pre",deep:r=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:d=Kt,eventFilter:h,onError:m=S=>{console.error(S)},initOnMounted:b}=l,y=(u?Et:ae)(typeof t=="function"?t():t);if(!n)try{n=Ah("getDefaultStorage",()=>{var S;return(S=Kt)==null?void 0:S.localStorage})()}catch(S){m(S)}if(!n)return y;const T=ht(t),C=Oh(T),w=(i=l.serializer)!=null?i:Rh[C],{pause:g,resume:v}=Eh(y,()=>G(y.value),{flush:o,deep:r,eventFilter:h});d&&s&&Ao(()=>{n instanceof Storage?lt(d,"storage",E):lt(d,Ur,z),b&&E()}),b||E();function M(S,V){if(d){const k={key:e,oldValue:S,newValue:V,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",k):new CustomEvent(Ur,{detail:k}))}}function G(S){try{const V=n.getItem(e);if(S==null)M(V,null),n.removeItem(e);else{const k=w.write(S);V!==k&&(n.setItem(e,k),M(V,k))}}catch(V){m(V)}}function D(S){const V=S?S.newValue:n.getItem(e);if(V==null)return a&&T!=null&&n.setItem(e,w.write(T)),T;if(!S&&c){const k=w.read(V);return typeof c=="function"?c(k,T):C==="object"&&!Array.isArray(k)?{...T,...k}:k}else return typeof V!="string"?V:w.read(V)}function E(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){y.value=T;return}if(!(S&&S.key!==e)){g();try{(S==null?void 0:S.newValue)!==w.write(y.value)&&(y.value=D(S))}catch(V){m(V)}finally{S?On(v):v()}}}}function z(S){E(S.detail)}return y}function Ih(e,t,n={}){const{window:l=Kt,...i}=n;let o;const r=gi(()=>l&&"ResizeObserver"in l),s=()=>{o&&(o.disconnect(),o=void 0)},a=I(()=>{const d=ht(e);return Array.isArray(d)?d.map(h=>rn(h)):[rn(d)]}),c=He(a,d=>{if(s(),r.value&&l){o=new ResizeObserver(t);for(const h of d)h&&o.observe(h,i)}},{immediate:!0,flush:"post"}),u=()=>{s(),c()};return pi(u),{isSupported:r,stop:u}}function Dh(e,t={width:0,height:0},n={}){const{window:l=Kt,box:i="content-box"}=n,o=I(()=>{var d,h;return(h=(d=rn(e))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=ae(t.width),s=ae(t.height),{stop:a}=Ih(e,([d])=>{const h=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(l&&o.value){const m=rn(e);if(m){const b=m.getBoundingClientRect();r.value=b.width,s.value=b.height}}else if(h){const m=Array.isArray(h)?h:[h];r.value=m.reduce((b,{inlineSize:y})=>b+y,0),s.value=m.reduce((b,{blockSize:y})=>b+y,0)}else r.value=d.contentRect.width,s.value=d.contentRect.height},n);Ao(()=>{const d=rn(e);d&&(r.value="offsetWidth"in d?d.offsetWidth:t.width,s.value="offsetHeight"in d?d.offsetHeight:t.height)});const c=He(()=>rn(e),d=>{r.value=d?t.width:0,s.value=d?t.height:0});function u(){a(),c()}return{width:r,height:s,stop:u}}function Mh(e={}){const{window:t=Kt,behavior:n="auto"}=e;if(!t)return{x:ae(0),y:ae(0)};const l=ae(t.scrollX),i=ae(t.scrollY),o=I({get(){return l.value},set(s){scrollTo({left:s,behavior:n})}}),r=I({get(){return i.value},set(s){scrollTo({top:s,behavior:n})}});return lt(t,"scroll",()=>{l.value=t.scrollX,i.value=t.scrollY},{capture:!1,passive:!0}),{x:o,y:r}}function Nh(e={}){const{window:t=Kt,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:l=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:r="inner"}=e,s=ae(n),a=ae(l),c=()=>{t&&(r==="outer"?(s.value=t.outerWidth,a.value=t.outerHeight):o?(s.value=t.innerWidth,a.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight))};if(c(),Ao(c),lt("resize",c,{passive:!0}),i){const u=Po("(orientation: portrait)");He(u,()=>c())}return{width:s,height:a}}const Wr=async(e,t)=>{const{path:n,query:l}=e.currentRoute.value,{scrollBehavior:i}=e.options;e.options.scrollBehavior=void 0,await e.replace({path:n,query:l,hash:t}),e.options.scrollBehavior=i},Hh=({headerLinkSelector:e,headerAnchorSelector:t,delay:n,offset:l=5})=>{const i=Qt();lt("scroll",yh(()=>{var b,y;const r=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(r-0)d.some(C=>C.hash===T.hash));for(let T=0;T=(((b=C.parentElement)==null?void 0:b.offsetTop)??0)-l,v=!w||r<(((y=w.parentElement)==null?void 0:y.offsetTop)??0)-l;if(!(g&&v))continue;const G=decodeURIComponent(i.currentRoute.value.hash),D=decodeURIComponent(C.hash);if(G===D)return;if(u){for(let E=T+1;E{if(t===!1)return[];const[n,l]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t,i=e.filter(r=>r.level>=n&&r.level<=l),o=[];e:for(let r=0;r=0;a--){const c=i[a];if(c.level{let n;if(t.length){const l=e.cloneNode(!0);l.querySelectorAll(t.join(",")).forEach(i=>{i.remove()}),n=l.textContent||""}else n=e.textContent||"";return n.trim()},Kh=({selector:e=[...new Array(6)].map((l,i)=>`[vp-content] h${i+1}`).join(","),levels:t=2,ignore:n=[]}={})=>{const l=Array.from(document.querySelectorAll(e)).filter(i=>i.id&&i.hasChildNodes()).map(i=>{const o=Number(i.tagName[1]);return{element:i,title:Wh(i,n),link:`#${i.id}`,slug:i.id,level:o}});return Uh(l,t)},Ra=(e,t)=>{var l;const n=(l=ai())==null?void 0:l.appContext.components;return n?e in n||Qe(e)in n||cl(Qe(e))in n:!1},Ia=e=>new Promise(t=>{setTimeout(t,e)}),Da=e=>{const t=In();return I(()=>e[t.value]??{})},qh=()=>{const e=ah();return I(()=>Object.keys(e.value))},Gh=e=>typeof e<"u",Ma=(e,t)=>at(e)&&e.startsWith(t),{keys:Jh}=Object,Na=e=>Ma(e,"/");var Qh={"/":{backToTop:"Back to top"}};const Yh=fe({name:"BackToTop",setup(){const e=pt(),t=Da(Qh),n=Et(),{height:l}=Dh(n),{height:i}=Nh(),{y:o}=Mh(),r=I(()=>e.value.backToTop!==!1&&o.value>100),s=I(()=>o.value/(l.value-i.value)*100);return ze(()=>{n.value=document.body}),()=>se(bo,{name:"back-to-top"},()=>r.value?se("button",{type:"button",class:"vp-back-to-top-button","aria-label":t.value.backToTop,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})}},[se("span",{class:"vp-scroll-progress",role:"progressbar","aria-labelledby":"loadinglabel","aria-valuenow":s.value},se("svg",se("circle",{cx:"26",cy:"26",r:"24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-dasharray":`${Math.PI*s.value*.48} ${Math.PI*(100-s.value)*.48}`}))),se("div",{class:"back-to-top-icon"})]):null)}}),Zh=gt({rootComponents:[Yh]}),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"})),ep=gt({setup(){lt("beforeprint",()=>{document.querySelectorAll("details").forEach(e=>{e.open=!0})})}}),tp=Object.freeze(Object.defineProperty({__proto__:null,default:ep},Symbol.toStringTag,{value:"Module"}));/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var nn=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},l=window.Promise||function(k){function N(){}k(N,N)},i=function(k){var N=k.target;if(N===z){b();return}g.indexOf(N)!==-1&&y({target:N})},o=function(){if(!(M||!E.original)){var k=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(G-k)>D.scrollOffset&&setTimeout(b,150)}},r=function(k){var N=k.key||k.keyCode;(N==="Escape"||N==="Esc"||N===27)&&b()},s=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=k;if(k.background&&(z.style.background=k.background),k.container&&k.container instanceof Object&&(N.container=nn({},D.container,k.container)),k.template){var X=Hl(k.template)?k.template:document.querySelector(k.template);N.template=X}return D=nn({},D,N),g.forEach(function(re){re.dispatchEvent(mn("medium-zoom:update",{detail:{zoom:S}}))}),S},a=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(nn({},D,k))},c=function(){for(var k=arguments.length,N=Array(k),X=0;X0?N.reduce(function(R,Q){return[].concat(R,qr(Q))},[]):g;return re.forEach(function(R){R.classList.remove("medium-zoom-image"),R.dispatchEvent(mn("medium-zoom:detach",{detail:{zoom:S}}))}),g=g.filter(function(R){return re.indexOf(R)===-1}),S},d=function(k,N){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(re){re.addEventListener("medium-zoom:"+k,N,X)}),v.push({type:"medium-zoom:"+k,listener:N,options:X}),S},h=function(k,N){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(re){re.removeEventListener("medium-zoom:"+k,N,X)}),v=v.filter(function(re){return!(re.type==="medium-zoom:"+k&&re.listener.toString()===N.toString())}),S},m=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=k.target,X=function(){var R={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},Q=void 0,W=void 0;if(D.container)if(D.container instanceof Object)R=nn({},R,D.container),Q=R.width-R.left-R.right-D.margin*2,W=R.height-R.top-R.bottom-D.margin*2;else{var ye=Hl(D.container)?D.container:document.querySelector(D.container),Ne=ye.getBoundingClientRect(),Ge=Ne.width,Fe=Ne.height,It=Ne.left,Dt=Ne.top;R=nn({},R,{width:Ge,height:Fe,left:It,top:Dt})}Q=Q||R.width-D.margin*2,W=W||R.height-D.margin*2;var mt=E.zoomedHd||E.original,Je=Kr(mt)?Q:mt.naturalWidth||Q,L=Kr(mt)?W:mt.naturalHeight||W,U=mt.getBoundingClientRect(),j=U.top,J=U.left,ce=U.width,me=U.height,f=Math.min(Math.max(ce,Je),Q)/ce,p=Math.min(Math.max(me,L),W)/me,_=Math.min(f,p),A=(-J+(Q-ce)/2+D.margin+R.left)/_,x=(-j+(W-me)/2+D.margin+R.top)/_,P="scale("+_+") translate3d("+A+"px, "+x+"px, 0)";E.zoomed.style.transform=P,E.zoomedHd&&(E.zoomedHd.style.transform=P)};return new l(function(re){if(N&&g.indexOf(N)===-1){re(S);return}var R=function Ge(){M=!1,E.zoomed.removeEventListener("transitionend",Ge),E.original.dispatchEvent(mn("medium-zoom:opened",{detail:{zoom:S}})),re(S)};if(E.zoomed){re(S);return}if(N)E.original=N;else if(g.length>0){var Q=g;E.original=Q[0]}else{re(S);return}if(E.original.dispatchEvent(mn("medium-zoom:open",{detail:{zoom:S}})),G=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,E.zoomed=ip(E.original),document.body.appendChild(z),D.template){var W=Hl(D.template)?D.template:document.querySelector(D.template);E.template=document.createElement("div"),E.template.appendChild(W.content.cloneNode(!0)),document.body.appendChild(E.template)}if(E.original.parentElement&&E.original.parentElement.tagName==="PICTURE"&&E.original.currentSrc&&(E.zoomed.src=E.original.currentSrc),document.body.appendChild(E.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),E.original.classList.add("medium-zoom-image--hidden"),E.zoomed.classList.add("medium-zoom-image--opened"),E.zoomed.addEventListener("click",b),E.zoomed.addEventListener("transitionend",R),E.original.getAttribute("data-zoom-src")){E.zoomedHd=E.zoomed.cloneNode(),E.zoomedHd.removeAttribute("srcset"),E.zoomedHd.removeAttribute("sizes"),E.zoomedHd.removeAttribute("loading"),E.zoomedHd.src=E.zoomed.getAttribute("data-zoom-src"),E.zoomedHd.onerror=function(){clearInterval(ye),console.warn("Unable to reach the zoom image target "+E.zoomedHd.src),E.zoomedHd=null,X()};var ye=setInterval(function(){E.zoomedHd.complete&&(clearInterval(ye),E.zoomedHd.classList.add("medium-zoom-image--opened"),E.zoomedHd.addEventListener("click",b),document.body.appendChild(E.zoomedHd),X())},10)}else if(E.original.hasAttribute("srcset")){E.zoomedHd=E.zoomed.cloneNode(),E.zoomedHd.removeAttribute("sizes"),E.zoomedHd.removeAttribute("loading");var Ne=E.zoomedHd.addEventListener("load",function(){E.zoomedHd.removeEventListener("load",Ne),E.zoomedHd.classList.add("medium-zoom-image--opened"),E.zoomedHd.addEventListener("click",b),document.body.appendChild(E.zoomedHd),X()})}else X()})},b=function(){return new l(function(k){if(M||!E.original){k(S);return}var N=function X(){E.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(E.zoomed),E.zoomedHd&&document.body.removeChild(E.zoomedHd),document.body.removeChild(z),E.zoomed.classList.remove("medium-zoom-image--opened"),E.template&&document.body.removeChild(E.template),M=!1,E.zoomed.removeEventListener("transitionend",X),E.original.dispatchEvent(mn("medium-zoom:closed",{detail:{zoom:S}})),E.original=null,E.zoomed=null,E.zoomedHd=null,E.template=null,k(S)};M=!0,document.body.classList.remove("medium-zoom--opened"),E.zoomed.style.transform="",E.zoomedHd&&(E.zoomedHd.style.transform=""),E.template&&(E.template.style.transition="opacity 150ms",E.template.style.opacity=0),E.original.dispatchEvent(mn("medium-zoom:close",{detail:{zoom:S}})),E.zoomed.addEventListener("transitionend",N)})},y=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=k.target;return E.original?b():m({target:N})},T=function(){return D},C=function(){return g},w=function(){return E.original},g=[],v=[],M=!1,G=0,D=n,E={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&c(t),D=nn({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var z=lp(D.background);document.addEventListener("click",i),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",b);var S={open:m,close:b,toggle:y,update:s,clone:a,attach:c,detach:u,on:d,off:h,getOptions:T,getImages:C,getZoomedImage:w};return S};function rp(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var sp=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";rp(sp);const ap=Symbol("mediumZoom");var cp={};const up="[vp-content] > img, [vp-content] :not(a) > img",dp=cp,fp=300,hp=gt({enhance({app:e,router:t}){const n=op(dp);n.refresh=(l=up)=>{n.detach(),n.attach(l)},e.provide(ap,n),t.afterEach(()=>{Ia(fp).then(()=>{n.refresh()})})}}),pp=Object.freeze(Object.defineProperty({__proto__:null,default:hp},Symbol.toStringTag,{value:"Module"}));/** + * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT + */const Gr=(e,t)=>{e.classList.add(t)},Jr=(e,t)=>{e.classList.remove(t)},gp=e=>{var t;(t=e==null?void 0:e.parentNode)==null||t.removeChild(e)},Ii=(e,t,n)=>en?n:e,Qr=e=>(-1+e)*100,mp=(()=>{const e=[],t=()=>{const n=e.shift();n&&n(t)};return n=>{e.push(n),e.length===1&&t()}})(),vp=e=>e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(t,n)=>n.toUpperCase()),Pl=(()=>{const e=["Webkit","O","Moz","ms"],t={},n=o=>{const{style:r}=document.body;if(o in r)return o;const s=o.charAt(0).toUpperCase()+o.slice(1);let a=e.length;for(;a--;){const c=`${e[a]}${s}`;if(c in r)return c}return o},l=o=>{const r=vp(o);return t[r]??(t[r]=n(r))},i=(o,r,s)=>{o.style[l(r)]=s};return(o,r)=>{for(const s in r){const a=r[s];Object.hasOwn(r,s)&&Gh(a)&&i(o,s,a)}}})(),Lt={minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'
    '},xe={percent:null,isRendered:()=>!!document.getElementById("nprogress"),set:e=>{const{speed:t,easing:n}=Lt,l=xe.isStarted(),i=Ii(e,Lt.minimum,1);xe.percent=i===1?null:i;const o=xe.render(!l),r=o.querySelector(Lt.barSelector);return o.offsetWidth,mp(s=>{Pl(r,{transform:`translate3d(${Qr(i)}%,0,0)`,transition:`all ${t}ms ${n}`}),i===1?(Pl(o,{transition:"none",opacity:"1"}),o.offsetWidth,setTimeout(()=>{Pl(o,{transition:`all ${t}ms linear`,opacity:"0"}),setTimeout(()=>{xe.remove(),s()},t)},t)):setTimeout(()=>{s()},t)}),xe},isStarted:()=>typeof xe.percent=="number",start:()=>{xe.percent||xe.set(0);const e=()=>{setTimeout(()=>{xe.percent&&(xe.trickle(),e())},Lt.trickleSpeed)};return e(),xe},done:e=>!e&&!xe.percent?xe:xe.increase(.3+.5*Math.random()).set(1),increase:e=>{let{percent:t}=xe;return t?(t=Ii(t+(typeof e=="number"?e:(1-t)*Ii(Math.random()*t,.1,.95)),0,.994),xe.set(t)):xe.start()},trickle:()=>xe.increase(Math.random()*Lt.trickleRate),render:e=>{if(xe.isRendered())return document.getElementById("nprogress");Gr(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=Lt.template;const n=t.querySelector(Lt.barSelector),l=document.querySelector(Lt.parent),i=e?"-100":Qr(xe.percent??0);return Pl(n,{transition:"all 0 linear",transform:`translate3d(${i}%,0,0)`}),l&&(l!==document.body&&Gr(l,"nprogress-custom-parent"),l.appendChild(t)),t},remove:()=>{Jr(document.documentElement,"nprogress-busy"),Jr(document.querySelector(Lt.parent),"nprogress-custom-parent"),gp(document.getElementById("nprogress"))}},_p=()=>{ze(()=>{const e=Qt(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||xe.start()}),e.afterEach(n=>{t.add(n.path),xe.done()})})},bp=gt({setup(){_p()}}),yp=Object.freeze(Object.defineProperty({__proto__:null,default:bp},Symbol.toStringTag,{value:"Module"})),kp="VUEPRESS_CODE_TAB_STORE",Ol=Oo(kp,{}),Ep=fe({name:"CodeTabs",props:{active:{type:Number,default:0},data:{type:Array,required:!0},id:{type:String,required:!0},tabId:{type:String,default:""}},slots:Object,setup(e,{slots:t}){const n=ae(e.active),l=Et([]),i=()=>{e.tabId&&(Ol.value[e.tabId]=e.data[n.value].id)},o=(c=n.value)=>{n.value=c{n.value=c>0?c-1:l.value.length-1,l.value[n.value].focus()},s=(c,u)=>{c.key===" "||c.key==="Enter"?(c.preventDefault(),n.value=u):c.key==="ArrowRight"?(c.preventDefault(),o()):c.key==="ArrowLeft"&&(c.preventDefault(),r()),e.tabId&&(Ol.value[e.tabId]=e.data[n.value].id)},a=()=>{if(e.tabId){const c=e.data.findIndex(({id:u})=>Ol.value[e.tabId]===u);if(c!==-1)return c}return e.active};return ze(()=>{n.value=a(),He(()=>Ol.value[e.tabId],(c,u)=>{if(e.tabId&&c!==u){const d=e.data.findIndex(({id:h})=>h===c);d!==-1&&(n.value=d)}})}),()=>e.data.length?se("div",{class:"vp-code-tabs"},[se("div",{class:"vp-code-tabs-nav",role:"tablist"},e.data.map(({id:c},u)=>{const d=u===n.value;return se("button",{type:"button",ref:h=>{h&&(l.value[u]=h)},class:["vp-code-tab-nav",{active:d}],role:"tab","aria-controls":`codetab-${e.id}-${u}`,"aria-selected":d,onClick:()=>{n.value=u,i()},onKeydown:h=>{s(h,u)}},t[`title${u}`]({value:c,isActive:d}))})),e.data.map(({id:c},u)=>{const d=u===n.value;return se("div",{class:["vp-code-tab",{active:d}],id:`codetab-${e.id}-${u}`,role:"tabpanel","aria-expanded":d},[se("div",{class:"vp-code-tab-title"},t[`title${u}`]({value:c,isActive:d})),t[`tab${u}`]({value:c,isActive:d})])})]):null}}),wp="VUEPRESS_TAB_STORE",Di=Oo(wp,{}),xp=fe({name:"Tabs",props:{active:{type:Number,default:0},data:{type:Array,required:!0},id:{type:String,required:!0},tabId:{type:String,default:""}},slots:Object,setup(e,{slots:t}){const n=ae(e.active),l=Et([]),i=()=>{e.tabId&&(Di.value[e.tabId]=e.data[n.value].id)},o=(c=n.value)=>{n.value=c{n.value=c>0?c-1:l.value.length-1,l.value[n.value].focus()},s=(c,u)=>{c.key===" "||c.key==="Enter"?(c.preventDefault(),n.value=u):c.key==="ArrowRight"?(c.preventDefault(),o()):c.key==="ArrowLeft"&&(c.preventDefault(),r()),i()},a=()=>{if(e.tabId){const c=e.data.findIndex(({id:u})=>Di.value[e.tabId]===u);if(c!==-1)return c}return e.active};return ze(()=>{n.value=a(),He(()=>Di.value[e.tabId],(c,u)=>{if(e.tabId&&c!==u){const d=e.data.findIndex(({id:h})=>h===c);d!==-1&&(n.value=d)}})}),()=>e.data.length?se("div",{class:"vp-tabs"},[se("div",{class:"vp-tabs-nav",role:"tablist"},e.data.map(({id:c},u)=>{const d=u===n.value;return se("button",{type:"button",ref:h=>{h&&(l.value[u]=h)},class:["vp-tab-nav",{active:d}],role:"tab","aria-controls":`tab-${e.id}-${u}`,"aria-selected":d,onClick:()=>{n.value=u,i()},onKeydown:h=>{s(h,u)}},t[`title${u}`]({value:c,isActive:d}))})),e.data.map(({id:c},u)=>{const d=u===n.value;return se("div",{class:["vp-tab",{active:d}],id:`tab-${e.id}-${u}`,role:"tabpanel","aria-expanded":d},[se("div",{class:"vp-tab-title"},t[`title${u}`]({value:c,isActive:d})),t[`tab${u}`]({value:c,isActive:d})])})]):null}}),Sp={enhance:({app:e})=>{e.component("CodeTabs",Ep),e.component("Tabs",xp)}},Lp=Object.freeze(Object.defineProperty({__proto__:null,default:Sp},Symbol.toStringTag,{value:"Module"})),Cp=JSON.parse(`{"repo":"zachowj/node-red-contrib-home-assistant-websocket","repoLabel":"Github","docsDir":"docs","docsBranch":"main","editLinkText":"Help us improve this page!","navbar":[{"text":"Guides","link":"/guide/"},{"text":"Nodes","link":"/node/"},{"text":"FAQ","link":"/FAQ.md"},{"text":"Cookbook","link":"/cookbook/"},{"text":"Scrubber","link":"/scrubber/"},{"text":"Discussions","link":"https://github.com/zachowj/node-red-contrib-home-assistant-websocket/discussions"},{"text":"Discord","link":"https://discord.gg/QNdsZgNBnU"}],"sidebar":{"/cookbook/":[{"text":"Cookbook","collapsible":false,"children":[{"text":"JSONata","collapsible":false,"children":["/cookbook/jsonata/call-service","/cookbook/jsonata/change-node","/cookbook/jsonata/current-state","/cookbook/jsonata/events-state","/cookbook/jsonata/functions","/cookbook/jsonata/sensor","/cookbook/jsonata/switch-node","/cookbook/jsonata/trigger-state"]},"/cookbook/motion-triggered-light","/cookbook/saving-and-restoring-states","/cookbook/get-state_changed-events-based-on-area","/cookbook/sun-events","/cookbook/vacation-mode","/cookbook/expiration-date-monitor","/cookbook/using-date-and-time-entities-to-trigger-flows","/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours","/cookbook/starting-flow-after-home-assistant-restart","/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled","/cookbook/actionable-notifications-subflow-for-android"]}],"/guide/":[{"text":"Guides","collapsible":false,"children":["/guide/","/guide/first-automation","/guide/action","/guide/conditionals","/guide/mustache-templates",{"text":"JSONata","collapsible":false,"children":["/guide/jsonata/","/guide/jsonata/jsonata-primer"]},"/guide/diagnostics"]},{"text":"Custom Integration","collapsible":false,"children":["/guide/custom_integration/","/guide/custom_integration/exposed-nodes"]},{"text":"Contribute to","collapsible":false,"children":["/guide/development","/guide/documentation"]}],"/node/":[{"text":"Config Nodes","collapsible":true,"children":["device-config","entity-config","config-server"]},{"text":"General Nodes","collapsible":true,"children":["action","API","current-state","device","events-all","events-calendar","events-state","fire-event","get-entities","get-history","poll-state","render-template","sentence","tag","time","trigger-state","wait-until","webhook","zone"]},{"text":"Entity Nodes","collapsible":true,"children":["binary-sensor","button","entity","number","select","sensor","switch","text",{"text":"Time","link":"time-entity"},"update-config"]}]},"locales":{"/":{"selectLanguageName":"English"}},"colorMode":"auto","colorModeSwitch":true,"logo":null,"selectLanguageText":"Languages","selectLanguageAriaLabel":"Select language","sidebarDepth":2,"editLink":true,"lastUpdated":true,"lastUpdatedText":"Last Updated","contributors":true,"contributorsText":"Contributors","notFound":["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],"backToHome":"Take me home","openInNewWindow":"open in new window","toggleColorMode":"toggle color mode","toggleSidebar":"toggle sidebar"}`),Tp=ae(Cp),Ha=()=>Tp,Fa=Symbol(""),Ap=()=>{const e=qe(Fa);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Pp=(e,t)=>{const{locales:n,...l}=e;return{...l,...n==null?void 0:n[t]}},Op=gt({enhance({app:e}){const t=Ha(),n=e._context.provides[wo],l=I(()=>Pp(t.value,n.routeLocale.value));e.provide(Fa,l),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return l.value}}})}}),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:Op},Symbol.toStringTag,{value:"Module"})),Ip=()=>Ha(),Ie=()=>Ap(),Va=Symbol(""),Dp=e=>{const t=(n=e.value)=>{const l=window.document.documentElement;l.dataset.theme=n?"dark":"light"};ze(()=>{He(e,t,{immediate:!0})}),ri(()=>{t()})},Ro=()=>{const e=qe(Va);if(!e)throw new Error("useDarkMode() is called without provider.");return e},Mp=()=>{const e=Ie(),t=Ph(),n=Oo("vuepress-color-scheme",e.value.colorMode),l=I({get(){return e.value.colorModeSwitch?n.value==="auto"?t.value:n.value==="dark":e.value.colorMode==="dark"},set(i){i===t.value?n.value="auto":n.value=i?"dark":"light"}});dn(Va,l),Dp(l)};let Mi=null,$n=null;const Np={wait:()=>Mi,pending:()=>{Mi=new Promise(e=>{$n=e})},resolve:()=>{$n==null||$n(),Mi=null,$n=null}},$a=()=>Np,Pn=(e,t)=>{const{notFound:n,meta:l,path:i}=ol(e,t);return n?{text:i,link:i}:{text:l.title||i,link:i}},Yr=e=>decodeURI(e).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Hp=(e,t)=>{if(t.hash===e)return!0;const n=Yr(t.path),l=Yr(e);return n===l},ja=(e,t)=>e.link&&Hp(e.link,t)?!0:"children"in e?e.children.some(n=>ja(n,t)):!1,Ba=e=>!Vd(e)&&!vl(e),za=e=>!ui(e)||e.includes("github.com")?"GitHub":e.includes("bitbucket.org")?"Bitbucket":e.includes("gitlab.com")?"GitLab":e.includes("gitee.com")?"Gitee":null,Fp={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},Vp=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;const n=za(e);return n!==null?Fp[n]:null},$p=({docsRepo:e,docsBranch:t,docsDir:n,filePathRelative:l,editLinkPattern:i})=>{if(!l)return null;const o=Vp({docsRepo:e,editLinkPattern:i});return o?o.replace(/:repo/,ui(e)?e:`https://github.com/${e}`).replace(/:branch/,t).replace(/:path/,ga(`${pa(n)}/${l}`)):null},Cn=(e="",t="")=>Na(t)||vl(t)?t:`${Gd(e)}${t}`,Fl=ae([]),jp=()=>{const e=Qt(),t=Ie(),n=pt(),l=I(()=>n.value.sidebarDepth??t.value.sidebarDepth??2);e.beforeEach((o,r)=>{o.path!==r.path&&(Fl.value=[])});const i=()=>{if(l.value<=0){Fl.value=[];return}Fl.value=Kh({levels:[2,l.value+1],ignore:[".vp-badge"]})};He(l,i),ze(i)},Bp=()=>Fl,zp=e=>({text:e.title,link:e.link,children:Io(e.children)}),Io=e=>e?e.map(t=>zp(t)):[],Ua=(e,t)=>[{text:e.title,children:Io(t)}],Wa=(e,t,n,l="")=>{const i=(o,r)=>{var a;const s=at(o)?Pn(Cn(r,o)):at(o.link)?{...o,link:Ba(o.link)?Pn(Cn(r,o.link)).link:o.link}:o;if("children"in s)return{...s,children:s.children.map(c=>i(c,Cn(r,s.prefix)))};if(s.link===n){const c=((a=t[0])==null?void 0:a.level)===1?t[0].children:t;return{...s,children:Io(c)}}return s};return e.map(o=>i(o,l))},Up=(e,t,n,l)=>{const i=Jh(e).sort((o,r)=>r.length-o.length);for(const o of i)if(Ma(decodeURI(l),o)){const r=e[o];return r?r==="heading"?Ua(t,n):Wa(r,n,l,o):[]}return console.warn(`${decodeURI(l)} is missing sidebar config.`),[]},Ka=Symbol("sidebarItems"),Do=()=>{const e=qe(Ka);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},Wp=(e,t,n,l,i)=>e===!1?[]:e==="heading"?Ua(t,i):Array.isArray(e)?Wa(e,i,n,l):yo(e)?Up(e,t,i,n):[],Kp=()=>{const e=Ie(),t=pt(),n=Rn(),l=Rt(),i=In(),o=Bp(),r=I(()=>t.value.home?!1:t.value.sidebar??e.value.sidebar??"heading"),s=I(()=>Wp(r.value,n.value,l.path,i.value,o.value));dn(Ka,s)},qp=fe({__name:"Badge",props:{type:{default:"tip"},text:{default:""},vertical:{default:void 0}},setup(e,{expose:t}){t();const n={};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),we=(e,t)=>{const n=e.__vccOpts||e;for(const[l,i]of t)n[l]=i;return n};function Gp(e,t,n,l,i,o){return q(),te("span",{class:nt(["vp-badge",n.type]),style:ul({verticalAlign:n.vertical})},[Le(e.$slots,"default",{},()=>[Wt(Se(n.text),1)])],6)}const Jp=we(qp,[["render",Gp],["__file","Badge.vue"]]),Qp=fe({__name:"VPHomeFeatures",setup(e,{expose:t}){t();const n=pt(),l=I(()=>n.value.features??[]),i={frontmatter:n,features:l};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}}),Yp={key:0,class:"vp-features"};function Zp(e,t,n,l,i,o){return l.features.length?(q(),te("div",Yp,[(q(!0),te(be,null,zt(l.features,r=>(q(),te("div",{key:r.title,class:"vp-feature"},[le("h2",null,Se(r.title),1),le("p",null,Se(r.details),1)]))),128))])):Pe("",!0)}const Xp=we(Qp,[["render",Zp],["__file","VPHomeFeatures.vue"]]),eg=fe({__name:"VPHomeFooter",setup(e,{expose:t}){t();const n=pt(),l=I(()=>n.value.footer),i=I(()=>n.value.footerHtml),o={frontmatter:n,footer:l,footerHtml:i};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),tg=["innerHTML"],ng=["textContent"];function lg(e,t,n,l,i,o){return l.footer?(q(),te(be,{key:0},[l.footerHtml?(q(),te("div",{key:0,class:"vp-footer","vp-footer":"",innerHTML:l.footer},null,8,tg)):(q(),te("div",{key:1,class:"vp-footer","vp-footer":"",textContent:Se(l.footer)},null,8,ng))],64)):Pe("",!0)}const ig=we(eg,[["render",lg],["__file","VPHomeFooter.vue"]]),og=fe({__name:"VPHomeHero",setup(e,{expose:t}){t();const n=pt(),l=xo(),i=Ro(),o=I(()=>n.value.heroText===null?null:n.value.heroText||l.value.title||"Hello"),r=I(()=>n.value.tagline===null?null:n.value.tagline||l.value.description||"Welcome to your VuePress site"),s=I(()=>i.value&&n.value.heroImageDark!==void 0?n.value.heroImageDark:n.value.heroImage),a=I(()=>n.value.heroAlt||o.value||"hero"),c=I(()=>n.value.heroHeight??280),u=I(()=>Array.isArray(n.value.actions)?n.value.actions.map(({text:m,link:b,type:y="primary"})=>({text:m,link:b,type:y})):[]),h={frontmatter:n,siteLocale:l,isDarkMode:i,heroText:o,tagline:r,heroImage:s,heroAlt:a,heroHeight:c,actions:u,HomeHeroImage:()=>{if(!s.value)return null;const m=se("img",{class:"vp-hero-image",src:Co(s.value),alt:a.value,height:c.value});return n.value.heroImageDark===void 0?m:se(So,()=>m)},get AutoLink(){return Dn}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),rg={class:"vp-hero"},sg={key:0,id:"main-title"},ag={key:1,class:"vp-hero-description"},cg={key:2,class:"vp-hero-actions"};function ug(e,t,n,l,i,o){return q(),te("header",rg,[oe(l.HomeHeroImage),l.heroText?(q(),te("h1",sg,Se(l.heroText),1)):Pe("",!0),l.tagline?(q(),te("p",ag,Se(l.tagline),1)):Pe("",!0),l.actions.length?(q(),te("p",cg,[(q(!0),te(be,null,zt(l.actions,r=>(q(),Ce(l.AutoLink,{key:r.text,class:nt(["vp-hero-action-button",[r.type]]),config:r},null,8,["class","config"]))),128))])):Pe("",!0)])}const dg=we(og,[["render",ug],["__file","VPHomeHero.vue"]]),fg=fe({__name:"VPHome",setup(e,{expose:t}){t();const n={VPHomeFeatures:Xp,VPHomeFooter:ig,VPHomeHero:dg,get Content(){return Lo}};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),hg={class:"vp-home"},pg={class:"theme-default-content","vp-content":""};function gg(e,t,n,l,i,o){return q(),te("main",hg,[oe(l.VPHomeHero),oe(l.VPHomeFeatures),le("div",pg,[oe(l.Content)]),oe(l.VPHomeFooter)])}const mg=we(fg,[["render",gg],["__file","VPHome.vue"]]),vg=fe({__name:"VPNavbarBrand",setup(e,{expose:t}){t();const n=In(),l=xo(),i=Ie(),o=Ro(),r=I(()=>i.value.home||n.value),s=I(()=>l.value.title),a=I(()=>o.value&&i.value.logoDark!==void 0?i.value.logoDark:i.value.logo),c=I(()=>i.value.logoAlt??s.value),u=I(()=>s.value.toLocaleUpperCase().trim()===c.value.toLocaleUpperCase().trim()),h={routeLocale:n,siteLocale:l,themeLocale:i,isDarkMode:o,navbarBrandLink:r,navbarBrandTitle:s,navbarBrandLogo:a,navbarBrandLogoAlt:c,navBarLogoAltMatchesTitle:u,NavbarBrandLogo:()=>{if(!a.value)return null;const m=se("img",{class:"vp-site-logo",src:Co(a.value),alt:c.value});return i.value.logoDark===void 0?m:se(So,()=>m)},get RouteLink(){return hi}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),_g=["aria-hidden"];function bg(e,t,n,l,i,o){return q(),Ce(l.RouteLink,{to:l.navbarBrandLink},{default:Ae(()=>[oe(l.NavbarBrandLogo),l.navbarBrandTitle?(q(),te("span",{key:0,class:nt(["vp-site-name",{"vp-hide-mobile":l.navbarBrandLogo}]),"aria-hidden":l.navBarLogoAltMatchesTitle},Se(l.navbarBrandTitle),11,_g)):Pe("",!0)]),_:1},8,["to"])}const yg=we(vg,[["render",bg],["__file","VPNavbarBrand.vue"]]),kg=fe({__name:"VPDropdownTransition",setup(e,{expose:t}){t();const i={setHeight:o=>{o.style.height=`${o.scrollHeight}px`},unsetHeight:o=>{o.style.height=""}};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function Eg(e,t,n,l,i,o){return q(),Ce(bo,{name:"vp-dropdown",onEnter:l.setHeight,onAfterEnter:l.unsetHeight,onBeforeLeave:l.setHeight},{default:Ae(()=>[Le(e.$slots,"default")]),_:3})}const qa=we(kg,[["render",Eg],["__file","VPDropdownTransition.vue"]]),wg=fe({__name:"VPNavbarDropdown",props:{item:{}},setup(e,{expose:t}){t();const n=e,{item:l}=uo(n),i=Rt(),o=ae(!1),r=I(()=>l.value.ariaLabel||l.value.text),s=(u,d)=>d[d.length-1]===u,a=u=>{const d=u.detail===0;o.value=d?!o.value:!1};He(()=>i.path,()=>{o.value=!1});const c={props:n,item:l,route:i,open:o,dropdownAriaLabel:r,isLastItemOfArray:s,handleDropdown:a,VPDropdownTransition:qa,get AutoLink(){return Dn}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),xg=["aria-label"],Sg={class:"title"},Lg=["aria-label"],Cg={class:"title"},Tg={class:"vp-navbar-dropdown"},Ag={class:"vp-navbar-dropdown-subtitle"},Pg={key:1},Og={class:"vp-navbar-dropdown-subitem-wrapper"};function Rg(e,t,n,l,i,o){return q(),te("div",{class:nt(["vp-navbar-dropdown-wrapper",{open:l.open}])},[le("button",{class:"vp-navbar-dropdown-title",type:"button","aria-label":l.dropdownAriaLabel,onClick:l.handleDropdown},[le("span",Sg,Se(l.item.text),1),t[1]||(t[1]=le("span",{class:"arrow down"},null,-1))],8,xg),le("button",{class:"vp-navbar-dropdown-title-mobile",type:"button","aria-label":l.dropdownAriaLabel,onClick:t[0]||(t[0]=r=>l.open=!l.open)},[le("span",Cg,Se(l.item.text),1),le("span",{class:nt(["arrow",l.open?"down":"right"])},null,2)],8,Lg),oe(l.VPDropdownTransition,null,{default:Ae(()=>[Ul(le("ul",Tg,[(q(!0),te(be,null,zt(l.item.children,r=>(q(),te("li",{key:r.text,class:"vp-navbar-dropdown-item"},["children"in r?(q(),te(be,{key:0},[le("h4",Ag,[r.link?(q(),Ce(l.AutoLink,{key:0,config:r,onFocusout:s=>l.isLastItemOfArray(r,l.item.children)&&r.children.length===0&&(l.open=!1)},null,8,["config","onFocusout"])):(q(),te("span",Pg,Se(r.text),1))]),le("ul",Og,[(q(!0),te(be,null,zt(r.children,s=>(q(),te("li",{key:s.link,class:"vp-navbar-dropdown-subitem"},[oe(l.AutoLink,{config:s,onFocusout:a=>l.isLastItemOfArray(s,r.children)&&l.isLastItemOfArray(r,l.item.children)&&(l.open=!1)},null,8,["config","onFocusout"])]))),128))])],64)):(q(),Ce(l.AutoLink,{key:1,config:r,onFocusout:s=>l.isLastItemOfArray(r,l.item.children)&&(l.open=!1)},null,8,["config","onFocusout"]))]))),128))],512),[[Jl,l.open]])]),_:1})],2)}const Ig=we(wg,[["render",Rg],["__file","VPNavbarDropdown.vue"]]),Ga=(e,t="")=>at(e)?Pn(Cn(t,e)):"children"in e?{...e,children:e.children.map(n=>Ga(n,Cn(t,e.prefix)))}:{...e,link:Ba(e.link)?Pn(Cn(t,e.link)).link:e.link},Dg=()=>{const e=Ie();return I(()=>(e.value.navbar||[]).map(t=>Ga(t)))},Mg=()=>{const e=Ie(),t=I(()=>e.value.repo),n=I(()=>t.value?za(t.value):null),l=I(()=>t.value&&!ui(t.value)?`https://github.com/${t.value}`:t.value),i=I(()=>l.value?e.value.repoLabel?e.value.repoLabel:n.value===null?"Source":n.value:null);return I(()=>!l.value||!i.value?[]:[{text:i.value,link:l.value}])},Ng=()=>{const e=Rt(),t=qh(),n=In(),l=Ca(),i=xo(),o=Ip(),r=Ie();return I(()=>{const s=Object.keys(l.value.locales);if(s.length<2)return[];const a=e.path,c=e.fullPath;return[{text:`${r.value.selectLanguageText}`,ariaLabel:`${r.value.selectLanguageAriaLabel??r.value.selectLanguageText}`,children:s.map(d=>{var C,w;const h=((C=l.value.locales)==null?void 0:C[d])??{},m=((w=o.value.locales)==null?void 0:w[d])??{},b=`${h.lang}`,y=m.selectLanguageName??b;if(b===i.value.lang)return{text:y,activeMatch:".",link:e.fullPath};const T=a.replace(n.value,d);return{text:y,link:t.value.some(g=>g===T)?c.replace(a,T):m.home??d}})}]})},Hg="719px",Fg={mobile:Hg};var rl;(function(e){e.Mobile="mobile"})(rl||(rl={}));const Vg={[rl.Mobile]:Number.parseInt(Fg.mobile.replace("px",""),10)},Ja=(e,t)=>{const n=Vg[e];Number.isInteger(n)&&(lt("orientationchange",()=>{t(n)},!1),lt("resize",()=>{t(n)},!1),ze(()=>{t(n)}))},$g=fe({__name:"VPNavbarItems",setup(e,{expose:t}){t();const n=Dg(),l=Ng(),i=Mg(),o=ae(!1),r=I(()=>Ie().value.navbarLabel??"site navigation"),s=I(()=>[...n.value,...l.value,...i.value]);Ja(rl.Mobile,c=>{o.value=window.innerWidth(q(),te("div",{key:r.text,class:"vp-navbar-item"},["children"in r?(q(),Ce(l.VPNavbarDropdown,{key:0,class:nt({mobile:l.isMobile}),item:r},null,8,["class","item"])):(q(),Ce(l.AutoLink,{key:1,config:r},null,8,["config"]))]))),128))],8,jg)):Pe("",!0)}const Qa=we($g,[["render",Bg],["__file","VPNavbarItems.vue"]]),zg={},Ug={class:"dark-icon",viewBox:"0 0 32 32"};function Wg(e,t){return q(),te("svg",Ug,t[0]||(t[0]=[le("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1)]))}const Kg=we(zg,[["render",Wg],["__file","VPDarkIcon.vue"]]),qg={},Gg={class:"light-icon",viewBox:"0 0 32 32"};function Jg(e,t){return q(),te("svg",Gg,t[0]||(t[0]=[qu('',9)]))}const Qg=we(qg,[["render",Jg],["__file","VPLightIcon.vue"]]),Yg=fe({__name:"VPToggleColorModeButton",setup(e,{expose:t}){t();const n=Ie(),l=Ro(),o={themeLocale:n,isDarkMode:l,toggleColorMode:()=>{l.value=!l.value},VPDarkIcon:Kg,VPLightIcon:Qg};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),Zg=["title"];function Xg(e,t,n,l,i,o){return q(),te("button",{type:"button",class:"vp-toggle-color-mode-button",title:l.themeLocale.toggleColorMode,onClick:l.toggleColorMode},[Ul(oe(l.VPLightIcon,null,null,512),[[Jl,!l.isDarkMode]]),Ul(oe(l.VPDarkIcon,null,null,512),[[Jl,l.isDarkMode]])],8,Zg)}const em=we(Yg,[["render",Xg],["__file","VPToggleColorModeButton.vue"]]),tm=fe({__name:"VPToggleSidebarButton",emits:["toggle"],setup(e,{expose:t}){t();const l={themeLocale:Ie()};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),nm=["title"];function lm(e,t,n,l,i,o){return q(),te("div",{class:"vp-toggle-sidebar-button",title:l.themeLocale.toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:t[0]||(t[0]=r=>e.$emit("toggle"))},t[1]||(t[1]=[le("div",{class:"icon","aria-hidden":"true"},[le("span"),le("span"),le("span")],-1)]),8,nm)}const im=we(tm,[["render",lm],["__file","VPToggleSidebarButton.vue"]]),om=fe({__name:"VPNavbar",emits:["toggleSidebar"],setup(e,{expose:t}){t();const n=Ra("SearchBox")?po("SearchBox"):()=>null,l=Ie(),i=ae(null),o=ae(null),r=ae(0),s=I(()=>r.value?{maxWidth:`${r.value}px`}:{}),a=(u,d)=>{var b;const h=(b=u==null?void 0:u.ownerDocument.defaultView)==null?void 0:b.getComputedStyle(u,null)[d],m=Number.parseInt(h,10);return Number.isNaN(m)?0:m};Ja(rl.Mobile,u=>{var h;const d=a(i.value,"paddingLeft")+a(i.value,"paddingRight");window.innerWidthe.$emit("toggleSidebar"))}),le("span",sm,[oe(l.VPNavbarBrand)],512),le("div",{class:"vp-navbar-items-wrapper",style:ul(l.linksWrapperStyle)},[Le(e.$slots,"before"),oe(l.VPNavbarItems,{class:"vp-hide-mobile"}),Le(e.$slots,"after"),l.themeLocale.colorModeSwitch?(q(),Ce(l.VPToggleColorModeButton,{key:0})):Pe("",!0),oe(l.SearchBox)],4)],512)}const cm=we(om,[["render",am],["__file","VPNavbar.vue"]]),um={},dm={class:"edit-icon",viewBox:"0 0 1024 1024"};function fm(e,t){return q(),te("svg",dm,t[0]||(t[0]=[le("g",{fill:"currentColor"},[le("path",{d:"M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"}),le("path",{d:"M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"})],-1)]))}const hm=we(um,[["render",fm],["__file","VPEditIcon.vue"]]),pm=()=>{const e=Ie(),t=Rn(),n=pt();return I(()=>{var i;return n.value.contributors??e.value.contributors??!0?((i=t.value.git)==null?void 0:i.contributors)??null:null})},gm=()=>{const e=Ie(),t=Rn(),n=pt();return I(()=>{if(!(n.value.editLink??e.value.editLink??!0))return null;const{repo:i,docsRepo:o=i,docsBranch:r="main",docsDir:s="",editLinkText:a}=e.value;if(!o)return null;const c=$p({docsRepo:o,docsBranch:r,docsDir:s,filePathRelative:t.value.filePathRelative,editLinkPattern:n.value.editLinkPattern??e.value.editLinkPattern});return c?{text:a??"Edit this page",link:c}:null})},mm=()=>{const e=Ie(),t=Rn(),n=pt();return I(()=>{var o;return!(n.value.lastUpdated??e.value.lastUpdated??!0)||!((o=t.value.git)!=null&&o.updatedTime)?null:new Date(t.value.git.updatedTime).toLocaleString()})},vm=fe({__name:"VPPageMeta",setup(e,{expose:t}){t();const n=Ie(),l=gm(),i=mm(),o=pm(),r={themeLocale:n,editLink:l,lastUpdated:i,contributors:o,VPEditIcon:hm,get AutoLink(){return Dn}};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),_m={class:"vp-page-meta"},bm={key:0,class:"vp-meta-item edit-link"},ym={class:"vp-meta-item git-info"},km={key:0,class:"vp-meta-item last-updated"},Em={class:"meta-item-label"},wm={class:"meta-item-info"},xm={key:1,class:"vp-meta-item contributors"},Sm={class:"meta-item-label"},Lm={class:"meta-item-info"},Cm=["title"];function Tm(e,t,n,l,i,o){const r=po("ClientOnly");return q(),te("footer",_m,[l.editLink?(q(),te("div",bm,[oe(l.AutoLink,{class:"label",config:l.editLink},{before:Ae(()=>[oe(l.VPEditIcon)]),_:1},8,["config"])])):Pe("",!0),le("div",ym,[l.lastUpdated?(q(),te("div",km,[le("span",Em,Se(l.themeLocale.lastUpdatedText)+": ",1),oe(r,null,{default:Ae(()=>[le("span",wm,Se(l.lastUpdated),1)]),_:1})])):Pe("",!0),l.contributors&&l.contributors.length?(q(),te("div",xm,[le("span",Sm,Se(l.themeLocale.contributorsText)+": ",1),le("span",Lm,[(q(!0),te(be,null,zt(l.contributors,(s,a)=>(q(),te(be,{key:a},[le("span",{class:"contributor",title:`email: ${s.email}`},Se(s.name),9,Cm),a!==l.contributors.length-1?(q(),te(be,{key:0},[Wt(", ")],64)):Pe("",!0)],64))),128))])])):Pe("",!0)])])}const Am=we(vm,[["render",Tm],["__file","VPPageMeta.vue"]]),Pm=()=>{const e=Qt(),t=Rt();return n=>{n&&(Na(n)?t.path!==n&&e.push(n):vl(n)?window.open(n):e.push(encodeURI(n)))}},Zr=(e,t)=>e===!1?!1:at(e)?Pn(e,t):yo(e)?{...e,link:Pn(e.link,t).link}:null,Yi=(e,t,n)=>{const l=e.findIndex(o=>o.link===t);if(l!==-1){const o=e[l+n];return o?o.link?o:"prefix"in o&&!ol(o.prefix).notFound?{...o,link:o.prefix}:null:null}for(const o of e)if("children"in o){const r=Yi(o.children,t,n);if(r)return r}const i=e.findIndex(o=>"prefix"in o&&o.prefix===t);if(i!==-1){const o=e[i+n];return o?o.link?o:"prefix"in o&&!ol(o.prefix).notFound?{...o,link:o.prefix}:null:null}return null},Om=()=>{const e=pt(),t=Ie(),n=Do(),l=Rt(),i=I(()=>{const r=Zr(e.value.prev,l.path);return r===!1?null:r??(t.value.prev===!1?null:Yi(n.value,l.path,-1))}),o=I(()=>{const r=Zr(e.value.next,l.path);return r===!1?null:r??(t.value.next===!1?null:Yi(n.value,l.path,1))});return{prevLink:i,nextLink:o}},Rm=fe({__name:"VPPageNav",setup(e,{expose:t}){t();const n=Ie(),l=Pm(),{prevLink:i,nextLink:o}=Om(),r=I(()=>n.value.pageNavbarLabel??"page navigation");lt("keydown",a=>{a.altKey&&(a.key==="ArrowRight"?o.value&&(l(o.value.link),a.preventDefault()):a.key==="ArrowLeft"&&i.value&&(l(i.value.link),a.preventDefault()))});const s={themeLocale:n,navigate:l,prevLink:i,nextLink:o,navbarLabel:r,get AutoLink(){return Dn}};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}}),Im=["aria-label"],Dm={class:"hint"},Mm={class:"link"},Nm={class:"hint"},Hm={class:"link"};function Fm(e,t,n,l,i,o){return l.prevLink||l.nextLink?(q(),te("nav",{key:0,class:"vp-page-nav","aria-label":l.navbarLabel},[l.prevLink?(q(),Ce(l.AutoLink,{key:0,class:"prev",config:l.prevLink},{default:Ae(()=>[le("div",Dm,[t[0]||(t[0]=le("span",{class:"arrow left"},null,-1)),Wt(" "+Se(l.themeLocale.prev??"Prev"),1)]),le("div",Mm,[le("span",null,Se(l.prevLink.text),1)])]),_:1},8,["config"])):Pe("",!0),l.nextLink?(q(),Ce(l.AutoLink,{key:1,class:"next",config:l.nextLink},{default:Ae(()=>[le("div",Nm,[Wt(Se(l.themeLocale.next??"Next")+" ",1),t[1]||(t[1]=le("span",{class:"arrow right"},null,-1))]),le("div",Hm,[le("span",null,Se(l.nextLink.text),1)])]),_:1},8,["config"])):Pe("",!0)],8,Im)):Pe("",!0)}const Vm=we(Rm,[["render",Fm],["__file","VPPageNav.vue"]]),$m=fe({__name:"VPPage",setup(e,{expose:t}){t(),jp();const n={VPPageMeta:Am,VPPageNav:Vm,get Content(){return Lo}};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),jm={class:"vp-page"},Bm={class:"theme-default-content","vp-content":""};function zm(e,t,n,l,i,o){return q(),te("main",jm,[Le(e.$slots,"top"),le("div",Bm,[Le(e.$slots,"content-top"),oe(l.Content),Le(e.$slots,"content-bottom")]),oe(l.VPPageMeta),oe(l.VPPageNav),Le(e.$slots,"bottom")])}const Um=we($m,[["render",zm],["__file","VPPage.vue"]]),Wm=fe({__name:"VPSidebarItem",props:{item:{},depth:{default:0}},setup(e,{expose:t}){t();const n=e,{item:l,depth:i}=uo(n),o=Rt(),r=Qt(),s=I(()=>"collapsible"in l.value&&l.value.collapsible),a=I(()=>ja(l.value,o)),c=I(()=>({"vp-sidebar-item":!0,"vp-sidebar-heading":i.value===0,active:a.value,collapsible:s.value})),u=I(()=>s.value?a.value:!0),[d,h]=xh(u.value),m=T=>{s.value&&(T.preventDefault(),h())},b=r.afterEach(()=>{On(()=>{d.value=u.value})});oi(()=>{b()});const y={props:n,item:l,depth:i,route:o,router:r,collapsible:s,isActive:a,itemClass:c,isOpenDefault:u,isOpen:d,toggleIsOpen:h,onClick:m,unregisterRouterHook:b,VPDropdownTransition:qa,get AutoLink(){return Dn}};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Km={class:"vp-sidebar-children"};function qm(e,t,n,l,i,o){const r=po("VPSidebarItem",!0);return q(),te("li",null,[l.item.link?(q(),Ce(l.AutoLink,{key:0,class:nt(l.itemClass),config:l.item},null,8,["class","config"])):(q(),te("p",{key:1,tabindex:"0",class:nt(l.itemClass),onClick:l.onClick,onKeydown:Rd(l.onClick,["enter"])},[Wt(Se(l.item.text)+" ",1),l.collapsible?(q(),te("span",{key:0,class:nt(["arrow",l.isOpen?"down":"right"])},null,2)):Pe("",!0)],34)),"children"in l.item&&l.item.children.length?(q(),Ce(l.VPDropdownTransition,{key:2},{default:Ae(()=>[Ul(le("ul",Km,[(q(!0),te(be,null,zt(l.item.children,s=>(q(),Ce(r,{key:`${l.depth}${s.text}${s.link}`,item:s,depth:l.depth+1},null,8,["item","depth"]))),128))],512),[[Jl,l.isOpen]])]),_:1})):Pe("",!0)])}const Gm=we(Wm,[["render",qm],["__file","VPSidebarItem.vue"]]),Jm=fe({__name:"VPSidebarItems",setup(e,{expose:t}){t();const n=Rt(),l=Do();ze(()=>{He(()=>n.hash,o=>{const r=document.querySelector(".vp-sidebar");if(!r)return;const s=document.querySelector(`.vp-sidebar a.vp-sidebar-item[href="${n.path}${o}"]`);if(!s)return;const{top:a,height:c}=r.getBoundingClientRect(),{top:u,height:d}=s.getBoundingClientRect();ua+c&&s.scrollIntoView(!1)})});const i={route:n,sidebarItems:l,VPSidebarItem:Gm};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}}),Qm={key:0,class:"vp-sidebar-items"};function Ym(e,t,n,l,i,o){return l.sidebarItems.length?(q(),te("ul",Qm,[(q(!0),te(be,null,zt(l.sidebarItems,r=>(q(),Ce(l.VPSidebarItem,{key:`${r.text}${r.link}`,item:r},null,8,["item"]))),128))])):Pe("",!0)}const Zm=we(Jm,[["render",Ym],["__file","VPSidebarItems.vue"]]),Xm=fe({__name:"VPSidebar",setup(e,{expose:t}){t();const n={VPNavbarItems:Qa,VPSidebarItems:Zm};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),ev={class:"vp-sidebar","vp-sidebar":""};function tv(e,t,n,l,i,o){return q(),te("aside",ev,[oe(l.VPNavbarItems),Le(e.$slots,"top"),oe(l.VPSidebarItems),Le(e.$slots,"bottom")])}const nv=we(Xm,[["render",tv],["__file","VPSidebar.vue"]]),lv=fe({__name:"Layout",setup(e,{expose:t}){t();const n=Rn(),l=pt(),i=Ie(),o=I(()=>l.value.navbar!==!1&&i.value.navbar!==!1),r=Do(),s=ae(!1),a=g=>{s.value=typeof g=="boolean"?g:!s.value},c={x:0,y:0},u=g=>{c.x=g.changedTouches[0].clientX,c.y=g.changedTouches[0].clientY},d=g=>{const v=g.changedTouches[0].clientX-c.x,M=g.changedTouches[0].clientY-c.y;Math.abs(v)>Math.abs(M)&&Math.abs(v)>40&&(v>0&&c.x<=80?a(!0):a(!1))},h=I(()=>l.value.externalLinkIcon??i.value.externalLinkIcon??!0),m=I(()=>[{"no-navbar":!o.value,"no-sidebar":!r.value.length,"sidebar-open":s.value,"external-link-icon":h.value},l.value.pageClass]);let b;ze(()=>{b=Qt().afterEach(()=>{a(!1)})}),ri(()=>{b()});const y=$a(),T=y.resolve,C=y.pending,w={page:n,frontmatter:l,themeLocale:i,shouldShowNavbar:o,sidebarItems:r,isSidebarOpen:s,toggleSidebar:a,touchStart:c,onTouchStart:u,onTouchEnd:d,enableExternalLinkIcon:h,containerClass:m,get unregisterRouterHook(){return b},set unregisterRouterHook(g){b=g},scrollPromise:y,onBeforeEnter:T,onBeforeLeave:C,VPHome:mg,VPNavbar:cm,VPPage:Um,VPSidebar:nv};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}});function iv(e,t,n,l,i,o){return q(),te("div",{class:nt(["vp-theme-container",l.containerClass]),"vp-container":"",onTouchstart:l.onTouchStart,onTouchend:l.onTouchEnd},[Le(e.$slots,"navbar",{},()=>[l.shouldShowNavbar?(q(),Ce(l.VPNavbar,{key:0,onToggleSidebar:l.toggleSidebar},{before:Ae(()=>[Le(e.$slots,"navbar-before")]),after:Ae(()=>[Le(e.$slots,"navbar-after")]),_:3})):Pe("",!0)]),le("div",{class:"vp-sidebar-mask",onClick:t[0]||(t[0]=r=>l.toggleSidebar(!1))}),Le(e.$slots,"sidebar",{},()=>[oe(l.VPSidebar,null,{top:Ae(()=>[Le(e.$slots,"sidebar-top")]),bottom:Ae(()=>[Le(e.$slots,"sidebar-bottom")]),_:3})]),Le(e.$slots,"page",{},()=>[l.frontmatter.home?(q(),Ce(l.VPHome,{key:0})):(q(),Ce(bo,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:l.onBeforeEnter,onBeforeLeave:l.onBeforeLeave},{default:Ae(()=>[(q(),Ce(l.VPPage,{key:l.page.path},{top:Ae(()=>[Le(e.$slots,"page-top")]),"content-top":Ae(()=>[Le(e.$slots,"page-content-top")]),"content-bottom":Ae(()=>[Le(e.$slots,"page-content-bottom")]),bottom:Ae(()=>[Le(e.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34)}const ov=we(lv,[["render",iv],["__file","Layout.vue"]]),rv=fe({__name:"NotFound",setup(e,{expose:t}){t();const n=In(),l=Ie(),i=l.value.notFound??["Not Found"],o=()=>i[Math.floor(Math.random()*i.length)],r=l.value.home??n.value,s=l.value.backToHome??"Back to home",a={routeLocale:n,themeLocale:l,messages:i,getMsg:o,homeLink:r,homeText:s,get RouteLink(){return hi}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),sv={class:"vp-theme-container","vp-container":""},av={class:"page"},cv={class:"theme-default-content","vp-content":""};function uv(e,t,n,l,i,o){return q(),te("div",sv,[le("main",av,[le("div",cv,[t[0]||(t[0]=le("h1",null,"404",-1)),le("blockquote",null,Se(l.getMsg()),1),oe(l.RouteLink,{to:l.homeLink},{default:Ae(()=>[Wt(Se(l.homeText),1)]),_:1},8,["to"])])])])}const dv=we(rv,[["render",uv],["__scopeId","data-v-c2b5adcc"],["__file","NotFound.vue"]]),fv=gt({enhance({app:e,router:t}){Ra("Badge")||e.component("Badge",Jp);const n=t.options.scrollBehavior;t.options.scrollBehavior=async(...l)=>(await $a().wait(),n(...l))},setup(){Mp(),Kp()},layouts:{Layout:ov,NotFound:dv}}),hv=Object.freeze(Object.defineProperty({__proto__:null,default:fv},Symbol.toStringTag,{value:"Module"})),pv=e=>{if(window.dataLayer&&window.gtag)return;const t=document.createElement("script");t.src=`https://www.googletagmanager.com/gtag/js?id=${e.id}`,t.async=!0,document.head.appendChild(t),window.dataLayer=window.dataLayer??[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),e.debug?window.gtag("config",e.id,{debug_mode:!0}):window.gtag("config",e.id)};var gv={id:"G-T0F3RKFVF3"};const mv=gv,vv=gt({enhance(){pv(mv)}}),_v=Object.freeze(Object.defineProperty({__proto__:null,default:vv},Symbol.toStringTag,{value:"Module"})),bv=/language-(shellscript|shell|bash|sh|zsh)/,yv=({delay:e=500,duration:t=2e3,locales:n,selector:l,showInMobile:i,ignoreSelector:o=[],transform:r})=>{const s=Po("(max-width: 419px)"),a=I(()=>!s.value||i),c=Da(n),u=Rn(),d=T=>{var w;if(T.hasAttribute("copy-code"))return;const C=document.createElement("button");C.type="button",C.classList.add("vp-copy-code-button"),C.setAttribute("aria-label",c.value.copy),C.setAttribute("data-copied",c.value.copied),(w=T.parentElement)==null||w.insertBefore(C,T),T.setAttribute("copy-code","")};He(()=>[u.value.path,a.value],async()=>{document.body.classList.toggle("no-copy-code",!a.value),a.value&&(await On(),await Ia(e),document.querySelectorAll(l.join(",")).forEach(d))},{immediate:!0});const{copy:m}=Lh({legacy:!0}),b=new WeakMap,y=async(T,C,w)=>{const g=C.cloneNode(!0);o.length&&g.querySelectorAll(o.join(",")).forEach(G=>{G.remove()}),r&&r(g);let v=g.textContent||"";if(bv.test(T.className)&&(v=v.replace(/^ *(\$|>) /gm,"")),await m(v),t<=0)return;w.classList.add("copied"),clearTimeout(b.get(w));const M=setTimeout(()=>{w.classList.remove("copied"),w.blur(),b.delete(w)},t);b.set(w,M)};lt("click",T=>{const C=T.target;if(a.value&&C.matches('div[class*="language-"] > button.vp-copy-code-button')){const w=C.parentElement,g=C.nextElementSibling;if(!w||!g)return;y(w,g,C)}})};var kv=[],Ev={"/":{copy:"Copy code",copied:"Copied"}},wv=['[vp-content] div[class*="language-"] pre'];const xv=gt({setup:()=>{yv({selector:wv,ignoreSelector:kv,locales:Ev,duration:2e3,delay:500,showInMobile:!1})}}),Sv=Object.freeze(Object.defineProperty({__proto__:null,default:xv},Symbol.toStringTag,{value:"Module"})),Lv=({selector:e='div[class*="language-"].has-collapsed-lines > .collapsed-lines'}={})=>{lt("click",t=>{const n=t.target;if(n.matches(e)){const l=n.parentElement;l!=null&&l.classList.toggle("collapsed")&&l.scrollIntoView({block:"center",behavior:"instant"})}})},Cv={setup(){Lv()}},Tv=Object.freeze(Object.defineProperty({__proto__:null,default:Cv},Symbol.toStringTag,{value:"Module"})),Av={enhance:({app:e})=>{e.component("DocsOnly",Dl(()=>$(()=>import("./DocsOnly-BeiTa4Zx.js"),[]))),e.component("InfoPanelOnly",Dl(()=>$(()=>import("./InfoPanelOnly-uYuedY0y.js"),[]))),e.component("Scrubber",Dl(()=>$(()=>import("./Scrubber-Xf9jN2YZ.js"),[])))}},Pv=Object.freeze(Object.defineProperty({__proto__:null,default:Av},Symbol.toStringTag,{value:"Module"})),Ov=e=>e instanceof Element?document.activeElement===e&&(["TEXTAREA","SELECT","INPUT"].includes(e.tagName)||e.hasAttribute("contenteditable")):!1,Rv=(e,t)=>t.some(n=>{if(at(n))return n===e.key;const{key:l,ctrl:i=!1,shift:o=!1,alt:r=!1}=n;return l===e.key&&i===e.ctrlKey&&o===e.shiftKey&&r===e.altKey}),Iv=/[^\x00-\x7F]/,Dv=e=>e.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t),Xr=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),es=(e,t)=>{const n=t.join(" "),l=Dv(e);if(Iv.test(e))return l.some(r=>n.toLowerCase().indexOf(r)>-1);const i=e.endsWith(" ");return new RegExp(l.map((r,s)=>l.length===s+1&&!i?`(?=.*\\b${Xr(r)})`:`(?=.*\\b${Xr(r)}\\b)`).join("")+".+","gi").test(n)},Mv=({input:e,hotKeys:t})=>{if(t.value.length===0)return;const n=l=>{e.value&&Rv(l,t.value)&&!Ov(l.target)&&(l.preventDefault(),e.value.focus())};ze(()=>{document.addEventListener("keydown",n)}),oi(()=>{document.removeEventListener("keydown",n)})},Nv=[{title:"FAQ",headers:[{level:2,title:"What is What?",slug:"what-is-what",link:"#what-is-what",children:[]},{level:2,title:"Entities Not Showing in the Autocomplete Dropdown",slug:"entities-not-showing-in-the-autocomplete-dropdown",link:"#entities-not-showing-in-the-autocomplete-dropdown",children:[]},{level:2,title:"Entity Could Not Be Found in Cache for entity_id: ???",slug:"entity-could-not-be-found-in-cache-for-entity-id",link:"#entity-could-not-be-found-in-cache-for-entity-id",children:[]},{level:2,title:"Why Do Some of My Nodes Have a Yellow Font?",slug:"why-do-some-of-my-nodes-have-a-yellow-font",link:"#why-do-some-of-my-nodes-have-a-yellow-font",children:[]}],path:"/FAQ.html",pathLocale:"/",extraFields:[]},{title:"",headers:[],path:"/",pathLocale:"/",extraFields:[]},{title:"Actionable Notifications Subflow for Android",headers:[{level:2,title:"Demo flow",slug:"demo-flow",link:"#demo-flow",children:[]},{level:2,title:"Use Case 1: Get a notification when garage door is left open with ability to ignore the alert for an amount of time",slug:"use-case-1-get-a-notification-when-garage-door-is-left-open-with-ability-to-ignore-the-alert-for-an-amount-of-time",link:"#use-case-1-get-a-notification-when-garage-door-is-left-open-with-ability-to-ignore-the-alert-for-an-amount-of-time",children:[]},{level:2,title:"Use Case 2: Ask if vacation mode should be turned on after being away for 24 hours",slug:"use-case-2-ask-if-vacation-mode-should-be-turned-on-after-being-away-for-24-hours",link:"#use-case-2-ask-if-vacation-mode-should-be-turned-on-after-being-away-for-24-hours",children:[]}],path:"/cookbook/actionable-notifications-subflow-for-android.html",pathLocale:"/",extraFields:[]},{title:"Check if an entity was a certain state in the last 24 hours",headers:[],path:"/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html",pathLocale:"/",extraFields:[]},{title:"Events by Label",headers:[],path:"/cookbook/events-by-label.html",pathLocale:"/",extraFields:[]},{title:"Expiration Date Monitor with notification",headers:[{level:2,title:"Home Assistant stuff",slug:"home-assistant-stuff",link:"#home-assistant-stuff",children:[]},{level:2,title:"Node-RED stuff",slug:"node-red-stuff",link:"#node-red-stuff",children:[]}],path:"/cookbook/expiration-date-monitor.html",pathLocale:"/",extraFields:[]},{title:"Get state_changed Events Based on Area",headers:[],path:"/cookbook/get-state_changed-events-based-on-area.html",pathLocale:"/",extraFields:[]},{title:"Holiday lights scheduler and demo mode for WLED",headers:[{level:3,title:"Version 1",slug:"version-1",link:"#version-1",children:[]},{level:2,title:"Requirements",slug:"requirements",link:"#requirements",children:[{level:3,title:"Integrations",slug:"integrations",link:"#integrations",children:[]},{level:3,title:"Nodes",slug:"nodes",link:"#nodes",children:[]}]},{level:2,title:"Setup",slug:"setup",link:"#setup",children:[{level:3,title:"WLED variables",slug:"wled-variables",link:"#wled-variables",children:[]},{level:3,title:"Setting date ranges up",slug:"setting-date-ranges-up",link:"#setting-date-ranges-up",children:[]},{level:3,title:"Home Assistant Entities",slug:"home-assistant-entities",link:"#home-assistant-entities",children:[]}]},{level:2,title:"Lovelace UI",slug:"lovelace-ui",link:"#lovelace-ui",children:[]},{level:2,title:"Things that could have been added but never got around to it",slug:"things-that-could-have-been-added-but-never-got-around-to-it",link:"#things-that-could-have-been-added-but-never-got-around-to-it",children:[]}],path:"/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html",pathLocale:"/",extraFields:[]},{title:"Cookbook",headers:[],path:"/cookbook/",pathLocale:"/",extraFields:[]},{title:"Motion Triggered Light",headers:[{level:2,title:"Example 1",slug:"example-1",link:"#example-1",children:[]},{level:2,title:"Example 2",slug:"example-2",link:"#example-2",children:[]}],path:"/cookbook/motion-triggered-light.html",pathLocale:"/",extraFields:[]},{title:"Play a Jellyfin Show Using the Sentence Node",headers:[{level:2,title:"Flow Configuration",slug:"flow-configuration",link:"#flow-configuration",children:[{level:3,title:"Setup Instructions",slug:"setup-instructions",link:"#setup-instructions",children:[]}]},{level:2,title:"Extended Usage",slug:"extended-usage",link:"#extended-usage",children:[]}],path:"/cookbook/play-jellyfin-show-using-sentence-node.html",pathLocale:"/",extraFields:[]},{title:"Saving and Restoring States",headers:[{level:2,title:"Using Home Assistant scene creation",slug:"using-home-assistant-scene-creation",link:"#using-home-assistant-scene-creation",children:[]},{level:2,title:"Using the get entities node",slug:"using-the-get-entities-node",link:"#using-the-get-entities-node",children:[]}],path:"/cookbook/saving-and-restoring-states.html",pathLocale:"/",extraFields:[]},{title:"Starting a flow after a Home Assistant restart",headers:[{level:2,title:"Create an input boolean using the Helpers menu (Configuration -> Helpers)",slug:"create-an-input-boolean-using-the-helpers-menu-configuration-helpers",link:"#create-an-input-boolean-using-the-helpers-menu-configuration-helpers",children:[]},{level:2,title:"Create the Home Assistant automation",slug:"create-the-home-assistant-automation",link:"#create-the-home-assistant-automation",children:[]}],path:"/cookbook/starting-flow-after-home-assistant-restart.html",pathLocale:"/",extraFields:[]},{title:"Turn Light On/Off with Sunset/Sunrise",headers:[{level:2,title:"Option 1",slug:"option-1",link:"#option-1",children:[]},{level:2,title:"Option 2",slug:"option-2",link:"#option-2",children:[]},{level:2,title:"Option 3",slug:"option-3",link:"#option-3",children:[]}],path:"/cookbook/sun-events.html",pathLocale:"/",extraFields:[]},{title:"Using Date and Time entities to trigger flows",headers:[{level:2,title:"Using the time node",slug:"using-the-time-node",link:"#using-the-time-node",children:[]},{level:2,title:"Home Assistant Companion app next alarm sensor",slug:"home-assistant-companion-app-next-alarm-sensor",link:"#home-assistant-companion-app-next-alarm-sensor",children:[{level:3,title:"Adding an offset and on/off switch",slug:"adding-an-offset-and-on-off-switch",link:"#adding-an-offset-and-on-off-switch",children:[]},{level:3,title:"Managing alarm from multiple phones",slug:"managing-alarm-from-multiple-phones",link:"#managing-alarm-from-multiple-phones",children:[]}]},{level:2,title:"Daily alarm using Datetime Entity",slug:"daily-alarm-using-datetime-entity",link:"#daily-alarm-using-datetime-entity",children:[]}],path:"/cookbook/using-date-and-time-entities-to-trigger-flows.html",pathLocale:"/",extraFields:[]},{title:"Vacation Mode",headers:[{level:2,title:"Step 1",slug:"step-1",link:"#step-1",children:[]},{level:2,title:"Step 2",slug:"step-2",link:"#step-2",children:[]},{level:2,title:"Step 3",slug:"step-3",link:"#step-3",children:[]},{level:2,title:"Step 4",slug:"step-4",link:"#step-4",children:[]}],path:"/cookbook/vacation-mode.html",pathLocale:"/",extraFields:[]},{title:"Action Node Tips and Tricks",headers:[{level:2,title:"Home Assistant Domain",slug:"home-assistant-domain",link:"#home-assistant-domain",children:[]},{level:2,title:"Using Mustache Templates",slug:"using-mustache-templates",link:"#using-mustache-templates",children:[]},{level:2,title:"Targets",slug:"targets",link:"#targets",children:[]},{level:2,title:"Data Field",slug:"data-field",link:"#data-field",children:[{level:3,title:"Inserting a Message Property into a String",slug:"inserting-a-message-property-into-a-string",link:"#inserting-a-message-property-into-a-string",children:[]},{level:3,title:"Retrieving a Property Value of a Home Assistant Entity",slug:"retrieving-a-property-value-of-a-home-assistant-entity",link:"#retrieving-a-property-value-of-a-home-assistant-entity",children:[]},{level:3,title:"Performing Arithmetic Operations",slug:"performing-arithmetic-operations",link:"#performing-arithmetic-operations",children:[]},{level:3,title:"Creating a Comma-Delimited Entity ID List",slug:"creating-a-comma-delimited-entity-id-list",link:"#creating-a-comma-delimited-entity-id-list",children:[]}]}],path:"/guide/action.html",pathLocale:"/",extraFields:[]},{title:"Conditionals",headers:[{level:2,title:"Rules",slug:"rules",link:"#rules",children:[{level:3,title:"==, !=, is, and is not",slug:"is-and-is-not",link:"#is-and-is-not",children:[]},{level:3,title:"<, <=, >, and >=",slug:"and",link:"#and",children:[]},{level:3,title:"in and not in",slug:"in-and-not-in",link:"#in-and-not-in",children:[]},{level:3,title:"includes and not includes",slug:"includes-and-not-includes",link:"#includes-and-not-includes",children:[]},{level:3,title:"is null and is not null",slug:"is-null-and-is-not-null",link:"#is-null-and-is-not-null",children:[]},{level:3,title:"JSONata",slug:"jsonata",link:"#jsonata",children:[]},{level:3,title:"starts with",slug:"starts-with",link:"#starts-with",children:[]},{level:3,title:"in group",slug:"in-group",link:"#in-group",children:[]}]},{level:2,title:"Value Types",slug:"value-types",link:"#value-types",children:[{level:3,title:"string, number, boolean, regular expression, and JSONata expression",slug:"string-number-boolean-regular-expression-and-jsonata-expression",link:"#string-number-boolean-regular-expression-and-jsonata-expression",children:[]},{level:3,title:"msg, flow, and global",slug:"msg-flow-and-global",link:"#msg-flow-and-global",children:[]},{level:3,title:"entity and prevEntity",slug:"entity-and-preventity",link:"#entity-and-preventity",children:[]}]}],path:"/guide/conditionals.html",pathLocale:"/",extraFields:[]},{title:"Development",headers:[{level:2,title:"Environment Setup",slug:"environment-setup",link:"#environment-setup",children:[{level:3,title:"Using the VS Code Dev Container",slug:"using-the-vs-code-dev-container",link:"#using-the-vs-code-dev-container",children:[]},{level:3,title:"Local Setup",slug:"local-setup",link:"#local-setup",children:[]},{level:3,title:"Accessing the Development Server",slug:"accessing-the-development-server",link:"#accessing-the-development-server",children:[]},{level:3,title:"Linting",slug:"linting",link:"#linting",children:[]},{level:3,title:"Testing",slug:"testing",link:"#testing",children:[]}]}],path:"/guide/development.html",pathLocale:"/",extraFields:[]},{title:"Diagnostics Information",headers:[{level:2,title:"Overview",slug:"overview",link:"#overview",children:[]},{level:2,title:"For Versions Prior to 0.62.0",slug:"for-versions-prior-to-0-62-0",link:"#for-versions-prior-to-0-62-0",children:[{level:3,title:"Flow",slug:"flow",link:"#flow",children:[]},{level:3,title:"Usage",slug:"usage",link:"#usage",children:[]}]}],path:"/guide/diagnostics.html",pathLocale:"/",extraFields:[]},{title:"Documentation",headers:[{level:2,title:"Small changes",slug:"small-changes",link:"#small-changes",children:[]},{level:2,title:"Local development",slug:"local-development",link:"#local-development",children:[{level:3,title:"Developing with Visual Studio Code and Docker",slug:"developing-with-visual-studio-code-and-docker",link:"#developing-with-visual-studio-code-and-docker",children:[]},{level:3,title:"Manual environment",slug:"manual-environment",link:"#manual-environment",children:[]}]}],path:"/guide/documentation.html",pathLocale:"/",extraFields:[]},{title:"First Automation",headers:[{level:2,title:"Events: State Node",slug:"events-state-node",link:"#events-state-node",children:[]},{level:2,title:"Entity ID Configuration",slug:"entity-id-configuration",link:"#entity-id-configuration",children:[]},{level:2,title:"If State Condition",slug:"if-state-condition",link:"#if-state-condition",children:[]},{level:2,title:"Action Node",slug:"action-node",link:"#action-node",children:[]},{level:2,title:"Complete Automation",slug:"complete-automation",link:"#complete-automation",children:[]}],path:"/guide/first-automation.html",pathLocale:"/",extraFields:[]},{title:"Getting Started",headers:[{level:2,title:"Prerequisites",slug:"prerequisites",link:"#prerequisites",children:[]},{level:2,title:"Installation",slug:"installation",link:"#installation",children:[{level:3,title:"Using the Palette Manager",slug:"using-the-palette-manager",link:"#using-the-palette-manager",children:[]},{level:3,title:"Using npm from the Command Line",slug:"using-npm-from-the-command-line",link:"#using-npm-from-the-command-line",children:[]},{level:3,title:"Home Assistant Add-on",slug:"home-assistant-add-on",link:"#home-assistant-add-on",children:[]}]},{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Tips",slug:"tips",link:"#tips",children:[]},{level:3,title:"Generate Access Token",slug:"generate-access-token",link:"#generate-access-token",children:[]}]}],path:"/guide/",pathLocale:"/",extraFields:[]},{title:"Migration",headers:[{level:2,title:"Current-State Node Output",slug:"current-state-node-output",link:"#current-state-node-output",children:[]},{level:2,title:"Poll-State Node Output",slug:"poll-state-node-output",link:"#poll-state-node-output",children:[]}],path:"/guide/migration.html",pathLocale:"/",extraFields:[]},{title:"Mustache Templates",headers:[],path:"/guide/mustache-templates.html",pathLocale:"/",extraFields:[]},{title:"API",headers:[{level:2,title:"Config",slug:"config",link:"#config",children:[{level:3,title:"Protocol",slug:"protocol",link:"#protocol",children:[]},{level:3,title:"Method",slug:"method",link:"#method",children:[]},{level:3,title:"Path",slug:"path",link:"#path",children:[]},{level:3,title:"Params",slug:"params",link:"#params",children:[]},{level:3,title:"Data",slug:"data",link:"#data",children:[]},{level:3,title:"Results",slug:"results",link:"#results",children:[]}]},{level:2,title:"Input",slug:"input",link:"#input",children:[{level:3,title:"protocol",slug:"protocol-1",link:"#protocol-1",children:[]},{level:3,title:"method",slug:"method-1",link:"#method-1",children:[]},{level:3,title:"path",slug:"path-1",link:"#path-1",children:[]},{level:3,title:"data",slug:"data-1",link:"#data-1",children:[]},{level:3,title:"location",slug:"location",link:"#location",children:[]},{level:3,title:"locationType",slug:"locationtype",link:"#locationtype",children:[]}]},{level:2,title:"Output",slug:"output",link:"#output",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/API.html",pathLocale:"/",extraFields:[]},{title:"Action",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Action",slug:"action-1",link:"#action-1",children:[]},{level:3,title:"Floor",slug:"floor",link:"#floor",children:[]},{level:3,title:"Area",slug:"area",link:"#area",children:[]},{level:3,title:"Device",slug:"device",link:"#device",children:[]},{level:3,title:"Entity",slug:"entity",link:"#entity",children:[]},{level:3,title:"Label",slug:"label",link:"#label",children:[]},{level:3,title:"Data",slug:"data",link:"#data",children:[]},{level:3,title:"Merge Context",slug:"merge-context",link:"#merge-context",children:[]},{level:3,title:"Alternative Template Tags",slug:"alternative-template-tags",link:"#alternative-template-tags",children:[]},{level:3,title:"Queue",slug:"queue",link:"#queue",children:[]},{level:3,title:"Block Input Overrides",slug:"block-input-overrides",link:"#block-input-overrides",children:[]}]},{level:2,title:"Input",slug:"input",link:"#input",children:[{level:3,title:"action",slug:"action-2",link:"#action-2",children:[]},{level:3,title:"data",slug:"data-1",link:"#data-1",children:[]},{level:3,title:"target",slug:"target",link:"#target",children:[]}]},{level:2,title:"Output",slug:"output",link:"#output",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/action.html",pathLocale:"/",extraFields:[]},{title:"Binary Sensor",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"State",slug:"state",link:"#state",children:[]},{level:3,title:"Attributes",slug:"attributes",link:"#attributes",children:[]},{level:3,title:"Input Override",slug:"input-override",link:"#input-override",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"state",slug:"state-1",link:"#state-1",children:[]},{level:3,title:"attributes",slug:"attributes-1",link:"#attributes-1",children:[]}]}],path:"/node/binary-sensor.html",pathLocale:"/",extraFields:[]},{title:"Button",headers:[{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/button.html",pathLocale:"/",extraFields:[]},{title:"Server Config",headers:[{level:2,title:"Config",slug:"config",link:"#config",children:[{level:3,title:"Name",slug:"name",link:"#name",children:[]},{level:3,title:"Using the Home Assistant Add-on",slug:"using-the-home-assistant-add-on",link:"#using-the-home-assistant-add-on",children:[]},{level:3,title:"Base URL",slug:"base-url",link:"#base-url",children:[]},{level:3,title:"Access Token",slug:"access-token",link:"#access-token",children:[]},{level:3,title:"Unauthorized SSL Certificates",slug:"unauthorized-ssl-certificates",link:"#unauthorized-ssl-certificates",children:[]},{level:3,title:"State Boolean",slug:"state-boolean",link:"#state-boolean",children:[]},{level:3,title:"Enable Heartbeat",slug:"enable-heartbeat",link:"#enable-heartbeat",children:[]},{level:3,title:"Heartbeat Interval",slug:"heartbeat-interval",link:"#heartbeat-interval",children:[]},{level:3,title:"Enable Global Context Store",slug:"enable-global-context-store",link:"#enable-global-context-store",children:[]}]},{level:2,title:"UI Settings",slug:"ui-settings",link:"#ui-settings",children:[{level:3,title:"Cache Autocomplete Results",slug:"cache-autocomplete-results",link:"#cache-autocomplete-results",children:[]},{level:3,title:"ID Selector Display",slug:"id-selector-display",link:"#id-selector-display",children:[]},{level:3,title:"Status Date Format",slug:"status-date-format",link:"#status-date-format",children:[]}]},{level:2,title:"Details",slug:"details",link:"#details",children:[{level:3,title:"Context",slug:"context",link:"#context",children:[]},{level:3,title:"Context Example",slug:"context-example",link:"#context-example",children:[]}]},{level:2,title:"Connection Issues",slug:"connection-issues",link:"#connection-issues",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/config-server.html",pathLocale:"/",extraFields:[]},{title:"Current State",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity ID",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"If State",slug:"if-state",link:"#if-state",children:[]},{level:3,title:"For",slug:"for",link:"#for",children:[]},{level:3,title:"State Type",slug:"state-type",link:"#state-type",children:[]},{level:3,title:"Block Input Overrides",slug:"block-input-overrides",link:"#block-input-overrides",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"payload.entityId",slug:"payload-entityid",link:"#payload-entityid",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/current-state.html",pathLocale:"/",extraFields:[]},{title:"Device Config",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Name",slug:"name",link:"#name",children:[]},{level:3,title:"Manufacturer",slug:"manufacturer",link:"#manufacturer",children:[]},{level:3,title:"Model",slug:"model",link:"#model",children:[]},{level:3,title:"Software Version",slug:"software-version",link:"#software-version",children:[]},{level:3,title:"Hardware Version",slug:"hardware-version",link:"#hardware-version",children:[]}]}],path:"/node/device-config.html",pathLocale:"/",extraFields:[]},{title:"Device",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Type",slug:"type",link:"#type",children:[]},{level:3,title:"Device",slug:"device-1",link:"#device-1",children:[]},{level:3,title:"Trigger",slug:"trigger",link:"#trigger",children:[]},{level:3,title:"Action",slug:"action",link:"#action",children:[]},{level:3,title:"Capabilities",slug:"capabilities",link:"#capabilities",children:[]},{level:3,title:"Expose as",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/device.html",pathLocale:"/",extraFields:[]},{title:"Entity Config",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Name",slug:"name",link:"#name",children:[]},{level:3,title:"Device",slug:"device",link:"#device",children:[]},{level:3,title:"Type",slug:"type",link:"#type",children:[]},{level:3,title:"Resend state and attributes",slug:"resend-state-and-attributes",link:"#resend-state-and-attributes",children:[]},{level:3,title:"Other Properties",slug:"other-properties",link:"#other-properties",children:[]}]}],path:"/node/entity-config.html",pathLocale:"/",extraFields:[]},{title:"Entity",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Type",slug:"type",link:"#type",children:[]},{level:3,title:"Home Assistant Config",slug:"home-assistant-config",link:"#home-assistant-config",children:[]}]},{level:2,title:"Sensor Configuration",slug:"sensor-configuration",link:"#sensor-configuration",children:[{level:3,title:"State",slug:"state",link:"#state",children:[]},{level:3,title:"Attributes",slug:"attributes",link:"#attributes",children:[]},{level:3,title:"Input Override",slug:"input-override",link:"#input-override",children:[]},{level:3,title:"Resend state and attributes",slug:"resend-state-and-attributes",link:"#resend-state-and-attributes",children:[]}]},{level:2,title:"Switch Configuration",slug:"switch-configuration",link:"#switch-configuration",children:[{level:3,title:"Output on state change",slug:"output-on-state-change",link:"#output-on-state-change",children:[]},{level:3,title:"Payload",slug:"payload",link:"#payload",children:[]}]},{level:2,title:"Sensors Inputs",slug:"sensors-inputs",link:"#sensors-inputs",children:[{level:3,title:"state",slug:"state-1",link:"#state-1",children:[]},{level:3,title:"attributes",slug:"attributes-1",link:"#attributes-1",children:[]}]},{level:2,title:"Switch Inputs",slug:"switch-inputs",link:"#switch-inputs",children:[{level:3,title:"msg.enable",slug:"msg-enable",link:"#msg-enable",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/entity.html",pathLocale:"/",extraFields:[]},{title:"Events: all",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Name",slug:"name",link:"#name",children:[]},{level:3,title:"Event Type",slug:"event-type",link:"#event-type",children:[]},{level:3,title:"Event data",slug:"event-data",link:"#event-data",children:[]},{level:3,title:"Output only after Home Assistant is running",slug:"output-only-after-home-assistant-is-running",link:"#output-only-after-home-assistant-is-running",children:[]},{level:3,title:"Expose as",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Client Events",slug:"client-events",link:"#client-events",children:[]}],path:"/node/events-all.html",pathLocale:"/",extraFields:[]},{title:"Events: calendar",headers:[{level:2,title:"Configuration:",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity ID",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"Relative To",slug:"relative-to",link:"#relative-to",children:[]},{level:3,title:"Offset",slug:"offset",link:"#offset",children:[]},{level:3,title:"Conditions",slug:"conditions",link:"#conditions",children:[]},{level:3,title:"Expose to Home Assistant",slug:"expose-to-home-assistant",link:"#expose-to-home-assistant",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/events-calendar.html",pathLocale:"/",extraFields:[]},{title:"Events: state",headers:[{level:2,title:"Configuration:",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity",slug:"entity",link:"#entity",children:[]},{level:3,title:"If State",slug:"if-state",link:"#if-state",children:[]},{level:3,title:"For",slug:"for",link:"#for",children:[]},{level:3,title:"State Type",slug:"state-type",link:"#state-type",children:[]},{level:3,title:"Ignore state change event",slug:"ignore-state-change-event",link:"#ignore-state-change-event",children:[]},{level:3,title:"Output on Connect",slug:"output-on-connect",link:"#output-on-connect",children:[]},{level:3,title:"Expose to Home Assistant",slug:"expose-to-home-assistant",link:"#expose-to-home-assistant",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/events-state.html",pathLocale:"/",extraFields:[]},{title:"Fire Event",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Event",slug:"event",link:"#event",children:[]},{level:3,title:"data",slug:"data",link:"#data",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"payload.event",slug:"payload-event",link:"#payload-event",children:[]},{level:3,title:"payload.data",slug:"payload-data",link:"#payload-data",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"payload.event_type",slug:"payload-event-type",link:"#payload-event-type",children:[]},{level:3,title:"payload.data",slug:"payload-data-1",link:"#payload-data-1",children:[]}]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/fire-event.html",pathLocale:"/",extraFields:[]},{title:"Get Entities",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Search Criteria",slug:"search-criteria",link:"#search-criteria",children:[]},{level:3,title:"Property",slug:"property",link:"#property",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"Payload",slug:"payload",link:"#payload",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"Array",slug:"array",link:"#array",children:[]},{level:3,title:"Count",slug:"count",link:"#count",children:[]},{level:3,title:"Random",slug:"random",link:"#random",children:[]},{level:3,title:"Split",slug:"split",link:"#split",children:[]}]},{level:2,title:"State Object Format",slug:"state-object-format",link:"#state-object-format",children:[{level:3,title:"entity_id",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"state",slug:"state",link:"#state",children:[]},{level:3,title:"attributes",slug:"attributes",link:"#attributes",children:[]},{level:3,title:"last_changed",slug:"last-changed",link:"#last-changed",children:[]},{level:3,title:"timeSinceChangedMs",slug:"timesincechangedms",link:"#timesincechangedms",children:[]},{level:3,title:"last_updated",slug:"last-updated",link:"#last-updated",children:[]},{level:3,title:"context",slug:"context",link:"#context",children:[]}]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[{level:3,title:"Example 2",slug:"example-2",link:"#example-2",children:[]},{level:3,title:"Example 3",slug:"example-3",link:"#example-3",children:[]},{level:3,title:"Example 4",slug:"example-4",link:"#example-4",children:[]}]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/get-entities.html",pathLocale:"/",extraFields:[]},{title:"Get History",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity ID",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"Entity ID Type",slug:"entity-id-type",link:"#entity-id-type",children:[]},{level:3,title:"Start Date",slug:"start-date",link:"#start-date",children:[]},{level:3,title:"End Date",slug:"end-date",link:"#end-date",children:[]},{level:3,title:"Use Relative Time",slug:"use-relative-time",link:"#use-relative-time",children:[]},{level:3,title:"In the Last",slug:"in-the-last",link:"#in-the-last",children:[]},{level:3,title:"Flatten Results",slug:"flatten-results",link:"#flatten-results",children:[]},{level:3,title:"Output Types",slug:"output-types",link:"#output-types",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"entityId",slug:"entityid",link:"#entityid",children:[]},{level:3,title:"entityIdType",slug:"entityidtype",link:"#entityidtype",children:[]},{level:3,title:"startDate",slug:"startdate",link:"#startdate",children:[]},{level:3,title:"endDate",slug:"enddate",link:"#enddate",children:[]},{level:3,title:"relativeTime",slug:"relativetime",link:"#relativetime",children:[]},{level:3,title:"flatten",slug:"flatten",link:"#flatten",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"payload",slug:"payload",link:"#payload",children:[]}]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/get-history.html",pathLocale:"/",extraFields:[]},{title:"Nodes",headers:[{level:2,title:"Action",slug:"action",link:"#action",children:[]},{level:2,title:"API",slug:"api",link:"#api",children:[]},{level:2,title:"Binary Sensor",slug:"binary-sensor",link:"#binary-sensor",children:[]},{level:2,title:"Button",slug:"button",link:"#button",children:[]},{level:2,title:"Calendar",slug:"calendar",link:"#calendar",children:[]},{level:2,title:"Current State",slug:"current-state",link:"#current-state",children:[]},{level:2,title:"Device",slug:"device",link:"#device",children:[]},{level:2,title:"Device Config",slug:"device-config",link:"#device-config",children:[]},{level:2,title:"Entity Config",slug:"entity-config",link:"#entity-config",children:[]},{level:2,title:"Events: all",slug:"events-all",link:"#events-all",children:[]},{level:2,title:"Events: state",slug:"events-state",link:"#events-state",children:[]},{level:2,title:"Fire Event",slug:"fire-event",link:"#fire-event",children:[]},{level:2,title:"Get Entities",slug:"get-entities",link:"#get-entities",children:[]},{level:2,title:"Get History",slug:"get-history",link:"#get-history",children:[]},{level:2,title:"Number",slug:"number",link:"#number",children:[]},{level:2,title:"Poll State",slug:"poll-state",link:"#poll-state",children:[]},{level:2,title:"Render Template",slug:"render-template",link:"#render-template",children:[]},{level:2,title:"Select",slug:"select",link:"#select",children:[]},{level:2,title:"Sensor",slug:"sensor",link:"#sensor",children:[]},{level:2,title:"Sentence",slug:"sentence",link:"#sentence",children:[]},{level:2,title:"Server Config",slug:"server-config",link:"#server-config",children:[]},{level:2,title:"Switch",slug:"switch",link:"#switch",children:[]},{level:2,title:"Tag",slug:"tag",link:"#tag",children:[]},{level:2,title:"Text",slug:"text",link:"#text",children:[]},{level:2,title:"Time",slug:"time",link:"#time",children:[]},{level:2,title:"Time Entity",slug:"time-entity",link:"#time-entity",children:[]},{level:2,title:"Trigger: state",slug:"trigger-state",link:"#trigger-state",children:[]},{level:2,title:"Update Config",slug:"update-config",link:"#update-config",children:[]},{level:2,title:"Wait Until",slug:"wait-until",link:"#wait-until",children:[]},{level:2,title:"Webhook",slug:"webhook",link:"#webhook",children:[]},{level:2,title:"Zone",slug:"zone",link:"#zone",children:[]}],path:"/node/",pathLocale:"/",extraFields:[]},{title:"Number",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Mode",slug:"mode",link:"#mode",children:[]},{level:3,title:"Value",slug:"value",link:"#value",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"value",slug:"value-1",link:"#value-1",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/number.html",pathLocale:"/",extraFields:[]},{title:"Poll State",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity ID",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"Update Interval",slug:"update-interval",link:"#update-interval",children:[]},{level:3,title:"If State",slug:"if-state",link:"#if-state",children:[]},{level:3,title:"State Type",slug:"state-type",link:"#state-type",children:[]},{level:3,title:"Output Initially",slug:"output-initially",link:"#output-initially",children:[]},{level:3,title:"Expose to Home Assistant",slug:"expose-to-home-assistant",link:"#expose-to-home-assistant",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"topic",slug:"topic",link:"#topic",children:[]},{level:3,title:"payload",slug:"payload",link:"#payload",children:[]},{level:3,title:"data.timeSinceChanged",slug:"data-timesincechanged",link:"#data-timesincechanged",children:[]},{level:3,title:"data.timeSinceChangedMs",slug:"data-timesincechangedms",link:"#data-timesincechangedms",children:[]}]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/poll-state.html",pathLocale:"/",extraFields:[]},{title:"Render Template",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"template",slug:"template",link:"#template",children:[]},{level:3,title:"Template Location",slug:"template-location",link:"#template-location",children:[]},{level:3,title:"Results",slug:"results",link:"#results",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"template",slug:"template-1",link:"#template-1",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"template",slug:"template-2",link:"#template-2",children:[]},{level:3,title:"payload",slug:"payload",link:"#payload",children:[]}]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/render-template.html",pathLocale:"/",extraFields:[]},{title:"Select",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Mode",slug:"mode",link:"#mode",children:[]},{level:3,title:"value",slug:"value",link:"#value",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"Value",slug:"value-1",link:"#value-1",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/select.html",pathLocale:"/",extraFields:[]},{title:"Sensor",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"State",slug:"state",link:"#state",children:[]},{level:3,title:"Attributes",slug:"attributes",link:"#attributes",children:[]},{level:3,title:"Input Override",slug:"input-override",link:"#input-override",children:[]},{level:3,title:"Resend state and attributes",slug:"resend-state-and-attributes",link:"#resend-state-and-attributes",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"state",slug:"state-1",link:"#state-1",children:[]},{level:3,title:"attributes",slug:"attributes-1",link:"#attributes-1",children:[]}]}],path:"/node/sensor.html",pathLocale:"/",extraFields:[]},{title:"Sentence",headers:[{level:2,title:"Configuration Options",slug:"configuration-options",link:"#configuration-options",children:[{level:3,title:"Mode",slug:"mode",link:"#mode",children:[]},{level:3,title:"Sentences",slug:"sentences",link:"#sentences",children:[]},{level:3,title:"Response Type",slug:"response-type",link:"#response-type",children:[]},{level:3,title:"Response",slug:"response",link:"#response",children:[]},{level:3,title:"Fallback Response",slug:"fallback-response",link:"#fallback-response",children:[]},{level:3,title:"Response Timeout",slug:"response-timeout",link:"#response-timeout",children:[]},{level:3,title:"Expose As",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"Response",slug:"response-1",link:"#response-1",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[{level:3,title:"Basic Usage",slug:"basic-usage",link:"#basic-usage",children:[]},{level:3,title:"Dynamic Response Examples",slug:"dynamic-response-examples",link:"#dynamic-response-examples",children:[]}]}],path:"/node/sentence.html",pathLocale:"/",extraFields:[]},{title:"Switch",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Enable input",slug:"enable-input",link:"#enable-input",children:[]},{level:3,title:"Output on state change",slug:"output-on-state-change",link:"#output-on-state-change",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"msg.enable",slug:"msg-enable",link:"#msg-enable",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/switch.html",pathLocale:"/",extraFields:[]},{title:"Tag",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Tags",slug:"tags",link:"#tags",children:[]},{level:3,title:"Devices",slug:"devices",link:"#devices",children:[]},{level:3,title:"Expose as",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"event object",slug:"event-object",link:"#event-object",children:[]}]}],path:"/node/tag.html",pathLocale:"/",extraFields:[]},{title:"Text",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Mode",slug:"mode",link:"#mode",children:[]},{level:3,title:"Text",slug:"text-1",link:"#text-1",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"Text",slug:"text-2",link:"#text-2",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/text.html",pathLocale:"/",extraFields:[]},{title:"Time",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Mode",slug:"mode",link:"#mode",children:[]},{level:3,title:"Value",slug:"value",link:"#value",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"value",slug:"value-1",link:"#value-1",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/time-entity.html",pathLocale:"/",extraFields:[]},{title:"Time",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity Id",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"Property",slug:"property",link:"#property",children:[]},{level:3,title:"Offset",slug:"offset",link:"#offset",children:[]},{level:3,title:"Randomize time within the offset",slug:"randomize-time-within-the-offset",link:"#randomize-time-within-the-offset",children:[]},{level:3,title:"Payload",slug:"payload",link:"#payload",children:[]},{level:3,title:"Repeat Daily",slug:"repeat-daily",link:"#repeat-daily",children:[]},{level:3,title:"Expose as",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"topic",slug:"topic",link:"#topic",children:[]},{level:3,title:"payload",slug:"payload-1",link:"#payload-1",children:[]},{level:3,title:"data",slug:"data",link:"#data",children:[]}]}],path:"/node/time.html",pathLocale:"/",extraFields:[]},{title:"Trigger: state",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entity",slug:"entity",link:"#entity",children:[]},{level:3,title:"State Type",slug:"state-type",link:"#state-type",children:[]},{level:3,title:"Conditions",slug:"conditions",link:"#conditions",children:[]},{level:3,title:"Custom Outputs",slug:"custom-outputs",link:"#custom-outputs",children:[]},{level:3,title:"Output on connect",slug:"output-on-connect",link:"#output-on-connect",children:[]},{level:3,title:"Enable input",slug:"enable-input",link:"#enable-input",children:[]},{level:3,title:"Output debug information",slug:"output-debug-information",link:"#output-debug-information",children:[]},{level:3,title:"Expose to Home Assistant",slug:"expose-to-home-assistant",link:"#expose-to-home-assistant",children:[]}]},{level:2,title:"Input",slug:"input",link:"#input",children:[{level:3,title:"Enable / Disable",slug:"enable-disable",link:"#enable-disable",children:[]}]},{level:2,title:"Output",slug:"output",link:"#output",children:[{level:3,title:"topic",slug:"topic",link:"#topic",children:[]},{level:3,title:"payload",slug:"payload",link:"#payload",children:[]},{level:3,title:"data",slug:"data",link:"#data",children:[]}]},{level:2,title:"Testing",slug:"testing",link:"#testing",children:[]},{level:2,title:"References",slug:"references",link:"#references",children:[]}],path:"/node/trigger-state.html",pathLocale:"/",extraFields:[]},{title:"Update Config",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Name",slug:"name",link:"#name",children:[]},{level:3,title:"Server",slug:"server",link:"#server",children:[]},{level:3,title:"Entity Config",slug:"entity-config",link:"#entity-config",children:[]}]},{level:2,title:"Inputs",slug:"inputs",link:"#inputs",children:[{level:3,title:"Example input",slug:"example-input",link:"#example-input",children:[]},{level:3,title:"id",slug:"id",link:"#id",children:[]},{level:3,title:"icon",slug:"icon",link:"#icon",children:[]},{level:3,title:"name",slug:"name-1",link:"#name-1",children:[]},{level:3,title:"entityPicture",slug:"entitypicture",link:"#entitypicture",children:[]}]},{level:2,title:"Examples",slug:"examples",link:"#examples",children:[]}],path:"/node/update-config.html",pathLocale:"/",extraFields:[]},{title:"Wait Until",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entities",slug:"entities",link:"#entities",children:[]},{level:3,title:"Wait Until",slug:"wait-until-1",link:"#wait-until-1",children:[]},{level:3,title:"Timeout",slug:"timeout",link:"#timeout",children:[]},{level:3,title:"Check against the current state",slug:"check-against-the-current-state",link:"#check-against-the-current-state",children:[]}]},{level:2,title:"Input",slug:"input",link:"#input",children:[{level:3,title:"reset",slug:"reset",link:"#reset",children:[]},{level:3,title:"payload",slug:"payload",link:"#payload",children:[]},{level:3,title:"Example",slug:"example",link:"#example",children:[]},{level:3,title:"Full Payload",slug:"full-payload",link:"#full-payload",children:[]}]},{level:2,title:"Output",slug:"output",link:"#output",children:[]}],path:"/node/wait-until.html",pathLocale:"/",extraFields:[]},{title:"Webhook",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"ID",slug:"id",link:"#id",children:[]},{level:3,title:"Allowed Methods",slug:"allowed-methods",link:"#allowed-methods",children:[]},{level:3,title:"Expose as",slug:"expose-as",link:"#expose-as",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[]}],path:"/node/webhook.html",pathLocale:"/",extraFields:[]},{title:"Zone",headers:[{level:2,title:"Configuration",slug:"configuration",link:"#configuration",children:[{level:3,title:"Entities",slug:"entities",link:"#entities",children:[]},{level:3,title:"Event",slug:"event",link:"#event",children:[]},{level:3,title:"Zones",slug:"zones",link:"#zones",children:[]}]},{level:2,title:"Outputs",slug:"outputs",link:"#outputs",children:[{level:3,title:"topic",slug:"topic",link:"#topic",children:[]},{level:3,title:"payload",slug:"payload",link:"#payload",children:[]},{level:3,title:"data",slug:"data",link:"#data",children:[]},{level:3,title:"zones",slug:"zones-1",link:"#zones-1",children:[]}]}],path:"/node/zone.html",pathLocale:"/",extraFields:[]},{title:"Scrubber Tool",headers:[{level:2,title:"Key Features",slug:"key-features",link:"#key-features",children:[]}],path:"/scrubber/",pathLocale:"/",extraFields:[]},{title:"Action Node JSONata Examples",headers:[{level:2,title:"Passing variables to WebSocket nodes in summary",slug:"passing-variables-to-websocket-nodes-in-summary",link:"#passing-variables-to-websocket-nodes-in-summary",children:[]},{level:2,title:"JSONata and the Action node",slug:"jsonata-and-the-action-node",link:"#jsonata-and-the-action-node",children:[]},{level:2,title:"Setting the Data field",slug:"setting-the-data-field",link:"#setting-the-data-field",children:[{level:3,title:"Settings a data property from a Home Assistant entity",slug:"settings-a-data-property-from-a-home-assistant-entity",link:"#settings-a-data-property-from-a-home-assistant-entity",children:[]},{level:3,title:"Setting a data property from a Home Assistant entity with a calculation",slug:"setting-a-data-property-from-a-home-assistant-entity-with-a-calculation",link:"#setting-a-data-property-from-a-home-assistant-entity-with-a-calculation",children:[]},{level:3,title:"Increase lights brightness with remote",slug:"increase-lights-brightness-with-remote",link:"#increase-lights-brightness-with-remote",children:[]},{level:3,title:"Setting target temperature on air-conditioning unit",slug:"setting-target-temperature-on-air-conditioning-unit",link:"#setting-target-temperature-on-air-conditioning-unit",children:[]},{level:3,title:"Notification of lights left on when leaving home",slug:"notification-of-lights-left-on-when-leaving-home",link:"#notification-of-lights-left-on-when-leaving-home",children:[]}]},{level:2,title:"Processing a service call return",slug:"processing-a-service-call-return",link:"#processing-a-service-call-return",children:[]}],path:"/cookbook/jsonata/action.html",pathLocale:"/",extraFields:[]},{title:"Change node",headers:[{level:2,title:"Read a person state history for the past week",slug:"read-a-person-state-history-for-the-past-week",link:"#read-a-person-state-history-for-the-past-week",children:[]},{level:2,title:"Report only those periods when 'not home' during the day",slug:"report-only-those-periods-when-not-home-during-the-day",link:"#report-only-those-periods-when-not-home-during-the-day",children:[]}],path:"/cookbook/jsonata/change-node.html",pathLocale:"/",extraFields:[]},{title:"Current State",headers:[{level:3,title:"Creating output properties",slug:"creating-output-properties",link:"#creating-output-properties",children:[]},{level:3,title:"Providing a conditional test value (JSONata expression as a value)",slug:"providing-a-conditional-test-value-jsonata-expression-as-a-value",link:"#providing-a-conditional-test-value-jsonata-expression-as-a-value",children:[]},{level:3,title:"Generating UI field setting values",slug:"generating-ui-field-setting-values",link:"#generating-ui-field-setting-values",children:[]},{level:3,title:"Conditional test (JSONata expression as a Boolean result)",slug:"conditional-test-jsonata-expression-as-a-boolean-result",link:"#conditional-test-jsonata-expression-as-a-boolean-result",children:[]}],path:"/cookbook/jsonata/current-state.html",pathLocale:"/",extraFields:[]},{title:"Events: state",headers:[{level:3,title:"Providing a conditional test value (JSONata expression as a value)",slug:"providing-a-conditional-test-value-jsonata-expression-as-a-value",link:"#providing-a-conditional-test-value-jsonata-expression-as-a-value",children:[]},{level:3,title:"Conditional test (JSONata expression as a Boolean result)",slug:"conditional-test-jsonata-expression-as-a-boolean-result",link:"#conditional-test-jsonata-expression-as-a-boolean-result",children:[]},{level:3,title:"Creating output properties",slug:"creating-output-properties",link:"#creating-output-properties",children:[]},{level:3,title:"OR conditional for the Events: state node",slug:"or-conditional-for-the-events-state-node",link:"#or-conditional-for-the-events-state-node",children:[]}],path:"/cookbook/jsonata/events-state.html",pathLocale:"/",extraFields:[]},{title:"Other functions",headers:[{level:3,title:"Reading entity state and entity attributes with $entity() and $prevEntity()",slug:"reading-entity-state-and-entity-attributes-with-entity-and-preventity",link:"#reading-entity-state-and-entity-attributes-with-entity-and-preventity",children:[]},{level:3,title:"Using $entities() to return one or all entities",slug:"using-entities-to-return-one-or-all-entities",link:"#using-entities-to-return-one-or-all-entities",children:[]},{level:3,title:"Using $areas(), $areaDevices and $areaEntities()",slug:"using-areas-areadevices-and-areaentities",link:"#using-areas-areadevices-and-areaentities",children:[]}],path:"/cookbook/jsonata/functions.html",pathLocale:"/",extraFields:[]},{title:"Sensor",headers:[{level:3,title:"Setting the sensor state value",slug:"setting-the-sensor-state-value",link:"#setting-the-sensor-state-value",children:[]},{level:3,title:"Setting an attribute value",slug:"setting-an-attribute-value",link:"#setting-an-attribute-value",children:[]},{level:3,title:"Responding to state changes using JSONata",slug:"responding-to-state-changes-using-jsonata",link:"#responding-to-state-changes-using-jsonata",children:[]}],path:"/cookbook/jsonata/sensor.html",pathLocale:"/",extraFields:[]},{title:"Switch node",headers:[{level:3,title:"Using JSONata in switch routing",slug:"using-jsonata-in-switch-routing",link:"#using-jsonata-in-switch-routing",children:[]}],path:"/cookbook/jsonata/switch-node.html",pathLocale:"/",extraFields:[]},{title:"Trigger: state",headers:[{level:3,title:"Using JSONata to set a condition value",slug:"using-jsonata-to-set-a-condition-value",link:"#using-jsonata-to-set-a-condition-value",children:[]},{level:3,title:"Using JSONata to create a custom message",slug:"using-jsonata-to-create-a-custom-message",link:"#using-jsonata-to-create-a-custom-message",children:[]}],path:"/cookbook/jsonata/trigger-state.html",pathLocale:"/",extraFields:[]},{title:"Exposed Nodes",headers:[{level:2,title:"Nodes Available for Exposure",slug:"nodes-available-for-exposure",link:"#nodes-available-for-exposure",children:[]},{level:2,title:"Triggering Exposed Nodes via nodered.trigger",slug:"triggering-exposed-nodes-via-nodered-trigger",link:"#triggering-exposed-nodes-via-nodered-trigger",children:[{level:3,title:"entity_id",slug:"entity-id",link:"#entity-id",children:[]},{level:3,title:"output_path",slug:"output-path",link:"#output-path",children:[]},{level:3,title:"message",slug:"message",link:"#message",children:[]}]}],path:"/guide/custom_integration/exposed-nodes.html",pathLocale:"/",extraFields:[]},{title:"Getting Started",headers:[{level:2,title:"Installation",slug:"installation",link:"#installation",children:[]},{level:2,title:"Tip",slug:"tip",link:"#tip",children:[]}],path:"/guide/custom_integration/",pathLocale:"/",extraFields:[]},{title:"JSONata",headers:[{level:2,title:"Examples of using JSONata in the Home Assistant Nodes:",slug:"examples-of-using-jsonata-in-the-home-assistant-nodes",link:"#examples-of-using-jsonata-in-the-home-assistant-nodes",children:[]},{level:2,title:"Home Assistant functions",slug:"home-assistant-functions",link:"#home-assistant-functions",children:[]},{level:2,title:"Exposed Lodash functions",slug:"exposed-lodash-functions",link:"#exposed-lodash-functions",children:[]}],path:"/guide/jsonata/",pathLocale:"/",extraFields:[]},{title:"JSONata primer",headers:[{level:2,title:"The mapping (iteration) operator .",slug:"the-mapping-iteration-operator",link:"#the-mapping-iteration-operator",children:[]},{level:2,title:"The filter (selection) operator [ ]",slug:"the-filter-selection-operator",link:"#the-filter-selection-operator",children:[]},{level:2,title:"The reduce (aggregation) operator { }",slug:"the-reduce-aggregation-operator",link:"#the-reduce-aggregation-operator",children:[]},{level:2,title:"The order-by (sort) operator ^( )",slug:"the-order-by-sort-operator",link:"#the-order-by-sort-operator",children:[]},{level:2,title:"Other Operators",slug:"other-operators",link:"#other-operators",children:[]},{level:2,title:"Variables",slug:"variables",link:"#variables",children:[]},{level:2,title:"Functions",slug:"functions",link:"#functions",children:[]},{level:2,title:"Code blocks",slug:"code-blocks",link:"#code-blocks",children:[]},{level:2,title:"How it works in practice",slug:"how-it-works-in-practice",link:"#how-it-works-in-practice",children:[]},{level:2,title:"Errors and error handling",slug:"errors-and-error-handling",link:"#errors-and-error-handling",children:[]},{level:2,title:"Writing JSONata code",slug:"writing-jsonata-code",link:"#writing-jsonata-code",children:[]},{level:2,title:"What JSONata cannot do",slug:"what-jsonata-cannot-do",link:"#what-jsonata-cannot-do",children:[]}],path:"/guide/jsonata/jsonata-primer.html",pathLocale:"/",extraFields:[]},{title:"",headers:[],path:"/404.html",pathLocale:"/",extraFields:[]}],Hv=ae(Nv),Fv=()=>Hv,Vv=({searchIndex:e,routeLocale:t,query:n,maxSuggestions:l})=>{const i=I(()=>e.value.filter(o=>o.pathLocale===t.value));return I(()=>{const o=n.value.trim().toLowerCase();if(!o)return[];const r=[],s=(a,c)=>{es(o,[c.title])&&r.push({link:`${a.path}#${c.slug}`,title:a.title,header:c.title});for(const u of c.children){if(r.length>=l.value)return;s(a,u)}};for(const a of i.value){if(r.length>=l.value)break;if(es(o,[a.title,...a.extraFields])){r.push({link:a.path,title:a.title});continue}for(const c of a.headers){if(r.length>=l.value)break;s(a,c)}}return r})},$v=e=>{const t=ae(0);return{focusIndex:t,focusNext:()=>{t.value{t.value>0?t.value-=1:t.value=e.value.length-1}}},jv=fe({name:"SearchBox",props:{locales:{type:Object,default:()=>({})},hotKeys:{type:Array,default:()=>[]},maxSuggestions:{type:Number,default:5}},setup(e){const{locales:t,hotKeys:n,maxSuggestions:l}=uo(e),i=Qt(),o=In(),r=Fv(),s=ae(null),a=ae(!1),c=ae(""),u=I(()=>t.value[o.value]??{}),d=Vv({searchIndex:r,routeLocale:o,query:c,maxSuggestions:l}),{focusIndex:h,focusNext:m,focusPrev:b}=$v(d);Mv({input:s,hotKeys:n});const y=I(()=>a.value&&!!d.value.length),T=()=>{y.value&&b()},C=()=>{y.value&&m()},w=g=>{if(!y.value)return;const v=d.value[g];v&&i.push(v.link).then(()=>{c.value="",h.value=0})};return()=>se("form",{class:"search-box",role:"search"},[se("input",{ref:s,type:"search",placeholder:u.value.placeholder,autocomplete:"off",spellcheck:!1,value:c.value,onFocus:()=>a.value=!0,onBlur:()=>a.value=!1,onInput:g=>c.value=g.target.value,onKeydown:g=>{switch(g.key){case"ArrowUp":{T();break}case"ArrowDown":{C();break}case"Enter":{g.preventDefault(),w(h.value);break}}}}),y.value&&se("ul",{class:"suggestions",onMouseleave:()=>h.value=-1},d.value.map(({link:g,title:v,header:M},G)=>se("li",{class:["suggestion",{focus:h.value===G}],onMouseenter:()=>h.value=G,onMousedown:()=>w(G)},se("a",{href:g,onClick:D=>D.preventDefault()},[se("span",{class:"page-title"},v),M&&se("span",{class:"page-header"},`> ${M}`)]))))])}});var Bv=["s","/"],zv={};const Uv=zv,Wv=Bv,Kv=5,qv=gt({enhance({app:e}){e.component("SearchBox",t=>se(jv,{locales:Uv,hotKeys:Wv,maxSuggestions:Kv,...t}))}}),Gv=Object.freeze(Object.defineProperty({__proto__:null,default:qv},Symbol.toStringTag,{value:"Module"})),Jv=[{from:"/cookbook/get-entities.html",to:"/node/get-entities.html"},{from:"/guide/custom_integration/switch.html",to:"/node/switch.html"},{from:"/node/call-service.html",to:"/node/action.html"},{from:"/guide/call-service.html",to:"/guide/action.html"},{from:"/cookbook/jsonata/call-service.html",to:"/cookbook/jsonata/action.html"}],Qv=gt({enhance({router:e}){Jv.forEach(t=>{e.addRoute({path:t.from,redirect:t.to})})}}),Yv=Object.freeze(Object.defineProperty({__proto__:null,default:Qv},Symbol.toStringTag,{value:"Module"})),Rl=[zh,Xh,tp,pp,yp,Lp,Rp,hv,_v,Sv,Tv,Pv,Gv,Yv].map(e=>e.default).filter(Boolean),Zv=JSON.parse('{"base":"/node-red-contrib-home-assistant-websocket/","lang":"en-US","title":"node-red-contrib-home-assistant-websocket","description":"A suite of nodes that seamlessly integrates Home Assistant with Node-RED","head":[["link",{"rel":"icon","href":"/favicon.ico"}]],"locales":{}}');var Bn=Et(Zv),Xv=Pf,e_=()=>{const e=nh({history:Xv(pa("/node-red-contrib-home-assistant-websocket/")),routes:[{name:"vuepress-route",path:"/:catchAll(.*)",components:{}}],scrollBehavior:(t,n,l)=>l||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,n)=>{if(t.path!==n.path||n===Ct){const l=ol(t.fullPath);if(l.path!==t.fullPath)return l.path;const i=await l.loader();t.meta={...l.meta,_pageChunk:i}}else t.path===n.path&&(t.meta=n.meta)}),e},t_=e=>{e.component("ClientOnly",So),e.component("Content",Lo),e.component("RouteLink",hi)},n_=(e,t,n)=>{const l=I(()=>t.currentRoute.value.path),i=Fc((T,C)=>({get(){return T(),t.currentRoute.value.meta._pageChunk},set(w){t.currentRoute.value.meta._pageChunk=w,C()}})),o=I(()=>en.resolveLayouts(n)),r=I(()=>en.resolveRouteLocale(Bn.value.locales,l.value)),s=I(()=>en.resolveSiteLocaleData(Bn.value,r.value)),a=I(()=>i.value.comp),c=I(()=>i.value.data),u=I(()=>c.value.frontmatter),d=I(()=>en.resolvePageHeadTitle(c.value,s.value)),h=I(()=>en.resolvePageHead(d.value,u.value,s.value)),m=I(()=>en.resolvePageLang(c.value,s.value)),b=I(()=>en.resolvePageLayout(c.value,o.value)),y={layouts:o,pageData:c,pageComponent:a,pageFrontmatter:u,pageHead:h,pageHeadTitle:d,pageLang:m,pageLayout:b,redirects:Ji,routeLocale:r,routePath:l,routes:Ln,siteData:Bn,siteLocaleData:s};return e.provide(wo,y),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>u.value},$head:{get:()=>h.value},$headTitle:{get:()=>d.value},$lang:{get:()=>m.value},$page:{get:()=>c.value},$routeLocale:{get:()=>r.value},$site:{get:()=>Bn.value},$siteLocale:{get:()=>s.value},$withBase:{get:()=>Co}}),y},l_=()=>{const e=oh(),t=rh();let n=[];const l=()=>{e.value.forEach(r=>{const s=i_(r);s&&n.push(s)})},i=()=>{const r=[];return e.value.forEach(s=>{const a=o_(s);a&&r.push(a)}),r},o=()=>{document.documentElement.lang=t.value;const r=i();n.forEach((s,a)=>{const c=r.findIndex(u=>s.isEqualNode(u));c===-1?(s.remove(),delete n[a]):r.splice(c,1)}),r.forEach(s=>document.head.appendChild(s)),n=[...n.filter(s=>!!s),...r]};dn(ch,o),ze(()=>{l(),He(e,o,{immediate:!1})})},i_=([e,t,n=""])=>{const l=Object.entries(t).map(([s,a])=>at(a)?`[${s}=${JSON.stringify(a)}]`:a===!0?`[${s}]`:"").join(""),i=`head > ${e}${l}`;return Array.from(document.querySelectorAll(i)).find(s=>s.innerText===n)||null},o_=([e,t,n])=>{if(!at(e))return null;const l=document.createElement(e);return yo(t)&&Object.entries(t).forEach(([i,o])=>{at(o)?l.setAttribute(i,o):o===!0&&l.setAttribute(i,"")}),at(n)&&l.appendChild(document.createTextNode(n)),l},r_=Md,s_=async()=>{var n;const e=r_({name:"Vuepress",setup(){var o;l_();for(const r of Rl)(o=r.setup)==null||o.call(r);const l=Rl.flatMap(({rootComponents:r=[]})=>r.map(s=>se(s))),i=sh();return()=>[se(i.value),l]}}),t=e_();t_(e),n_(e,t,Rl);for(const l of Rl)await((n=l.enhance)==null?void 0:n.call(l,{app:e,router:t,siteData:Bn}));return e.use(t),{app:e,router:t}};s_().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{bo as T,we as _,le as a,oe as b,te as c,s_ as createVueApp,Wt as d,qu as e,Le as f,Ul as g,a_ as h,Pe as i,q as o,po as r,c_ as v,Ae as w}; diff --git a/assets/binary-sensor.html-DpRO3Fca.js b/assets/binary-sensor.html-DpRO3Fca.js new file mode 100644 index 0000000000..7223169116 --- /dev/null +++ b/assets/binary-sensor.html-DpRO3Fca.js @@ -0,0 +1 @@ +import{_ as s,c as i,e as a,a as t,d as o,b as r,o as l,r as d}from"./app-CefLgoES.js";const c={},u={id:"state",tabindex:"-1"},h={class:"header-anchor",href:"#state"};function p(b,e){const n=d("Badge");return l(),i("div",null,[e[1]||(e[1]=a('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Binary Sensor

    This node allows you to create a binary sensor entity within Home Assistant that can be controlled directly from Node-RED. A binary sensor is a type of entity that has only two possible states: typically "on" or "off". It can represent various real-world conditions, such as whether a door is open or closed, or if motion is detected.

    Configuration

    ',4)),t("h3",u,[t("a",h,[t("span",null,[e[0]||(e[0]=o("State ")),r(n,{text:"required"})])])]),e[2]||(e[2]=a('
    • Type: boolean

    The state of the entity should be updated to

    To set the Home Assistant state to Unknown, send a state with a js expression null.

    Attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    Input Override

    • Type: string
    • Values: accept | merge | block

    Determine how input values will be handled. When merge is selected the message object values will override the configuration values.

    Inputs

    properties of msg.payload

    state

    • Type: string | number | boolean

    The value of the entity state will be updated.

    attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    ',17))])}const f=s(c,[["render",p],["__file","binary-sensor.html.vue"]]),g=JSON.parse('{"path":"/node/binary-sensor.html","title":"Binary Sensor","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"State","slug":"state","link":"#state","children":[]},{"level":3,"title":"Attributes","slug":"attributes","link":"#attributes","children":[]},{"level":3,"title":"Input Override","slug":"input-override","link":"#input-override","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"state","slug":"state-1","link":"#state-1","children":[]},{"level":3,"title":"attributes","slug":"attributes-1","link":"#attributes-1","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2},{"name":"Mikko Tervala","email":"miksu103@gmail.com","commits":1}]},"filePathRelative":"node/binary-sensor.md"}');export{f as comp,g as data}; diff --git a/assets/button.html-nN_e7Cn2.js b/assets/button.html-nN_e7Cn2.js new file mode 100644 index 0000000000..0220735b08 --- /dev/null +++ b/assets/button.html-nN_e7Cn2.js @@ -0,0 +1 @@ +import{_ as e,c as n,e as o,o as i}from"./app-CefLgoES.js";const s={};function a(r,t){return i(),n("div",null,t[0]||(t[0]=[o('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Button

    The Button node creates a button entity within Home Assistant that, when pressed, triggers a flow in Node-RED. This is useful for manual triggers within automations, allowing users to start an automation sequence directly from the Home Assistant interface with a simple click.

    Outputs

    Value types:

    • entity: complete entity object
    • entity id: entity id of the pressed button
    • entity state: entity state of the pressed button
    • config: config properties of the node
    ',6)]))}const c=e(s,[["render",a],["__file","button.html.vue"]]),u=JSON.parse('{"path":"/node/button.html","title":"Button","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/button.md"}');export{c as comp,u as data}; diff --git a/assets/change-node.html-Zdmn2unv.js b/assets/change-node.html-Zdmn2unv.js new file mode 100644 index 0000000000..578bd098b2 --- /dev/null +++ b/assets/change-node.html-Zdmn2unv.js @@ -0,0 +1,60 @@ +import{_ as e,c as u,e as r,a as n,b as t,w as o,r as c,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_7_1-BgEt8HOI.png",k={};function q(d,s){const a=c("RouteLink");return l(),u("div",null,[s[2]||(s[2]=r('

    Change node

    Using JSONata for more complex tasks:

    Many automations can be coded using a simple JSONata expression at some convenient point in the flow, often directly within one of the WebSocket nodes. Where the data involved is a more complex structure, then JSONata is a powerful tool for manipulating JSON objects and arrays. Almost all computation can be achieved using JSONata in a Change node in place of using a Function node.

    Read a person state history for the past week

    Since Home Assistant stores state history for 10 days by default, it is possible to read historic state records. The Get History node can do this for any given entity, and using relative time it is easy to obtain an array of past state-change events.

    There are no opportunities to use JSONata within the Get History node itself, however JSONata can be used both to setup the node parameters and to manipulate the returned array. In this example, JSONata is used extensively to:

    • set the input parameters for the time period required
    • read the current entity state for 'now' and the given entity ID
    • add an 'event' for 'now' and an 'event' for the start history-period time
    • calculate the time interval between successive state changes to create 'event-periods'
    • filter out any event periods less than, say, 50 minutes or for state 'unknown'
    • compact any now sequential equal-state events into one longer period

    This returns a filtered array of entity states, with the time that state period started and the time it ended, and the duration in minutes. The requirement for extensive data processing here is due to the way 'person' sensors report, giving rise to short periods of 'unknown' or 'away' because Wi-Fi signal or a smart phone has gone 'off-line'.

    screenshot

    [{"id":"1997b594da7d37b1","type":"group","z":"776c027950fc8c3f","name":"Process history data using JSONata in a change node","style":{"label":true,"color":"#000000"},"nodes":["bd6511844a39ca08","3d87bbb92fa35243","9a3ca494edc54a30","3a4534cdc46ae67d","891ee0da3deec2c1","27f0ecf4ea3dc24f","d5dc0b522463577a"],"x":34,"y":2499,"w":1312,"h":122},{"id":"bd6511844a39ca08","type":"api-current-state","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"Get current state","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.george","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"payload ~> |$|{\\"entityId\\": $entity().entity_id}|","valueType":"jsonata"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":2540,"wires":[["9a3ca494edc54a30"]]},{"id":"3d87bbb92fa35243","type":"inject","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"Set parameters","props":[{"p":"payload"},{"p":"startAt","v":"$fromMillis($millis()-(7*24*60*60000))","vt":"jsonata"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\\"relativeTime\\": \\"1 week\\"\\t}","payloadType":"jsonata","x":160,"y":2540,"wires":[["bd6511844a39ca08"]]},{"id":"9a3ca494edc54a30","type":"api-get-history","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"Read history","server":"","version":1,"startDate":"","endDate":"","entityId":"","entityIdType":"equals","useRelativeTime":true,"relativeTime":"","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":530,"y":2540,"wires":[["3a4534cdc46ae67d"]]},{"id":"3a4534cdc46ae67d","type":"change","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"Get filtered state periods","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\\t/* FILTER parameters */\\t    $fMins:=50;\\t\\t/* get current state from entity 'data', and set the 'last_changed' to now */\\t    $first:= data~>|$|{\\"last_changed\\": $now()}|;\\t\\t/* add this to far end of history payload array, then sort by reverse time order */\\t    $x:=$append(payload, $first)^(>last_changed,>last_updated);\\t\\t/* copy the oldest state value, and add in as the first record at start of history */\\t/* we now have a 'now' and 'start of history' record, even if payload was empty    */    \\t    $x:=$append($x,{\\"state\\": $x[0].state, \\"last_changed\\": startAt});\\t\\t/* create array of state changes, with how long they have been in that state */\\t/* remove any zero periods and unknown states FILTER OUT AS REQUIRED         */\\t    $events:=$x#$i.(\\t        $prior:= $i>0 ? $x[$i-1] : {\\"first\\": $now()};\\t        {\\"index\\": $i,\\t         \\"state\\": state,\\t         \\"from\\": last_changed,\\t         \\"upto\\": $prior.last_changed,\\t         \\"dmins\\": ($toMillis($prior.last_changed)-$toMillis(last_changed))/60000~>$round(0)\\t        }\\t    )[dmins>$fMins and state!=\\"unknown\\"];\\t\\t/* merge consecutive records with the same state into one longer period */\\t/* get each event position as 'start - middle - end' or 'only'          */\\t\\t    $temp:=$events#$v.(\\t        $back:= $v<1 ? false : state = $events[$v-1].state;\\t        $next:= state = $events[$v+1].state;\\t        $position:=( $back ? ($next ? \\"middle\\" : \\"end\\") : ($next ? \\"start\\" : \\"only\\") );\\t        $~>|$|{\\"index\\": $v, \\"position\\": $position}|\\t    );\\t\\t/* get start and end indexes, and zip into a sequence array of [start, end]  */\\t/* map this array of sequences to an array of objects, one for each sequence */\\t/* where the object is the combination of a run of the same state value      */\\t\\t    $chain:=$zip($temp[position=\\"start\\"].index, $temp[position=\\"end\\"].index);\\t\\t    $array:=$map($chain, function($item) {(\\t        $recA:=$events[$item[0]];\\t        $recB:=$events[$item[1]];\\t        {\\"state\\": $recA.state,\\t        \\"from\\": $recB.from,\\t        \\"upto\\":  $recA.upto,\\t        \\"dmins\\": ($toMillis($recA.upto)-$toMillis($recB.from))/60000~>$round(0),\\t        \\"position\\": \\"merged\\"}\\t        )\\t    });\\t\\t/* combine the 'only' single events with the now-merged sequences, and sort by time */\\t    $append($temp[position=\\"only\\"], $array)^(>from);\\t\\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":2540,"wires":[["891ee0da3deec2c1","27f0ecf4ea3dc24f"]]},{"id":"891ee0da3deec2c1","type":"debug","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"State History Events","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1200,"y":2540,"wires":[]},{"id":"27f0ecf4ea3dc24f","type":"change","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"When 'not home' during the day","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[state=\\"not_home\\" and ($substringBefore(from,\\"T\\") = $substringBefore(upto,\\"T\\") ) ]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":2580,"wires":[["d5dc0b522463577a"]]},{"id":"d5dc0b522463577a","type":"debug","z":"776c027950fc8c3f","g":"1997b594da7d37b1","name":"Out during the day","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1190,"y":2580,"wires":[]}]
    +
    (
    +/* FILTER parameters */
    +    $fMins:=50;
    +
    +/* get current state from entity 'data', and set the 'last_changed' to now */
    +    $first:= data~>|$|{"last_changed": $now()}|;
    +
    +/* add this to far end of history payload array, then sort by reverse time order */
    +    $x:=$append(payload, $first)^(>last_changed,>last_updated);
    +
    +/* copy the oldest state value, and add in as the first record at start of history */
    +/* we now have a 'now' and 'start of history' record, even if payload was empty    */
    +    $x:=$append($x,{"state": $x[0].state, "last_changed": startAt});
    +
    +/* create array of state changes, with how long they have been in that state */
    +/* remove any zero periods and unknown states FILTER OUT AS REQUIRED         */
    +    $events:=$x#$i.(
    +        $prior:= $i>0 ? $x[$i-1] : {"first": $now()};
    +        {"index": $i,
    +         "state": state,
    +         "from": last_changed,
    +         "upto": $prior.last_changed,
    +         "dmins": ($toMillis($prior.last_changed)-$toMillis(last_changed))/60000~>$round(0)
    +        }
    +    )[dmins>$fMins and state!="unknown"];
    +
    +/* merge consecutive records with the same state into one longer period */
    +/* get each event position as 'start - middle - end' or 'only'          */
    +
    +    $temp:=$events#$v.(
    +        $back:= $v<1 ? false : state = $events[$v-1].state;
    +        $next:= state = $events[$v+1].state;
    +        $position:=( $back ? ($next ? "middle" : "end") : ($next ? "start" : "only") );
    +        $~>|$|{"index": $v, "position": $position}|
    +    );
    +
    +/* get start and end indexes, and zip into a sequence array of [start, end]  */
    +/* map this array of sequences to an array of objects, one for each sequence */
    +/* where the object is the combination of a run of the same state value      */
    +
    +    $chain:=$zip($temp[position="start"].index, $temp[position="end"].index);
    +
    +    $array:=$map($chain, function($item) {(
    +        $recA:=$events[$item[0]];
    +        $recB:=$events[$item[1]];
    +        {"state": $recA.state,
    +        "from": $recB.from,
    +        "upto":  $recA.upto,
    +        "dmins": ($toMillis($recA.upto)-$toMillis($recB.from))/60000~>$round(0),
    +        "position": "merged"}
    +        )
    +    });
    +
    +/* combine the 'only' single events with the now-merged sequences, and sort by time */
    +    $append($temp[position="only"], $array)^(>from);
    +
    +)
    +

    Notes:

    The Inject node uses JSONata to initially create msg.payload as a data object, setting the relative time parameter for the Get History node, and also setting the timestamp for the effective start of this time period.

    The Current State node uses JSONata in the output to retain msg.payload and also merge in the entityId using $entity().entity_id. This now sets msg.payload with the required input parameters for the Get History node (which therefore requires no UI settings). Full entity details are also captured in msg.data as usual.

    Caution

    This example code has been tested but person sensors can go 'off line' for long periods and the exact nature of the output data should be checked by experimentation.

    Report only those periods when 'not home' during the day

    Once state history has been manipulated like this into an event-array, it is easy to ask questions, such as "how many times has this person been away this week?"

    The question "when was this person away during the day?" for example, can be answered by filtering the state event array, to look for 'not home' and for the event period (both start and end) to be entirely on the same date.

    payload[state="not_home" and ($substringBefore(from,"T") = $substringBefore(upto,"T") ) ]
    +

    Note on history records:

    In asking for the history for the past 24 hours, the Get History node will return an array of all state change events that occurred within that time period. If the current state has been unchanged for the entire period requested, then an empty array will be returned.

    To address this, the JSONata code here first adds a record for 'now' with the current state. The code then finds the oldest state (which may well be the current 'now' state just added) and adds that as a record for 'the start of the time period requested' at that state. This ensures that the returned history event array is topped and tailed. The minimum state event array will therefore be one entry from start of history request to now, at the current state.

    Also see:

    `,23)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const h=e(k,[["render",q],["__file","change-node.html.vue"]]),g=JSON.parse(`{"path":"/cookbook/jsonata/change-node.html","title":"Change node","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Read a person state history for the past week","slug":"read-a-person-state-history-for-the-past-week","link":"#read-a-person-state-history-for-the-past-week","children":[]},{"level":2,"title":"Report only those periods when 'not home' during the day","slug":"report-only-those-periods-when-not-home-during-the-day","link":"#report-only-those-periods-when-not-home-during-the-day","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/change-node.md"}`);export{h as comp,g as data}; diff --git a/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours.html-CcLo08bo.js b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours.html-CcLo08bo.js new file mode 100644 index 0000000000..cb7d72e4d0 --- /dev/null +++ b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours.html-CcLo08bo.js @@ -0,0 +1,3 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_01-BvAOESUS.png",e="/node-red-contrib-home-assistant-websocket/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_02-CCEMNzXI.png",u={};function c(r,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Check if an entity was a certain state in the last 24 hours

    Use the get-history to get a list of state changes for the last 24 hours. Filter them using a switch node looking for a given state and then count the remaining to see if the entity was in that state during the time frame.

    screenshot

    [{"id":"3f683250.b26f1e","type":"inject","z":"ffbd7f06.4a014","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":236,"y":1008,"wires":[["e60a02e6.d2afc"]]},{"id":"aa3e26cd.152828","type":"debug","z":"ffbd7f06.4a014","name":"do something","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":976,"y":1008,"wires":[]},{"id":"e60a02e6.d2afc","type":"api-get-history","z":"ffbd7f06.4a014","name":"","startdate":"","enddate":"","entityid":"light.kitchen_light","entityidtype":"is","useRelativeTime":true,"relativeTime":"24 hours","flatten":true,"output_type":"split","output_location_type":"msg","output_location":"payload","x":380,"y":1008,"wires":[["b162effa.fc78f"]]},{"id":"b162effa.fc78f","type":"switch","z":"ffbd7f06.4a014","name":"on?","property":"payload.state","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":true,"outputs":1,"x":530,"y":1008,"wires":[["e4b98b67.bde238"]]},{"id":"e4b98b67.bde238","type":"join","z":"ffbd7f06.4a014","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":658,"y":1008,"wires":[["fff04d54.5615e"]]},{"id":"fff04d54.5615e","type":"switch","z":"ffbd7f06.4a014","name":"count > 0","property":"payload.length","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":true,"outputs":1,"x":796,"y":1008,"wires":[["aa3e26cd.152828"]]}]
    +

    Here's the same example but using a function node.

    screenshot

    [{"id":"f79cd7b0.604f98","type":"inject","z":"ffbd7f06.4a014","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":332,"y":1200,"wires":[["753a1de3.091fa4"]]},{"id":"753a1de3.091fa4","type":"api-get-history","z":"ffbd7f06.4a014","name":"","startdate":"","enddate":"","entityid":"light.kitchen_light","entityidtype":"is","useRelativeTime":true,"relativeTime":"24 hours","flatten":true,"output_type":"array","output_location_type":"msg","output_location":"payload","x":476,"y":1200,"wires":[["389b5575.43217a"]]},{"id":"389b5575.43217a","type":"function","z":"ffbd7f06.4a014","name":"check state","func":"const state = \\"on\\";\\nconst filtered = msg.payload.filter((entity) => entity.state === state);\\n\\nif(filtered.length > 0) {\\n    msg.payload = filtered;\\n    return msg;\\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":644,"y":1200,"wires":[["6a582450.883bdc"]]},{"id":"6a582450.883bdc","type":"debug","z":"ffbd7f06.4a014","name":"do something","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":832,"y":1200,"wires":[]}]
    +
    `,7)]))}const k=n(u,[["render",c],["__file","check-if-an-entity-was-turned-on-in-the-last-24-hours.html.vue"]]),q=JSON.parse('{"path":"/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html","title":"Check if an entity was a certain state in the last 24 hours","lang":"en-US","frontmatter":{},"headers":[],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.md"}');export{k as comp,q as data}; diff --git a/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_01-BvAOESUS.png b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_01-BvAOESUS.png new file mode 100644 index 0000000000..f496463240 Binary files /dev/null and b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_01-BvAOESUS.png differ diff --git a/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_02-CCEMNzXI.png b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_02-CCEMNzXI.png new file mode 100644 index 0000000000..935201cec0 Binary files /dev/null and b/assets/check-if-an-entity-was-turned-on-in-the-last-24-hours_02-CCEMNzXI.png differ diff --git a/assets/conditionals.html-CBA0fNuv.js b/assets/conditionals.html-CBA0fNuv.js new file mode 100644 index 0000000000..c9a87ed321 --- /dev/null +++ b/assets/conditionals.html-CBA0fNuv.js @@ -0,0 +1,4 @@ +import{_ as o,c as i,e as n,a as s,d as a,b as l,w as r,r as d,o as c}from"./app-CefLgoES.js";const p={};function h(u,e){const t=d("RouteLink");return c(),i("div",null,[e[5]||(e[5]=n(`

    Conditionals

    Rules

    ==, !=, is, and is not

    These operators check if a value is equal to or different from the expected value using the equality operator. The is and is not are aliases for == and !=.

    <, <=, >, and >=

    These operators compare values to determine if one is less than, less than or equal to, greater than, or greater than or equal to another value.

    in and not in

    These operators check if a value is within a specified list of items. The list should be comma-separated.

    Example

    in: "on,off"
    +

    includes and not includes

    These operators check if an array includes or does not include a specified value.

    is null and is not null

    These operators check if a value is null or not.

    JSONata

    `,15)),s("p",null,[e[1]||(e[1]=a("This rule expects a boolean result from evaluating a value using JSONata, a powerful expression language. More information can be found ")),e[2]||(e[2]=s("a",{href:"https://jsonata.org/",target:"_blank",rel:"noopener noreferrer"},"here",-1)),e[3]||(e[3]=a(", with examples specific to Home Assistant ")),l(t,{to:"/guide/jsonata/"},{default:r(()=>e[0]||(e[0]=[a("here")])),_:1}),e[4]||(e[4]=a("."))]),e[6]||(e[6]=n(`

    starts with

    This operator checks if a value begins with the expected string.

    in group

    This operator checks if a value is present in the attributes.entity_id property of a given group.

    Value Types

    string, number, boolean, regular expression, and JSONata expression

    These types evaluate and return the value as the specified type.

    msg, flow, and global

    These refer to the different contexts within Node-RED.

    entity and prevEntity

    These refer to the entities that triggered the node.

    • entity refers to the current state entity.
    • prevEntity refers to the previous state entity.

    Examples

    To reference the current state of the entity:

    entity.: "state"
    +

    To reference the brightness attribute of the entity:

    entity.: "attributes.brightness"
    +
    `,17))])}const f=o(p,[["render",h],["__file","conditionals.html.vue"]]),m=JSON.parse('{"path":"/guide/conditionals.html","title":"Conditionals","lang":"en-US","frontmatter":{"sidebarDepth":2},"headers":[{"level":2,"title":"Rules","slug":"rules","link":"#rules","children":[{"level":3,"title":"==, !=, is, and is not","slug":"is-and-is-not","link":"#is-and-is-not","children":[]},{"level":3,"title":"<, <=, >, and >=","slug":"and","link":"#and","children":[]},{"level":3,"title":"in and not in","slug":"in-and-not-in","link":"#in-and-not-in","children":[]},{"level":3,"title":"includes and not includes","slug":"includes-and-not-includes","link":"#includes-and-not-includes","children":[]},{"level":3,"title":"is null and is not null","slug":"is-null-and-is-not-null","link":"#is-null-and-is-not-null","children":[]},{"level":3,"title":"JSONata","slug":"jsonata","link":"#jsonata","children":[]},{"level":3,"title":"starts with","slug":"starts-with","link":"#starts-with","children":[]},{"level":3,"title":"in group","slug":"in-group","link":"#in-group","children":[]}]},{"level":2,"title":"Value Types","slug":"value-types","link":"#value-types","children":[{"level":3,"title":"string, number, boolean, regular expression, and JSONata expression","slug":"string-number-boolean-regular-expression-and-jsonata-expression","link":"#string-number-boolean-regular-expression-and-jsonata-expression","children":[]},{"level":3,"title":"msg, flow, and global","slug":"msg-flow-and-global","link":"#msg-flow-and-global","children":[]},{"level":3,"title":"entity and prevEntity","slug":"entity-and-preventity","link":"#entity-and-preventity","children":[]}]}],"git":{"updatedTime":1723537386000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5}]},"filePathRelative":"guide/conditionals.md"}');export{f as comp,m as data}; diff --git a/assets/config-server.html-Cr4_zaGv.js b/assets/config-server.html-Cr4_zaGv.js new file mode 100644 index 0000000000..515a8df4c8 --- /dev/null +++ b/assets/config-server.html-Cr4_zaGv.js @@ -0,0 +1,5 @@ +import{_ as a,c as t,e as s,o as n}from"./app-CefLgoES.js";const o={};function i(l,e){return n(),t("div",null,e[0]||(e[0]=[s(`

    Server Config

    The Server Config node is used for configuring the connection to Home Assistant. This node manages the details of how Node-RED communicates with your Home Assistant instance, including server URL, authentication, and other connection settings.

    Config

    Name

    • Type: string

    Label for this configuration, see details below for implications

    Using the Home Assistant Add-on

    • Type: boolean

    If you're running Node-RED as a Hass.io Add-on check this. No other information is needed.

    Base URL

    • Type: string

    The base URL and port of the Home Assistant instance can be reached at, for example: http://192.168.0.100:8123 or https://homeassistant.mysite.com

    Access Token

    • Type: string

    Long-lived Access Token used to contact the API

    Unauthorized SSL Certificates

    • Type: boolean

    This will allow you to use self-signed certificates. Only use this if you know what you're doing.

    State Boolean

    • Type: string | delimited

    A list of strings, not case sensitive, delimited by vertical pipe, |, that will return true for State Type Boolean.

    Enable Heartbeat

    • Type: boolean

    Heartbeat will send a ping message using the websocket connection to Home Assistant every X seconds. If a pong response is not received within 5 seconds Node-RED will attempt to reconnect to Home Assistant.

    Heartbeat Interval

    • Type: number

    The interval at which the ping message is sent to Home Assistant. The minimum value is 10 seconds.

    Enable Global Context Store

    • Type: boolean

    If enabled, the global context store will be used to store the Home Assistant connection, state, and service information. This allows you to use the information in other nodes using context functions.

    Example below

    UI Settings

    Cache Autocomplete Results

    Enables the caching of the JSON autocomplete requests. Enabling or disabling this may require a restart of Node-RED for it to take effect.

    ID Selector Display

    Which text to show in the selector after the id has been chosen.

    Status Date Format

    Separator

    A string that will appear in the status of an event node between the state and date string.

    Other options

    The other options are directly from DateTimeFormat Options.

    Details

    Every node requires a configuration attached to define how to contact Home Assistant, which is this config node's main purpose.

    Context

    Each config node will also make some data available in the global context, the Name value in this node is used as, camelcase, and the namespace for those values

    Currently states, services, and events is made available in the global context. states is always set to all available states at startup and updated whenever state changes occur so it should be always up to date. services and events is only updated on initial deploy.

    Context Example

    Say we have a config node with the name Home Assistant, with an entity set up in Home Assistant as switch.my_switch. This state would be available within function nodes and you could fetch using something like the below code

    const haCtx = global.get("homeassistant");
    +const configCtx = haCtx.homeAssistant;
    +const entityState = configCtx.states["switch.my_switch"];
    +return entityState.state === "on" ? true : false;
    +

    Connection Issues

    Communication with Home Assistant is accomplished via a combination of WebSocket and the REST API if you are having trouble communicating with home assistant make sure you can access the API outside of node-red, but from the same server node-red is running on, using a REST client, curl, or any number of other methods to validate the connection

    References

    Home Assistant REST API

    `,53)]))}const r=a(o,[["render",i],["__file","config-server.html.vue"]]),h=JSON.parse('{"path":"/node/config-server.html","title":"Server Config","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Config","slug":"config","link":"#config","children":[{"level":3,"title":"Name","slug":"name","link":"#name","children":[]},{"level":3,"title":"Using the Home Assistant Add-on","slug":"using-the-home-assistant-add-on","link":"#using-the-home-assistant-add-on","children":[]},{"level":3,"title":"Base URL","slug":"base-url","link":"#base-url","children":[]},{"level":3,"title":"Access Token","slug":"access-token","link":"#access-token","children":[]},{"level":3,"title":"Unauthorized SSL Certificates","slug":"unauthorized-ssl-certificates","link":"#unauthorized-ssl-certificates","children":[]},{"level":3,"title":"State Boolean","slug":"state-boolean","link":"#state-boolean","children":[]},{"level":3,"title":"Enable Heartbeat","slug":"enable-heartbeat","link":"#enable-heartbeat","children":[]},{"level":3,"title":"Heartbeat Interval","slug":"heartbeat-interval","link":"#heartbeat-interval","children":[]},{"level":3,"title":"Enable Global Context Store","slug":"enable-global-context-store","link":"#enable-global-context-store","children":[]}]},{"level":2,"title":"UI Settings","slug":"ui-settings","link":"#ui-settings","children":[{"level":3,"title":"Cache Autocomplete Results","slug":"cache-autocomplete-results","link":"#cache-autocomplete-results","children":[]},{"level":3,"title":"ID Selector Display","slug":"id-selector-display","link":"#id-selector-display","children":[]},{"level":3,"title":"Status Date Format","slug":"status-date-format","link":"#status-date-format","children":[]}]},{"level":2,"title":"Details","slug":"details","link":"#details","children":[{"level":3,"title":"Context","slug":"context","link":"#context","children":[]},{"level":3,"title":"Context Example","slug":"context-example","link":"#context-example","children":[]}]},{"level":2,"title":"Connection Issues","slug":"connection-issues","link":"#connection-issues","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":11}]},"filePathRelative":"node/config-server.md"}');export{r as comp,h as data}; diff --git a/assets/current-state.html-Bfj39oy2.js b/assets/current-state.html-Bfj39oy2.js new file mode 100644 index 0000000000..404fb79f80 --- /dev/null +++ b/assets/current-state.html-Bfj39oy2.js @@ -0,0 +1,14 @@ +import{_ as e,c as u,e as c,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/jsonata_2_1-AVzKzbZv.png",i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbIAAAA1CAMAAAATb576AAABmFBMVEUqKiouLi49PT09PWk9PY89RlA9U489X6g9aK49jc1DVnxFRUVNTU1NTXVNTZhNXpBNcKpNeK9QRj1SgLVbW1tcTU1dXV1fX19iYmJkZGRpPT1pPWlprOZxTU11TXV1dXV1s+h2TU16enp8VkN+fn6AUk2AgICFhYWIiIiJiYmMjIyPPT2PPWmPUz2Py/+VlZWYTU2Yz/+goKCoXz2oqKisrKyuaD2u5+au5/+wsLCxsbG0dE206f+6urq75P+9vb2+vr6/4O3AwMDCwsLDw8PExMTE2+3FxcXGxsbHx8fIyMjLy8vMzMzNVlfNjT3Nzc3N8//N///Ozs7PXF3Q0NDRlk3R///U1NTY2NjY2arY7e3ciovc3Nzd3d3e7e3g4ODg8//g///h4eHjv5DjzL/j4LXj7e3k5OTmrGnmy4/m5ubm///n5+fos3Xo6Ojq6urrz8/r6+vs7Ozt2art3q/t4LXt7e3w7+/09PT13d78/Pz/y4//z5j/5Lv/567/6bT/7eD/883//83//9H//+D//+b//+j///9NTNToAAADE0lEQVR42u3bCVPTQBgGYIwX1XiLZ73ricYbK6B4oMVgURvRar3xqBB7qemlqFXI33Z3k0baxpmatIbded+ZXtsQKM98u1+bpsdEOEsP/gUgQ0CGgAxkCMgQkIEMARmyiMlKSXWsG1GTJesXlFNaXLRoqXJwZCVVr3RlxxVdZWZlLVc02skirqKWv7WY08qBkSX1ru1aT9LrVM4whCMzjFwqMDK10rVdV1R6rRWFJCtqgZGNdXvfcUNIMiMOMpCBDGQgAxnIuCQriET29YBkZ9VlUcn0h9efikP266zkZOVLMjA3EDbNtCQpJntAhkP0VnF+rHY8yhlZ9vzqLao4ZLV+22v5RmnZPZusLsT45gZ6ZzpL9vPU6f9KljnZs1lAshV3f5yok9Gx3hlyf3ZnlF1fIMUWNmd3SNLSKH1SMauSXYc8VBkli91J5sUhI/VFxMw/ZE6V1fpDpl1uChFTWMXRKquSTS1Pr1X2QZbXDPt5dRGZJNI22cj+M9PCkNH6YmKtE6NdWAvWsjQjsx6mQ97Jvqx9YNKL9yQoWaJtstGLt7ICkZnfX1AxFzKSKp0krQFrwiRk9mzqk8xnIk6RLST7tE9m2fCsaS0rcLOWfT4ob3pjX966T4zEjIm5k9FNFDpAtgzbVUZGfLYf80Oy7LMHSThF1lBlU31UbN3Vpiq7cek2L1X2cZe8/pF9efyX9oNOjZIbWZo1IWSEDlTpg/rEGPbfMU76XMzMSMS1/aBmDWKM7Mrhc7o4VcYafFcyq/0gvQYjI09XJbv9IAvcP7q1NvnzQ3v9lVnCvWOc6msUs6rs2v2syG+lnYmRvZVm1UUWrgly9z2xmqATpETbfn9r2bfdwx16pU3tx+ubLe3H1vECPrDyOTFOyr4Xs7bfl706suTQE3wszNEHVoXYtu2jWZDxQzY9uOfYeAYHX/ghywwejT3P43gZR2QF/V0ehzg5W8twVBpkIAMZyEDWmeAL3t7IAvyCN06j8EYW4GkUOFnJC1mgJyvhlEDuTglEOhCQgQwBGQIykCEgQ0AGMiTY/AYI3Glr/FJkAQAAAABJRU5ErkJggg==",q="/node-red-contrib-home-assistant-websocket/assets/jsonata_boolean-BjpZUFYr.png",g={};function y(d,s){const a=r("RouteLink");return l(),u("div",null,[s[2]||(s[2]=c('

    Current State

    The Current State node has several opportunities to use JSONata. This example demonstrates all of these, using a node to fetch the current state of a climate air-conditioning unit.

    The default output values for this node include setting msg.payload to the state (which for an A/C unit will be "off", "heat", "cool" or more, depending on the integration) as well as msg.data to the entire entity data object. This holds values for the last changed timestamp as well as attributes such as the friendly name and other integration dependent settings.

    screenshot

    Here are three examples, showing how to use JSONata to build output properties, to perform If-State conditional tests, and to provide calculated values for UI settings.

    [{"id":"d0f1fad3bf96a090","type":"group","z":"776c027950fc8c3f","name":"Current State node - read the state of an entity","style":{"label":true,"color":"#000000"},"nodes":["6394700dfd39838f","8388eb36d3e25254","852c05cf8c7cae73","a3e69091339a457c","11fc322e343cbd9c","6ac52ef3e9010615","63fa3b7423417fe4","a29810da49f1efd4","4f8197db85d55fb5","fd6d41b2f67b85e0","36912490ae36c0db","f84772ea62e6e7ba","6244f42dd53b7e1f","bc6cd64ba0266d97"],"x":34,"y":499,"w":1012,"h":382},{"id":"6394700dfd39838f","type":"api-current-state","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.bedroom_aircon","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"(\\t    $att:=$entity().attributes;\\t    $diff:=$att.temperature-$att.current_temperature;\\t    ($diff>0 ? \\"Heating\\" : \\"Cooling\\") & \\" by \\" & $abs($diff) & \\" degrees required\\"\\t)","valueType":"jsonata"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":580,"wires":[["852c05cf8c7cae73"]]},{"id":"8388eb36d3e25254","type":"inject","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":580,"wires":[["6394700dfd39838f"]]},{"id":"852c05cf8c7cae73","type":"debug","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"Output Text","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":770,"y":580,"wires":[]},{"id":"a3e69091339a457c","type":"comment","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"2a - JSONata builds output in current state node","info":"","x":240,"y":540,"wires":[]},{"id":"11fc322e343cbd9c","type":"api-current-state","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"","server":"","version":3,"outputs":2,"halt_if":"$entities('sensor.time').state < \\"17:00\\" ? \\"cool\\" : \\"off\\"","halt_if_type":"jsonata","halt_if_compare":"is","entity_id":"climate.bedroom_aircon","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"$entity().state = \\"off\\" ? 0 : 2","forType":"jsonata","forUnits":"hours","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":700,"wires":[["63fa3b7423417fe4"],["a29810da49f1efd4"]]},{"id":"6ac52ef3e9010615","type":"inject","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":700,"wires":[["11fc322e343cbd9c"]]},{"id":"63fa3b7423417fe4","type":"debug","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"Cooling for 2+ hours before 17:00, or Off","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":840,"y":680,"wires":[]},{"id":"a29810da49f1efd4","type":"debug","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"otherwise","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":700,"y":740,"wires":[]},{"id":"4f8197db85d55fb5","type":"comment","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"2b - JSONata builds conditional test value, and UI parameter","info":"","x":280,"y":660,"wires":[]},{"id":"fd6d41b2f67b85e0","type":"comment","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"2c - JSONata builds conditional Boolean","info":"","x":220,"y":780,"wires":[]},{"id":"36912490ae36c0db","type":"api-current-state","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"","server":"","version":3,"outputs":2,"halt_if":"(\\t    $state:=$entity().state;\\t    $time:=$entities('sensor.time').state;\\t    ($time<=\\"09:00\\" or $time>=\\"17:00\\") and ($state=\\"heat\\" or $state=\\"cool\\")\\t)","halt_if_type":"jsonata","halt_if_compare":"jsonata","entity_id":"climate.bedroom_aircon","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":"$substringAfter($now(),\\"T\\")>\\"10:00\\" ? 20 : 10","forType":"jsonata","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":820,"wires":[["6244f42dd53b7e1f"],["bc6cd64ba0266d97"]]},{"id":"f84772ea62e6e7ba","type":"inject","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":820,"wires":[["36912490ae36c0db"]]},{"id":"6244f42dd53b7e1f","type":"debug","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"On outside of office hours","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload.state","targetType":"msg","statusVal":"payload.state","statusType":"auto","x":850,"y":800,"wires":[]},{"id":"bc6cd64ba0266d97","type":"debug","z":"776c027950fc8c3f","g":"d0f1fad3bf96a090","name":"otherwise","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload.state","targetType":"msg","statusVal":"payload.state","statusType":"auto","x":680,"y":840,"wires":[]}]
    +

    Creating output properties

    Example: Report the difference between room temperature and target temperature for an air-conditioning unit.

    In the first example we are looking to retrieve the current state and attributes from an air-conditioning unit, and output a text message describing the difference between current and target temperature. The A/C unit current temperature (read only) and the A/C unit target temperature (can be set with a service call) are located in the entity attributes. These are both numbers, so it is very easy to calculate the difference.

    Note: The default value msg.data is set only for the output message, and therefore msg.data.state would be used to obtain the entity state in nodes further along the flow, but $entity().state is used to obtain the entity state in JSONata expressions inside the node. When using JSONata to build an output message property, there is no requirement to retain the default output property settings for msg.data unless this is specifically required later in the flow.

    (
    +    $att:=$entity().attributes;
    +    $diff:=$att.temperature-$att.current_temperature;
    +    ($diff>0 ? "Heating" : "Cooling") & " by " & $abs($diff) & " degrees required"
    +)
    +

    Providing a conditional test value (JSONata expression as a value)

    Example: Output only where the A/C unit has been cooling for two hours and the local time is before 17:00, or when the unit is off.

    The Current State node provides for a state value test opportunity, which if set can be used to direct the message output one of two ways, depending whether the entity state passes or fails the test. When the If State option is chosen with a conditional (not JSONata) the condition expects a value to test against. In this example, using JSONata on the right hand side will return the value of the evaluated expression ("cool" before 17:00 and "off" otherwise) to be tested against the current state value and using the chosen conditional operator.

    screenshot

    $entities('sensor.time').state < "17:00" ? "cool" : "off"
    +

    Generating UI field setting values

    The Current State node also allows for a For, or duration of state test, and here JSONata is again being used to return either '0' when the state is "off" or '2' (hours) when the state is not "off". This complex arrangement will together test for the A/C unit being either immediately off after 17:00, or in cooling mode for at least two hours before 17:00.

    $entity().state = "off" ? 0 : 2
    +

    Note that here the use of $entity().state returns the current state of the node's subject entity, and that $entities('sensor.time').state returns the state of another specified entity. The Time & Date Integration should be added to the configuration file, and then the time sensor will return the current local time. This is useful for local-time condition testing, whereas the time_utc sensor will return UTC-time which is more useful with Home Assistant timestamps.

    Conditional test (JSONata expression as a Boolean result)

    Example: Report the air-conditioning unit being on outside of office hours.

    When the If State option is chosen with JSONata (not a conditional) then the right hand side must be a JSONata expression that returns a Boolean value of either true or false. When true the If State test is successful (the message is output from the top exit) when false the test fails (the message is output from the lower exit).

    screenshot

    In this example the JSONata expression is a code block, obtaining the node subject entity state and separate entity local time as in the previous example, but now combining both into one predicate expression. If the local time is outside 09:00 to 17:00 and the state is either heat or cool, then the expression will return true.

    (
    +    $state:=$entity().state;
    +    $time:=$entities('sensor.time').state;
    +    ($time<="09:00" or $time>="17:00") and ($state="heat" or $state="cool")
    +)
    +

    JSONata used at this point can be extensive, with a combination of entity states or attributes and Boolean logic as required. The use of OR to combine various states can only be more easily achieved in this way.

    Also see:

    `,28)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const m=e(g,[["render",y],["__file","current-state.html.vue"]]),h=JSON.parse('{"path":"/cookbook/jsonata/current-state.html","title":"Current State","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Creating output properties","slug":"creating-output-properties","link":"#creating-output-properties","children":[]},{"level":3,"title":"Providing a conditional test value (JSONata expression as a value)","slug":"providing-a-conditional-test-value-jsonata-expression-as-a-value","link":"#providing-a-conditional-test-value-jsonata-expression-as-a-value","children":[]},{"level":3,"title":"Generating UI field setting values","slug":"generating-ui-field-setting-values","link":"#generating-ui-field-setting-values","children":[]},{"level":3,"title":"Conditional test (JSONata expression as a Boolean result)","slug":"conditional-test-jsonata-expression-as-a-boolean-result","link":"#conditional-test-jsonata-expression-as-a-boolean-result","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/current-state.md"}');export{m as comp,h as data}; diff --git a/assets/current-state.html-iUU17wBN.js b/assets/current-state.html-iUU17wBN.js new file mode 100644 index 0000000000..94da6c5245 --- /dev/null +++ b/assets/current-state.html-iUU17wBN.js @@ -0,0 +1 @@ +import{_ as r,c as d,a as t,d as n,b as i,w as o,e as u,r as s,o as p}from"./app-CefLgoES.js";const c={},h={id:"entity-id",tabindex:"-1"},f={class:"header-anchor",href:"#entity-id"};function g(y,e){const a=s("Badge"),l=s("RouteLink");return p(),d("div",null,[e[5]||(e[5]=t("h1",{id:"current-state",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#current-state"},[t("span",null,"Current State")])],-1)),e[6]||(e[6]=t("p",null,"This node is used to fetch the last known state of any entity within Home Assistant when it receives an input. It’s useful for making decisions based on the current status of entities, such as checking if a light is already on before turning it off, or determining the temperature reading before adjusting the thermostat.",-1)),e[7]||(e[7]=t("h2",{id:"configuration",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configuration"},[t("span",null,"Configuration")])],-1)),t("h3",h,[t("a",f,[t("span",null,[e[0]||(e[0]=n("Entity ID ")),i(a,{text:"required"})])])]),t("ul",null,[e[3]||(e[3]=t("li",null,[n("Type: "),t("code",null,"string")],-1)),t("li",null,[e[2]||(e[2]=n("Accepts ")),i(l,{to:"/guide/mustache-templates.html"},{default:o(()=>e[1]||(e[1]=[n("Mustache Templates")])),_:1})])]),e[8]||(e[8]=t("p",null,"The id of the entity to return.",-1)),e[9]||(e[9]=t("h3",{id:"if-state",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#if-state"},[t("span",null,"If State")])],-1)),e[10]||(e[10]=t("ul",null,[t("li",null,[n("Type: "),t("code",null,"string")])],-1)),e[11]||(e[11]=t("p",null,"If the conditional statement is evaluated as true send the message to the first output otherwise send it to the second output. If blank there will only be one output.",-1)),e[12]||(e[12]=t("p",null,[t("strong",null,"Also see:")],-1)),t("ul",null,[t("li",null,[i(l,{to:"/guide/conditionals.html"},{default:o(()=>e[4]||(e[4]=[n("Conditionals")])),_:1})])]),e[13]||(e[13]=u('

    For

    • Type: number

    The amount of time the entity state needs to have been constant for the "If state" to be true

    State Type

    • Type: string
    • Values: string|number|boolean
    • Default: string

    Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state

    Block Input Overrides

    • Type: boolean
    • Default: false

    Stop msg.payload values from overriding local config

    Inputs

    payload.entityId

    • Type : string

      Overrides or sets the entity id for which the current state is being fetched

    Outputs

    Value types:

    • entity: full entity object
    • entity id: entity id of the triggered entity
    • entity state: entity state of the triggered entity
    • config: config properties of the node

    References

    ',17))])}const b=r(c,[["render",g],["__file","current-state.html.vue"]]),v=JSON.parse('{"path":"/node/current-state.html","title":"Current State","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity ID","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"If State","slug":"if-state","link":"#if-state","children":[]},{"level":3,"title":"For","slug":"for","link":"#for","children":[]},{"level":3,"title":"State Type","slug":"state-type","link":"#state-type","children":[]},{"level":3,"title":"Block Input Overrides","slug":"block-input-overrides","link":"#block-input-overrides","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"payload.entityId","slug":"payload-entityid","link":"#payload-entityid","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1725861627000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":8},{"name":"Simon Kaiser","email":"simon@emperor.ch","commits":1},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"node/current-state.md"}');export{b as comp,v as data}; diff --git a/assets/development.html-DoDYJ5BC.js b/assets/development.html-DoDYJ5BC.js new file mode 100644 index 0000000000..907af95ef6 --- /dev/null +++ b/assets/development.html-DoDYJ5BC.js @@ -0,0 +1,11 @@ +import{_ as n,c as t,e as a,o as s}from"./app-CefLgoES.js";const o={};function l(i,e){return s(),t("div",null,e[0]||(e[0]=[a(`

    Development

    For detailed contributing guidelines, refer to CONTRIBUTING.md.

    Environment Setup

    Follow these steps to set up your development environment for contributing to this project:

    Using the VS Code Dev Container

    This method sets up a Docker container with all required tools and dependencies.

    1. Fork the Node-RED Home Assistant repository.

    2. Clone your forked repository:

      git clone https://github.com/<GITHUB_USER_NAME>/node-red-contrib-home-assistant-websocket
      +
    3. Open the project in VS Code.

    4. Install the Remote - Containers extension.

    5. Click the green button in the lower-left corner labeled "Reopen in Container."

    6. Wait for the container to build and start.

    7. Open a terminal in VS Code and run pnpm dev to start the development server.

    Local Setup

    1. Fork the Repository:

    2. Clone Your Forked Repository:

      • Clone the forked repository to your local machine:

        git clone https://github.com/<GITHUB_USER_NAME>/node-red-contrib-home-assistant-websocket
        +
    3. Navigate to the Project Directory:

      • Change to the project’s root directory:

        cd node-red-contrib-home-assistant-websocket
        +
    4. Setup the Environment:

      • You can either run the setup script or manually configure the environment:

      Option A: Run the Setup Script

      • Execute the provided setup script to automate the environment configuration:

        ./scripts/setup.sh
        +

      Option B: Manual Setup

      • Alternatively, you can manually create a .node-red directory and link pnpm:

        mkdir .node-red
        +corepack enable && corepack enable pnpm
        +pnpm link --dir .node-red
        +
    5. Start Node-RED:

      • Launch Node-RED in development mode:

        pnpm dev
        +

    Accessing the Development Server

    After running pnpm dev, Node-RED will be available on ports 1880 and 3000. Access the development server at:

    Port 3000 includes browser-sync, which will automatically reload the browser when changes are made to the editor source code.

    Linting

    This project uses ESLint and Prettier for code linting and formatting. Run the following command to lint the code:

    pnpm lint
    +

    Testing

    To run the tests, use:

    pnpm test
    +
    `,19)]))}const p=n(o,[["render",l],["__file","development.html.vue"]]),c=JSON.parse('{"path":"/guide/development.html","title":"Development","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Environment Setup","slug":"environment-setup","link":"#environment-setup","children":[{"level":3,"title":"Using the VS Code Dev Container","slug":"using-the-vs-code-dev-container","link":"#using-the-vs-code-dev-container","children":[]},{"level":3,"title":"Local Setup","slug":"local-setup","link":"#local-setup","children":[]},{"level":3,"title":"Accessing the Development Server","slug":"accessing-the-development-server","link":"#accessing-the-development-server","children":[]},{"level":3,"title":"Linting","slug":"linting","link":"#linting","children":[]},{"level":3,"title":"Testing","slug":"testing","link":"#testing","children":[]}]}],"git":{"updatedTime":1724312245000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/development.md"}');export{p as comp,c as data}; diff --git a/assets/device-config.html-CLVeK5h2.js b/assets/device-config.html-CLVeK5h2.js new file mode 100644 index 0000000000..a1b3cca71b --- /dev/null +++ b/assets/device-config.html-CLVeK5h2.js @@ -0,0 +1 @@ +import{_ as a,c as i,e as n,o as r}from"./app-CefLgoES.js";const o={};function t(s,e){return r(),i("div",null,e[0]||(e[0]=[n('

    Device Config

    The Device Config node is used for configuring devices that have been added to Home Assistant. It allows you to set up and manage device-specific settings and options within Node-RED, ensuring that your automations can correctly interact with your devices.

    Configuration

    Name

    • Type: string

    The name of the device that will show in Home Assistant

    Manufacturer

    • Type: string

    The manufacturer of the device

    Model

    • Type: string

    The model of the device

    Software Version

    • Type: string

    The software version of the device

    Hardware Version

    • Type: string

    The hardware version of the device

    ',18)]))}const c=a(o,[["render",t],["__file","device-config.html.vue"]]),d=JSON.parse('{"path":"/node/device-config.html","title":"Device Config","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Name","slug":"name","link":"#name","children":[]},{"level":3,"title":"Manufacturer","slug":"manufacturer","link":"#manufacturer","children":[]},{"level":3,"title":"Model","slug":"model","link":"#model","children":[]},{"level":3,"title":"Software Version","slug":"software-version","link":"#software-version","children":[]},{"level":3,"title":"Hardware Version","slug":"hardware-version","link":"#hardware-version","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/device-config.md"}');export{c as comp,d as data}; diff --git a/assets/device.html-BC-eSPOC.js b/assets/device.html-BC-eSPOC.js new file mode 100644 index 0000000000..ba6221ade4 --- /dev/null +++ b/assets/device.html-BC-eSPOC.js @@ -0,0 +1 @@ +import{_ as i,c as t,e as a,o as n}from"./app-CefLgoES.js";const s={};function o(l,e){return n(),t("div",null,e[0]||(e[0]=[a('

    Device

    The Device node enables you to create device automations and call device actions within Home Assistant. This node interacts with devices connected to your Home Assistant instance, allowing you to perform tasks such as turning devices on or off, changing settings, or triggering specific device-related actions.

    Configuration

    Type

    • Type: string
    • Values: trigger | action

    Device

    • Type: string

    Id of the device

    Trigger

    • Type: object

    Home Assistant object of the trigger

    Action

    • Type: object

    Home Assistant object of the action

    Capabilities

    • Type: object

    Expose as

    • Type: string

    When an entity is selected a switch entity will be created in Home Assistant. Turning on and off this switch will disable/enable the nodes in Node-RED.

    Outputs

    Value types:

    • config: config properties of the node
    • device id: device id that triggered the node
    • event data: event data received from Home Assistant
    • sent data: data sent to Home Assistant
    ',22)]))}const d=i(s,[["render",o],["__file","device.html.vue"]]),r=JSON.parse('{"path":"/node/device.html","title":"Device","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Type","slug":"type","link":"#type","children":[]},{"level":3,"title":"Device","slug":"device-1","link":"#device-1","children":[]},{"level":3,"title":"Trigger","slug":"trigger","link":"#trigger","children":[]},{"level":3,"title":"Action","slug":"action","link":"#action","children":[]},{"level":3,"title":"Capabilities","slug":"capabilities","link":"#capabilities","children":[]},{"level":3,"title":"Expose as","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5}]},"filePathRelative":"node/device.md"}');export{d as comp,r as data}; diff --git a/assets/diagnostics.html-BcQQWJ2q.js b/assets/diagnostics.html-BcQQWJ2q.js new file mode 100644 index 0000000000..4f4377a4d4 --- /dev/null +++ b/assets/diagnostics.html-BcQQWJ2q.js @@ -0,0 +1,2 @@ +import{_ as o,c as t,e as s,o as i}from"./app-CefLgoES.js";const a="/node-red-contrib-home-assistant-websocket/assets/diagnostics_04-Df7nsYrl.png",n="/node-red-contrib-home-assistant-websocket/assets/diagnostics_05-BT6Gqs0E.gif",r="/node-red-contrib-home-assistant-websocket/assets/diagnostics_01-BGDg5hGH.png",l="/node-red-contrib-home-assistant-websocket/assets/diagnostics_02-BCb_i0sN.png",c="/node-red-contrib-home-assistant-websocket/assets/diagnostics_03-DLYbYdSd.png",p={};function d(h,e){return i(),t("div",null,e[0]||(e[0]=[s('

    Diagnostics Information

    Overview

    To streamline troubleshooting, a diagnostics button has been added to the Node-RED editor. This button runs a diagnostics flow and copies the output to your clipboard for easy pasting into a GitHub issue or support forum.

    Note

    In versions prior to 0.62.0, the diagnostics flow was available as a separate flow that needed to be imported manually. You can still access and use this flow here.

    Diagnostics Button Location

    Finding the Diagnostics Button

    For Versions Prior to 0.62.0

    Before version 0.62.0, the diagnostics flow was a separate tool for collecting runtime and system environment data. It can still be imported into Node-RED to gather essential information for troubleshooting.

    Flow

    Diagnostics Flow

    You can also import this flow directly from the examples section in Node-RED:

    @examples/diagnostic.json
    +

    Usage

    1. Import the flow into Node-RED.

    2. Deploy the flow.

    3. Click the Inject node to execute the flow.

      Debug Window

    4. Copy the output from the Debug tab.

      Copy Output

    5. Paste the copied output into a GitHub issue or support ticket.

    ',15)]))}const u=o(p,[["render",d],["__file","diagnostics.html.vue"]]),m=JSON.parse('{"path":"/guide/diagnostics.html","title":"Diagnostics Information","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Overview","slug":"overview","link":"#overview","children":[]},{"level":2,"title":"For Versions Prior to 0.62.0","slug":"for-versions-prior-to-0-62-0","link":"#for-versions-prior-to-0-62-0","children":[{"level":3,"title":"Flow","slug":"flow","link":"#flow","children":[]},{"level":3,"title":"Usage","slug":"usage","link":"#usage","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"guide/diagnostics.md"}');export{u as comp,m as data}; diff --git a/assets/diagnostics_01-BGDg5hGH.png b/assets/diagnostics_01-BGDg5hGH.png new file mode 100644 index 0000000000..15865cf3cd Binary files /dev/null and b/assets/diagnostics_01-BGDg5hGH.png differ diff --git a/assets/diagnostics_02-BCb_i0sN.png b/assets/diagnostics_02-BCb_i0sN.png new file mode 100644 index 0000000000..b33a5eb797 Binary files /dev/null and b/assets/diagnostics_02-BCb_i0sN.png differ diff --git a/assets/diagnostics_03-DLYbYdSd.png b/assets/diagnostics_03-DLYbYdSd.png new file mode 100644 index 0000000000..ca2cc7b26c Binary files /dev/null and b/assets/diagnostics_03-DLYbYdSd.png differ diff --git a/assets/diagnostics_04-Df7nsYrl.png b/assets/diagnostics_04-Df7nsYrl.png new file mode 100644 index 0000000000..a65c1786fe Binary files /dev/null and b/assets/diagnostics_04-Df7nsYrl.png differ diff --git a/assets/diagnostics_05-BT6Gqs0E.gif b/assets/diagnostics_05-BT6Gqs0E.gif new file mode 100644 index 0000000000..dcef73b62e Binary files /dev/null and b/assets/diagnostics_05-BT6Gqs0E.gif differ diff --git a/assets/documentation.html-EIu1gqB9.js b/assets/documentation.html-EIu1gqB9.js new file mode 100644 index 0000000000..ba7a599641 --- /dev/null +++ b/assets/documentation.html-EIu1gqB9.js @@ -0,0 +1,4 @@ +import{_ as a,c as n,e as t,o}from"./app-CefLgoES.js";const s={};function i(l,e){return o(),n("div",null,e[0]||(e[0]=[t(`

    Documentation

    The documentation is built with VuePress v2. The pages are written in Markdown and are located in the docs directory.

    Small changes

    If you want to make small changes to the documentation, you can do so directly in the GitHub web interface. Just navigate to the file you want to change and click the pencil icon in the top right corner.

    There is a link on the bottom of each page to edit the file directly in the GitHub web interface.

    Local development

    If you want to make larger changes to the documentation, you can clone the repository.

    Developing with Visual Studio Code and Docker

    1. Install Visual Studio Code.

    2. Install the Remote - Containers extension.

    3. Go to the Node-RED Home Assistant repository and fork it.

    4. Clone your forked repository to your local machine.

      git clone https://github.com/<GITHUB_USER_NAME>/node-red-contrib-home-assistant-websocket
      +
    5. Open the repository in Visual Studio Code.

    6. Click on the green "Open a Remote Window" button in the bottom left corner and select "Reopen in Container".

    7. Open a terminal in Visual Studio Code and run pnpm docs:dev to start the development server.

    Manual environment

    1. Install Node.js.

    2. Enable pnpm

      corepack enable && corepack enable npm
      +
    3. Go to the Node-RED Home Assistant repository and fork it.

    4. Clone your forked repository to your local machine.

      git clone https://github.com/<GITHUB_USER_NAME>/node-red-contrib-home-assistant-websocket
      +
    5. Open the repository in your favorite editor.

    6. Run pnpm install to install the dependencies.

    7. Run pnpm run docs:dev to start the development server.

    `,11)]))}const p=a(s,[["render",i],["__file","documentation.html.vue"]]),c=JSON.parse('{"path":"/guide/documentation.html","title":"Documentation","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Small changes","slug":"small-changes","link":"#small-changes","children":[]},{"level":2,"title":"Local development","slug":"local-development","link":"#local-development","children":[{"level":3,"title":"Developing with Visual Studio Code and Docker","slug":"developing-with-visual-studio-code-and-docker","link":"#developing-with-visual-studio-code-and-docker","children":[]},{"level":3,"title":"Manual environment","slug":"manual-environment","link":"#manual-environment","children":[]}]}],"git":{"updatedTime":1724315473000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/documentation.md"}');export{p as comp,c as data}; diff --git a/assets/entity-config.html-B7KWX0GA.js b/assets/entity-config.html-B7KWX0GA.js new file mode 100644 index 0000000000..76aca789d1 --- /dev/null +++ b/assets/entity-config.html-B7KWX0GA.js @@ -0,0 +1 @@ +import{_ as l,c as d,e as i,a as t,d as n,b as a,w as h,r as s,o as c}from"./app-CefLgoES.js";const p={},u={id:"type",tabindex:"-1"},f={class:"header-anchor",href:"#type"};function m(g,e){const o=s("RouteLink"),r=s("Badge");return c(),d("div",null,[e[3]||(e[3]=i('

    Entity Config

    The Entity Config node provides configuration options for the different entity type nodes within Node-RED. It’s used to set up and manage the properties and settings for entities, ensuring they behave as expected within your automations and Home Assistant environment.

    Configuration

    Name

    • Type: string

    The name of the entity that will show in Node-RED

    Device

    ',7)),t("ul",null,[e[1]||(e[1]=t("li",null,[n("Type: "),t("code",null,"string")],-1)),t("li",null,[a(o,{to:"/node/device-config.html"},{default:h(()=>e[0]||(e[0]=[n("device config documentation")])),_:1})])]),e[4]||(e[4]=t("p",null,"A list of devices the entity can be associated with. This is used to group entities together in the UI.",-1)),e[5]||(e[5]=t("div",{class:"hint-container warning"},[t("p",{class:"hint-container-title"},"Caveat"),t("p",null,"If the entity has already been registered with Home Assistant when no device was selected. The device will not be added to the Home Assistant until after Home Assistant has been restarted.")],-1)),t("h3",u,[t("a",f,[t("span",null,[e[2]||(e[2]=n("Type ")),a(r,{text:"required"})])])]),e[6]||(e[6]=i('
    • Type: string
    • Values: binary_sensor|button|sensor|switch

    Resend state and attributes

    • Type: boolean

    When the entity in Home Assistant is created the state and attributes will also be set. This is only applicable with certain entities nodes.

    Other Properties

    Configuration options are available for the selected entities

    https://developers.home-assistant.io/docs/core/entity

    ',7))])}const v=l(p,[["render",m],["__file","entity-config.html.vue"]]),b=JSON.parse('{"path":"/node/entity-config.html","title":"Entity Config","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Name","slug":"name","link":"#name","children":[]},{"level":3,"title":"Device","slug":"device","link":"#device","children":[]},{"level":3,"title":"Type","slug":"type","link":"#type","children":[]},{"level":3,"title":"Resend state and attributes","slug":"resend-state-and-attributes","link":"#resend-state-and-attributes","children":[]},{"level":3,"title":"Other Properties","slug":"other-properties","link":"#other-properties","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4},{"name":"Joakim Vindgard","email":"joakim.vindgard@gmail.com","commits":1}]},"filePathRelative":"node/entity-config.md"}');export{v as comp,b as data}; diff --git a/assets/entity.html-C290Kyy8.js b/assets/entity.html-C290Kyy8.js new file mode 100644 index 0000000000..b7c8070ce8 --- /dev/null +++ b/assets/entity.html-C290Kyy8.js @@ -0,0 +1 @@ +import{_ as o,c as l,e as n,a as t,d as s,b as i,o as r,r as d}from"./app-CefLgoES.js";const h={},u={id:"type",tabindex:"-1"},c={class:"header-anchor",href:"#type"},p={id:"state",tabindex:"-1"},b={class:"header-anchor",href:"#state"};function g(f,e){const a=d("Badge");return r(),l("div",null,[e[2]||(e[2]=n('

    DEPRECATED

    This node has been deprecated in favor of the individual entity nodes. The individual entity nodes can be used in subflows and added to devices.

    Entity

    Creates an entity in Home Assistant which can be manipulated from this node.

    binary sensor, sensor, and switch

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Configuration

    ',6)),t("h3",u,[t("a",c,[t("span",null,[e[0]||(e[0]=s("Type ")),i(a,{text:"required"})])])]),e[3]||(e[3]=n('
    • Type: string
    • Values binary_sensor|sensor|switch
    • Default: sensor

    The state the entity should be updated to

    Home Assistant Config

    • Type: Object

    Configuration options available for the selected entity

    WARNING

    Entity nodes will not work in a subflow due to the way they register themselves with Home Assistant. After a Node-RED restart, a new entity will be created in Home Assistant.

    Sensor Configuration

    ',7)),t("h3",p,[t("a",b,[t("span",null,[e[1]||(e[1]=s("State ")),i(a,{text:"required"})])])]),e[4]||(e[4]=n('
    • Type: string | number | boolean

    The state the entity should be updated to

    Attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    Input Override

    • Type: string
    • Values: accept | merge | block

    Determine how input values will be handled. When merge is selected the message object values will override the configuration values.

    Resend state and attributes

    • Type: boolean

    When creating the entity in Home Assistant this will also send the last updated state and attributes then node sent to Home Assistant

    Switch Configuration

    Output on state change

    • Type: boolean

    When the state of the switch changes it will output to the top if the switch is on or to the bottom if it is in the off position.

    Payload

    • Type: str | num | bool | JSONata | timestamp

    Customizable output set to msg.payload if Output on state change is enabled.

    Sensors Inputs

    properties of msg.payload

    state

    • Type: string | number | boolean

    The state the entity should be updated to

    attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    Switch Inputs

    msg.enable

    • Type: boolean

    Set to true to turn on the switch and false to turn off. If the message has a property enable set to the type boolean the node will not have any output.

    Outputs

    Status Color

    • Green/Red: output from the node was due to input to the node
    • Blue: output from the node was due to the state of the node changing
    • Yellow: state of node changed but no output
    ',33))])}const y=o(h,[["render",g],["__file","entity.html.vue"]]),v=JSON.parse('{"path":"/node/entity.html","title":"Entity","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Type","slug":"type","link":"#type","children":[]},{"level":3,"title":"Home Assistant Config","slug":"home-assistant-config","link":"#home-assistant-config","children":[]}]},{"level":2,"title":"Sensor Configuration","slug":"sensor-configuration","link":"#sensor-configuration","children":[{"level":3,"title":"State","slug":"state","link":"#state","children":[]},{"level":3,"title":"Attributes","slug":"attributes","link":"#attributes","children":[]},{"level":3,"title":"Input Override","slug":"input-override","link":"#input-override","children":[]},{"level":3,"title":"Resend state and attributes","slug":"resend-state-and-attributes","link":"#resend-state-and-attributes","children":[]}]},{"level":2,"title":"Switch Configuration","slug":"switch-configuration","link":"#switch-configuration","children":[{"level":3,"title":"Output on state change","slug":"output-on-state-change","link":"#output-on-state-change","children":[]},{"level":3,"title":"Payload","slug":"payload","link":"#payload","children":[]}]},{"level":2,"title":"Sensors Inputs","slug":"sensors-inputs","link":"#sensors-inputs","children":[{"level":3,"title":"state","slug":"state-1","link":"#state-1","children":[]},{"level":3,"title":"attributes","slug":"attributes-1","link":"#attributes-1","children":[]}]},{"level":2,"title":"Switch Inputs","slug":"switch-inputs","link":"#switch-inputs","children":[{"level":3,"title":"msg.enable","slug":"msg-enable","link":"#msg-enable","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1662500089000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6}]},"filePathRelative":"node/entity.md"}');export{y as comp,v as data}; diff --git a/assets/events-all.html-DaUOW7Yj.js b/assets/events-all.html-DaUOW7Yj.js new file mode 100644 index 0000000000..7b5392988c --- /dev/null +++ b/assets/events-all.html-DaUOW7Yj.js @@ -0,0 +1 @@ +import{_ as t,c as n,e as s,o as a}from"./app-CefLgoES.js";const i={};function o(l,e){return a(),n("div",null,e[0]||(e[0]=[s('

    Events: all

    This node listens for all types of events from Home Assistant, with the ability to filter by event type. It’s a powerful tool for triggering automations based on specific events occurring within Home Assistant, such as state changes, sensor readings, or user interactions.

    Configuration

    Name

    • Type: string

    the name of the node

    Event Type

    • Type: string

    filter by event type or leave blank for all events

    Caution

    Leaving this empty will listen for all events from Home Assistant which may overload the WebSocket message queue.

    GitHub Issue #153

    Event data

    • Type: json

    A JSON object that will be compared to the event data. If this JSON is a subset of the event data object, the event will be emitted.

    Output only after Home Assistant is running

    • Type: boolean

    What until Home Assistant has reported its state as running before outputting events. Client events will always output.

    Expose as

    • Type: entity config

    Creates a switch within Home Assistant to enable/disable this node. This feature requires Node-RED custom integration to be installed in Home Assistant

    Outputs

    Value types:

    • event data: event received from Home Assistant
    • config: config properties of the node

    Client Events

    Use home_assistant_client as the event type to receive events from the Websocket client.

    Events sent from the client:

    • connecting - when trying to connect to HA
    • connected - after the authorization has been accepted
    • disconnected - when the socket stops attempting to connect or disconnected after having been connected
    • error - when a disconnect happens of the WebSocket with an error
    • states_loaded - the first time all states are loaded from HA
    • services_loaded - the first time all services are loaded from HA
    • running - when HA is in a running state and states have been loaded
    ',26)]))}const c=t(i,[["render",o],["__file","events-all.html.vue"]]),h=JSON.parse('{"path":"/node/events-all.html","title":"Events: all","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Name","slug":"name","link":"#name","children":[]},{"level":3,"title":"Event Type","slug":"event-type","link":"#event-type","children":[]},{"level":3,"title":"Event data","slug":"event-data","link":"#event-data","children":[]},{"level":3,"title":"Output only after Home Assistant is running","slug":"output-only-after-home-assistant-is-running","link":"#output-only-after-home-assistant-is-running","children":[]},{"level":3,"title":"Expose as","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Client Events","slug":"client-events","link":"#client-events","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":10}]},"filePathRelative":"node/events-all.md"}');export{c as comp,h as data}; diff --git a/assets/events-by-label-C-FreXr0.png b/assets/events-by-label-C-FreXr0.png new file mode 100644 index 0000000000..f474b25edd Binary files /dev/null and b/assets/events-by-label-C-FreXr0.png differ diff --git a/assets/events-by-label.html-CPBhLpQj.js b/assets/events-by-label.html-CPBhLpQj.js new file mode 100644 index 0000000000..1fa6135288 --- /dev/null +++ b/assets/events-by-label.html-CPBhLpQj.js @@ -0,0 +1,2 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/events-by-label-C-FreXr0.png",e={};function u(c,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Events by Label

    Here's a flow inspired by a feature request that listens for state_changed events with a specific label. This is great for filtering by domain or capturing all events linked to a particular label.

    💡 What it does:

    • Listens for state_changed events in Home Assistant.
    • Filters events based on a defined label.
    • Option to filter by domain or capture all events with that label.

    screenshot

    [{"id":"56092aa4390d93bf","type":"ha-api","z":"3aa045026af17229","name":"entities","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/entity_registry/list\\"}","dataType":"json","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":540,"y":304,"wires":[["9227dd2dc5056d39"]]},{"id":"9227dd2dc5056d39","type":"function","z":"3aa045026af17229","name":"","func":"const entities = {};\\n\\nmsg.payload.forEach((e) => {    \\n    entities[e.entity_id] = e.labels;\\n});\\n\\nmsg.payload = entities;\\nmsg.update = true;\\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":724,"y":304,"wires":[["072d3e5fd5e540cb"]]},{"id":"072d3e5fd5e540cb","type":"function","z":"3aa045026af17229","name":"add label","func":"if(msg.update) {\\n    node.status({fill:\\"green\\", shape: \\"dot\\", text: \\"data loaded\\", })\\n    context.set(\\"data\\", msg.payload);\\n    return;\\n}\\nconst data = context.get(\\"data\\");\\n\\nif(!data) {\\n    node.status({fill:\\"red\\", shape: \\"ring\\", text: \\"no data\\", })\\n    return;\\n}\\n\\nmsg.labels = data[msg.payload.entity_id];\\n\\nreturn msg;\\n\\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":352,"wires":[["666d393a4c0cb248"]]},{"id":"55b25821a65fcdde","type":"server-events","z":"3aa045026af17229","name":"on connect","server":"","version":3,"exposeAsEntityConfig":"","eventType":"home_assistant_client","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"}],"x":172,"y":304,"wires":[["2f3c8ac155fe3383"]]},{"id":"2f3c8ac155fe3383","type":"switch","z":"3aa045026af17229","name":"connected","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"running","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":374,"y":304,"wires":[["56092aa4390d93bf"]]},{"id":"ba967a32b033e303","type":"server-events","z":"3aa045026af17229","name":"entity_registry_updated","server":"","version":3,"exposeAsEntityConfig":"","eventType":"entity_registry_updated","eventData":"","waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"}],"x":212,"y":256,"wires":[["56092aa4390d93bf"]]},{"id":"afb909fb7dfdcf47","type":"server-events","z":"3aa045026af17229","name":"","server":"","version":3,"exposeAsEntityConfig":"","eventType":"state_changed","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"}],"x":212,"y":352,"wires":[["072d3e5fd5e540cb"]]},{"id":"01591113936768d5","type":"inject","z":"3aa045026af17229","name":"manual update","props":[],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":206,"y":208,"wires":[["56092aa4390d93bf"]]},{"id":"666d393a4c0cb248","type":"switch","z":"3aa045026af17229","name":"labels to watch for","property":"labels","propertyType":"msg","rules":[{"t":"cont","v":"lights","vt":"str"},{"t":"cont","v":"random_stuff","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":602,"y":352,"wires":[["972412bcf4727a99"],["87c4e2b7970975bd","7f08bcaf874489bf"]]},{"id":"87c4e2b7970975bd","type":"switch","z":"3aa045026af17229","name":"filter by domain","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"regex","v":"^light.","vt":"str","case":false},{"t":"regex","v":"^switch.","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":2,"x":816,"y":448,"wires":[["b79d2219a9d190c3"],["7fe6ea5d9b84d446"]]},{"id":"972412bcf4727a99","type":"link out","z":"3aa045026af17229","name":"events with \\"lights\\" label","mode":"link","links":["852b8bf86a74dce5"],"x":844,"y":352,"wires":[],"l":true},{"id":"b79d2219a9d190c3","type":"link out","z":"3aa045026af17229","name":"events with \\"random stuff\\" label and light domain","mode":"link","links":["a936f44cd50ff333"],"x":1138,"y":448,"wires":[],"l":true},{"id":"7fe6ea5d9b84d446","type":"link out","z":"3aa045026af17229","name":"events with \\"random stuff\\" label and switch domain","mode":"link","links":["6329fdc276129897"],"x":1138,"y":496,"wires":[],"l":true},{"id":"7f08bcaf874489bf","type":"link out","z":"3aa045026af17229","name":"events with \\"random stuff\\" label","mode":"link","links":["63e253fa6c8e08f1"],"x":866,"y":400,"wires":[],"l":true},{"id":"852b8bf86a74dce5","type":"link in","z":"3aa045026af17229","name":"state_changed event for \\"lights\\" label","links":["972412bcf4727a99"],"x":264,"y":544,"wires":[["aa74be0a11e1d63d"]],"l":true},{"id":"aa74be0a11e1d63d","type":"debug","z":"3aa045026af17229","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":580,"y":544,"wires":[]},{"id":"a936f44cd50ff333","type":"link in","z":"3aa045026af17229","name":"events with \\"random stuff\\" label and light domain","links":["b79d2219a9d190c3"],"x":296,"y":592,"wires":[["b5a888fa9acdabc0"]],"l":true},{"id":"b5a888fa9acdabc0","type":"debug","z":"3aa045026af17229","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":582,"y":592,"wires":[]},{"id":"6329fdc276129897","type":"link in","z":"3aa045026af17229","name":"events with \\"random stuff\\" label and switch domain","links":["7fe6ea5d9b84d446"],"x":306,"y":640,"wires":[["3dfddc440cb1a5aa"]],"l":true},{"id":"3dfddc440cb1a5aa","type":"debug","z":"3aa045026af17229","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":580,"y":640,"wires":[]},{"id":"63e253fa6c8e08f1","type":"link in","z":"3aa045026af17229","name":"events with \\"random stuff\\" label","links":["7f08bcaf874489bf"],"x":246,"y":688,"wires":[["bf5aca1357af9a13"]],"l":true},{"id":"bf5aca1357af9a13","type":"debug","z":"3aa045026af17229","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":582,"y":688,"wires":[]}]
    +
    `,6)]))}const l=n(e,[["render",u],["__file","events-by-label.html.vue"]]),k=JSON.parse('{"path":"/cookbook/events-by-label.html","title":"Events by Label","lang":"en-US","frontmatter":{},"headers":[],"git":{"updatedTime":1726537641000,"contributors":[{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"cookbook/events-by-label.md"}');export{l as comp,k as data}; diff --git a/assets/events-calendar.html-DVxN8ryu.js b/assets/events-calendar.html-DVxN8ryu.js new file mode 100644 index 0000000000..e3d7ea01e2 --- /dev/null +++ b/assets/events-calendar.html-DVxN8ryu.js @@ -0,0 +1 @@ +import{_ as a,c as r,a as e,d as n,b as l,w as d,e as u,r as s,o as h}from"./app-CefLgoES.js";const p={},f={id:"entity-id",tabindex:"-1"},m={class:"header-anchor",href:"#entity-id"},c={id:"relative-to",tabindex:"-1"},g={class:"header-anchor",href:"#relative-to"},v={id:"offset",tabindex:"-1"},b={class:"header-anchor",href:"#offset"};function x(y,t){const o=s("Badge"),i=s("RouteLink");return h(),r("div",null,[t[4]||(t[4]=e("h1",{id:"events-calendar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#events-calendar"},[e("span",null,"Events: calendar")])],-1)),t[5]||(t[5]=e("p",null,"The Calendar node listens for events from Home Assistant's calendar integration. It triggers a flow in Node-RED when a calendar event starts or ends, allowing you to automate actions based on your calendar schedule.",-1)),t[6]||(t[6]=e("h2",{id:"configuration",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#configuration"},[e("span",null,"Configuration:")])],-1)),e("h3",f,[e("a",m,[e("span",null,[t[0]||(t[0]=n("Entity ID ")),l(o,{text:"required"})])])]),t[7]||(t[7]=e("ul",null,[e("li",null,[n("Type: "),e("code",null,"string")])],-1)),t[8]||(t[8]=e("p",null,"The entity_id for the calendar that contains triggerable calendar items.",-1)),e("h3",c,[e("a",g,[e("span",null,[t[1]||(t[1]=n("Relative To ")),l(o,{text:"required"})])])]),t[9]||(t[9]=e("ul",null,[e("li",null,[n("Type: "),e("code",null,"start | end")]),e("li",null,[n("Default: "),e("code",null,"start")])],-1)),t[10]||(t[10]=e("p",null,"Whether to trigger an event at the start or end of each matching calendar item.",-1)),e("h3",v,[e("a",b,[e("span",null,[t[2]||(t[2]=n("Offset ")),l(o,{text:"required"})])])]),t[11]||(t[11]=e("ul",null,[e("li",null,[n("Type: "),e("code",null,"number")]),e("li",null,"Default: 0 seconds")],-1)),t[12]||(t[12]=e("p",null,"A negative or positive amount of time to allow the event to be triggered before or after the calendar item's start/end time.",-1)),t[13]||(t[13]=e("h3",{id:"conditions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#conditions"},[e("span",null,"Conditions")])],-1)),t[14]||(t[14]=e("p",null,'This node has two default outputs "allowed" and "blocked". If all the conditions are true the calendar item will be sent to the output.',-1)),t[15]||(t[15]=e("p",null,[e("strong",null,"See Also:")],-1)),e("ul",null,[e("li",null,[l(i,{to:"/guide/conditionals.html"},{default:d(()=>t[3]||(t[3]=[n("Conditionals")])),_:1})])]),t[16]||(t[16]=u('

    Expose to Home Assistant

    • Type: boolean

    Creates a switch within Home Assistant to enable/disable this node. This feature requires Node-RED custom integration to be installed in Home Assistant

    Outputs

    Value types:

    • calendar item: the calendar item object as provided by the Home Assistant API
    ',6))])}const w=a(p,[["render",x],["__file","events-calendar.html.vue"]]),T=JSON.parse('{"path":"/node/events-calendar.html","title":"Events: calendar","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration:","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity ID","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"Relative To","slug":"relative-to","link":"#relative-to","children":[]},{"level":3,"title":"Offset","slug":"offset","link":"#offset","children":[]},{"level":3,"title":"Conditions","slug":"conditions","link":"#conditions","children":[]},{"level":3,"title":"Expose to Home Assistant","slug":"expose-to-home-assistant","link":"#expose-to-home-assistant","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1},{"name":"Nathan Brittain","email":"936564+enjibby@users.noreply.github.com","commits":1}]},"filePathRelative":"node/events-calendar.md"}');export{w as comp,T as data}; diff --git a/assets/events-state.html-B-ki2v7A.js b/assets/events-state.html-B-ki2v7A.js new file mode 100644 index 0000000000..2253116894 --- /dev/null +++ b/assets/events-state.html-B-ki2v7A.js @@ -0,0 +1 @@ +import{_ as r,c as d,a as t,d as n,b as o,e as i,w as c,r as s,o as h}from"./app-CefLgoES.js";const u={},p={id:"entity",tabindex:"-1"},g={class:"header-anchor",href:"#entity"};function f(m,e){const a=s("Badge"),l=s("RouteLink");return h(),d("div",null,[e[2]||(e[2]=t("h1",{id:"events-state",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#events-state"},[t("span",null,"Events: state")])],-1)),e[3]||(e[3]=t("p",null,"The Events: State node listens for state changes of entities within Home Assistant. It triggers a flow in Node-RED whenever an entity's state changes, allowing you to automate responses to various conditions, like turning on lights when motion is detected or sending a notification when a door is opened.",-1)),e[4]||(e[4]=t("h2",{id:"configuration",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configuration"},[t("span",null,"Configuration:")])],-1)),t("h3",p,[t("a",g,[t("span",null,[e[0]||(e[0]=n("Entity ")),o(a,{text:"required"})])])]),e[5]||(e[5]=i('
    • Type: string

    The entity ID is used to listen for state changes. This can be a entity ID, regex, or a substring. If a regex or substring is used, the node will listen for all entities that match.

    Example:

    • light.kitchen (entity) listens for state changes of the light.kitchen entity
    • ^light.* (regex) listens for state changes of all entities that start with light.
    • light (substring) listens for state changes of all entities that contain light in the entity ID

    If State

    • Type: string

    If the conditional is evaluated as true send the message to the first output otherwise send it to the second output. If blank there will only be one output.

    Also see:

    ',8)),t("ul",null,[t("li",null,[o(l,{to:"/guide/conditionals.html"},{default:c(()=>e[1]||(e[1]=[n("Conditionals")])),_:1})])]),e[6]||(e[6]=i('

    For

    • Type: number

    An amount of time an entity's state needs to be in that state before triggering.

    Warning

    Output on Connect state changes will not start a timer.

    State Type

    • Type: string
    • Values: string|number|boolean
    • Default: string

    Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state

    Ignore state change event

    • Type: boolean

    A list of possible states that will be ignored.

    Output on Connect

    • Type: boolean

    Output once on startup/deploy

    Expose to Home Assistant

    • Type: boolean

    Creates a switch within Home Assistant to enable/disable this node. This feature requires Node-RED custom integration to be installed in Home Assistant

    Outputs

    Value types:

    • event data: full event object
    • entity id: entity id of the triggered entity
    • entity state: entity state of the triggered entity
    • config: config properties of the node
    ',19))])}const b=r(u,[["render",f],["__file","events-state.html.vue"]]),v=JSON.parse('{"path":"/node/events-state.html","title":"Events: state","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration:","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity","slug":"entity","link":"#entity","children":[]},{"level":3,"title":"If State","slug":"if-state","link":"#if-state","children":[]},{"level":3,"title":"For","slug":"for","link":"#for","children":[]},{"level":3,"title":"State Type","slug":"state-type","link":"#state-type","children":[]},{"level":3,"title":"Ignore state change event","slug":"ignore-state-change-event","link":"#ignore-state-change-event","children":[]},{"level":3,"title":"Output on Connect","slug":"output-on-connect","link":"#output-on-connect","children":[]},{"level":3,"title":"Expose to Home Assistant","slug":"expose-to-home-assistant","link":"#expose-to-home-assistant","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":10}]},"filePathRelative":"node/events-state.md"}');export{b as comp,v as data}; diff --git a/assets/events-state.html-K_yvOPle.js b/assets/events-state.html-K_yvOPle.js new file mode 100644 index 0000000000..60f404ee31 --- /dev/null +++ b/assets/events-state.html-K_yvOPle.js @@ -0,0 +1,50 @@ +import{_ as e,c as u,e as r,a as n,b as t,w as o,r as c,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_3_1-DCTS43SR.png",k="/node-red-contrib-home-assistant-websocket/assets/jsonata_value_example-DJn_j-gH.png",q="/node-red-contrib-home-assistant-websocket/assets/jsonata_boolean_example-DbjCVol3.png",d={};function g(y,s){const a=c("RouteLink");return l(),u("div",null,[s[2]||(s[2]=r('

    Events: state

    The Events: state node receives state change events for one or more entities, and will output a message in response. The message output can be optionally controlled by a test condition on the state value, and also by a test on the length of time the state remains at that value. Both the state test condition and the state time duration can use JSONata. This node can also provide output message properties, again with the ability to use JSONata.

    screenshot

    Here are three examples, showing how to use JSONata to perform If-State conditional tests, and to build output properties.

    [{"id":"35b892e153bb5bc0","type":"group","z":"776c027950fc8c3f","name":"Events: state node - respond to state changes","style":{"label":true,"color":"#000000"},"nodes":["445466367c412014","e27b6ee2807af2eb","4583560d5089575d","24ed76ccd4da5975","266eadf86abd6481","27857c0c670e452b","e2ba71699db68b1a","1d9b8adce4f77e4e","a9b23a3911f5ef89"],"x":34,"y":919,"w":592,"h":342},{"id":"445466367c412014","type":"comment","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"3a - JSONata builds conditional test value","info":"","x":220,"y":960,"wires":[]},{"id":"e27b6ee2807af2eb","type":"server-state-changed","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Switch was on for less than 3 minutes","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"switch\\\\.[a-z][0-9]","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"(\\t    $new:=$entity();\\t    $old:=$prevEntity();\\t    $mins:=($toMillis($new.last_changed)-$toMillis($old.last_changed))/60000~>$round(0);\\t    $new.state=\\"off\\" and $old.state=\\"on\\" and $mins<3\\t)","ifStateType":"jsonata","ifStateOperator":"jsonata","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"\\"Device \\" & $entity().attributes.friendly_name & \\" has been on for less than 3 minutes\\"","valueType":"jsonata"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":230,"y":1140,"wires":[["4583560d5089575d"],[]]},{"id":"4583560d5089575d","type":"debug","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Flow trigger","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"topic","targetType":"msg","statusVal":"payload","statusType":"auto","x":490,"y":1140,"wires":[]},{"id":"24ed76ccd4da5975","type":"server-state-changed","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Motion between dawn and dusk","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"motion","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"(\\t    $ismotion:= $entity().state=\\"on\\";\\t\\t    $dawn:=$entities('sensor.sun_next_dawn').state;\\t    $dusk:=$entities('sensor.sun_next_dusk').state;\\t    $date:=$entities('sensor.date_time_utc').state~>$substringBefore(\\",\\");\\t\\t    $isdawn:= $date=$substringBefore($dawn,\\"T\\");\\t    $isdusk:= $date!=$substringBefore($dusk,\\"T\\");\\t    \\t    $ismotion and ($isdawn or $isdusk)\\t)","ifStateType":"jsonata","ifStateOperator":"jsonata","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"(\\t    $ismotion:= $entity().state=\\"on\\";\\t\\t    $dawn:=$entities('sensor.sun_next_dawn').state;\\t    $dusk:=$entities('sensor.sun_next_dusk').state;\\t    $date:=$entities('sensor.date_time_utc').state~>$substringBefore(\\",\\");\\t\\t    $isdawn:= $date=$substringBefore($dawn,\\"T\\");\\t    $isdusk:= $date!=$substringBefore($dusk,\\"T\\");\\t    \\t    $fire:= $ismotion and ($isdawn or $isdusk);\\t\\t    {\\"motion\\": $ismotion,\\t    \\"dawn\\": $dawn,\\t    \\"dusk\\": $dusk,\\t    \\"date\\": $date,\\t    \\"isdawn\\": $isdawn,\\t    \\"isdusk\\": $isdusk,\\t    \\"fire\\": $fire\\t    }\\t)","valueType":"jsonata"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":1220,"wires":[["266eadf86abd6481"],[]]},{"id":"266eadf86abd6481","type":"debug","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Dawn or Dusk","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload.isdawn ? \\"Before Dawn\\" : payload.isdusk ? \\"After Dusk\\"","statusType":"jsonata","x":500,"y":1220,"wires":[]},{"id":"27857c0c670e452b","type":"server-state-changed","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"motion","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"(\\t    $time:=$entities('sensor.time').state;\\t    $append([\\"on\\"], $time<\\"08:30\\" or $time>\\"17:30\\" ? [\\"off\\"]);\\t)    ","ifStateType":"jsonata","ifStateOperator":"includes","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":240,"y":1020,"wires":[["1d9b8adce4f77e4e"],["e2ba71699db68b1a"]]},{"id":"e2ba71699db68b1a","type":"debug","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Condition false","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":500,"y":1040,"wires":[]},{"id":"1d9b8adce4f77e4e","type":"debug","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"Condition true","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload=\\"on\\" ? \\"Motion at \\" & $now('[H]:[m]') : \\"end\\"","statusType":"jsonata","x":500,"y":980,"wires":[]},{"id":"a9b23a3911f5ef89","type":"comment","z":"776c027950fc8c3f","g":"35b892e153bb5bc0","name":"3b - JSONata builds conditional Boolean","info":"","x":220,"y":1100,"wires":[]}]
    +

    Providing a conditional test value (JSONata expression as a value)

    Example: Respond to motion events for both "on" (start of motion detection) all day, and also "off" (end of motion detection) but only outside of 08:30 to 17:30.

    (
    +    $time:=$entities('sensor.time').state;
    +    $append(["on"], $time<"08:30" or $time>"17:30" ? ["off"]);
    +)
    +

    When the If State option is chosen with a conditional (not JSONata) the condition expects a value to test against. The result of the JSONata expression is the final line in the code block. This creates an array containing just ["on"] or if the time is before 08:30 or after 17:30, an array of ["on", "off"]. The motion sensor entity state will be compared with this array value using the inclusive condition 'in'.

    screenshot

    This JSONata uses the Date-Time integration sensor to obtain the local time. The Time & Date Integration should be added to the configuration file, and then the time sensor will return the current local time.

    Conditional test (JSONata expression as a Boolean result)

    Example: Switch has just been turned off, and was previously on for less than three minutes.

    When the If State option is chosen with JSONata (not a conditional) then the right hand side must be a JSONata expression that returns a Boolean value of either true or false. When true the "If State" test is successful (the message is output from the top exit) when false the test fails (the message is output from the lower exit).

    screenshot

    (
    +    $new:=$entity();
    +    $old:=$prevEntity();
    +    $mins:=($toMillis($new.last_changed)-$toMillis($old.last_changed))/60000~>$round(0);
    +    $new.state="off" and $old.state="on" and $mins<3
    +)
    +
    +

    In all the WebSocket nodes, the $entity() function will return an object for the entity that is the subject of the node. For the Event: nodes, the $entity() return is for the current or new state, and an additional $prevEntity() function will return a similar object for the previous state. Use of both functions allows JSONata expressions to work with and compare the triggering state change.

    Example: Motion has been detected before dawn or after dusk.

    Here JSONata is again used to generate a Boolean result for the If State test. The expression return is the final line in the code block, which tests for motion and either before dawn or after dusk. The use of 'or' here is an example of how JSONata can extend logic testing since the Trigger state node conditions can only group conditions as AND logic.

    (
    +    $ismotion:= $entity().state="on";
    +
    +    $dawn:=$entities('sensor.sun_next_dawn').state;
    +    $dusk:=$entities('sensor.sun_next_dusk').state;
    +    $date:=$entities('sensor.date_time_utc').state~>$substringBefore(",");
    +
    +    $isdawn:= $date=$substringBefore($dawn,"T");
    +    $isdusk:= $date!=$substringBefore($dusk,"T");
    +
    +    $ismotion and ($isdawn or $isdusk)
    +)
    +

    The Sun integration in Home Assistant provides 'nextdawn' and 'next_dusk' sensors, with a date-time string value in UTC. Since the _next dawn will be for today before dawn, but will be for tomorrow after dawn, and similarly the next dusk will be for today before dusk, but for tomorrow after dusk, it is possible to compare just the date parts of the UTC timestamps, so as to determine if the current time is before or after either dawn or dusk.

    Creating output properties

    To extend this last example, JSONata is used to generate an output object. Note that there is no internal connection between the two JSONata expressions, so all the values have to be recalculated as required.

    (
    +    $ismotion:= $entity().state="on";
    +
    +    $dawn:=$entities('sensor.sun_next_dawn').state;
    +    $dusk:=$entities('sensor.sun_next_dusk').state;
    +    $date:=$entities('sensor.date_time_utc').state~>$substringBefore(",");
    +
    +    $isdawn:= $date=$substringBefore($dawn,"T");
    +    $isdusk:= $date!=$substringBefore($dusk,"T");
    +
    +    $fire:= $ismotion and ($isdawn or $isdusk);
    +
    +    {"motion": $ismotion,
    +    "dawn": $dawn,
    +    "dusk": $dusk,
    +    "date": $date,
    +    "isdawn": $isdawn,
    +    "isdusk": $isdusk,
    +    "fire": $fire
    +    }
    +)
    +
    +

    OR conditional for the Events: state node

    The Trigger: state node is great if you have several conditions you want to check for but it doesn't allow use of OR conditions. Using a JSONata expression with an Event: state node will allow you to fill this gap.

    Example: Motion sensor at the front door triggers, and have a text to speech notification be sent if at least one person is home.

    $entity().state = "on" and (
    +   $entities("person.person1").state = "home" or $entities("person.person2").state = "home"
    +)
    +

    Also see:

    `,29)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const m=e(d,[["render",g],["__file","events-state.html.vue"]]),f=JSON.parse('{"path":"/cookbook/jsonata/events-state.html","title":"Events: state","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Providing a conditional test value (JSONata expression as a value)","slug":"providing-a-conditional-test-value-jsonata-expression-as-a-value","link":"#providing-a-conditional-test-value-jsonata-expression-as-a-value","children":[]},{"level":3,"title":"Conditional test (JSONata expression as a Boolean result)","slug":"conditional-test-jsonata-expression-as-a-boolean-result","link":"#conditional-test-jsonata-expression-as-a-boolean-result","children":[]},{"level":3,"title":"Creating output properties","slug":"creating-output-properties","link":"#creating-output-properties","children":[]},{"level":3,"title":"OR conditional for the Events: state node","slug":"or-conditional-for-the-events-state-node","link":"#or-conditional-for-the-events-state-node","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/events-state.md"}');export{m as comp,f as data}; diff --git a/assets/expiration-date-monitor.html-iEz7TEU6.js b/assets/expiration-date-monitor.html-iEz7TEU6.js new file mode 100644 index 0000000000..77571eb415 --- /dev/null +++ b/assets/expiration-date-monitor.html-iEz7TEU6.js @@ -0,0 +1,20 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/expiration-date-monitor_01-D-HOPyeA.png",e="/node-red-contrib-home-assistant-websocket/assets/expiration-date-monitor_02-CLuUTqyf.png",u="/node-red-contrib-home-assistant-websocket/assets/expiration-date-monitor_03-Cmsu_170.png",c={};function r(l,s){return p(),a("div",null,s[0]||(s[0]=[t(`

    Expiration Date Monitor with notification

    Originally posted here on the Home Assistant Forums.

    Here's a demo showing how to build a system to track the expiration date of items in the pantry. Using the Home Assistant Shopping List as a way to input and update a list of items and their expiration date.

    The format of the name in the shopping list would be [item] : [expiration date] with a colon separating the item name from the expiration date.

    Home Assistant stuff

    First, you would have to activate the shopping list in the config. https://www.home-assistant.io/integrations/shopping_list/

    # Example configuration.yaml entry
    +shopping_list:
    +

    There's already a lovelace card for the shopping list. I also added an input_number to dynamically control the expiration window to check.

    # Example configuration.yaml entry
    +input_number:
    +  pantry_expiration:
    +    name: Pantry Expiration Window
    +    initial: 90
    +    min: 30
    +    max: 120
    +    step: 1
    +    unit_of_measurement: days
    +    icon: mdi:calendar-clock
    +

    Simple Lovelace config

    image|498x346

    type: vertical-stack
    +cards:
    +  - title: Pantry Items
    +    type: shopping-list
    +  - type: entities
    +    entities:
    +      - input_number.pantry_expiration
    +

    Node-RED stuff

    You can set the inject node to fire at a set time each day or every other day whatever fits your needs.

    image|690x93

    [{"id":"e78bbe2c.9141","type":"inject","z":"56b1c979.b2c618","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":284,"y":1056,"wires":[["720213f9.9bb8fc"]]},{"id":"adeab5ee.bc4098","type":"ha-api","z":"56b1c979.b2c618","name":"Get Items","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"shopping_list/items\\"}","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":652,"y":1056,"wires":[["236e3cd6.fab7d4"]]},{"id":"236e3cd6.fab7d4","type":"function","z":"56b1c979.b2c618","name":"do the stuff","func":"const items = msg.payload;\\n\\nif (items.length === 0) return;\\n\\nconst expItems = [];\\n\\n// Current timestamp + expiration days in milliseconds\\nconst expireWindow = Date.now() + msg.expDays * 8.64e7;\\n\\nitems.forEach(i => {\\n  // If the name doesn't contain the split character don't process\\n  // If complete set to true in the shopping list don't process\\n  if (!i.name.includes(\\":\\") || i.complete === true) return;\\n\\n  // Split the name and remove white spaces\\n  const [name, exp] = i.name.split(\\":\\").map(x => x.trim());\\n\\n  // check for valid date\\n  const expiredDate = Date.parse(exp);\\n  if (isNaN(expiredDate) || expiredDate > expireWindow) return;\\n  \\n  // Add item to expired list\\n  expItems.push({ \\n      name, \\n      exp, \\n      inThePast: expiredDate < Date.now()\\n  });\\n});\\n\\n// If array is empty nothing to report\\nif (expItems.length === 0) return;\\n\\nmsg.payload = expItems;\\n\\nreturn msg;\\n","outputs":1,"noerr":0,"x":822,"y":1056,"wires":[["4270d967.43cc08"]]},{"id":"720213f9.9bb8fc","type":"api-current-state","z":"56b1c979.b2c618","name":"Get expiration window","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.pantry_expiration","state_type":"num","state_location":"expDays","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":468,"y":1056,"wires":[["adeab5ee.bc4098"]]},{"id":"4270d967.43cc08","type":"split","z":"56b1c979.b2c618","name":"","splt":"\\\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":290,"y":1120,"wires":[["e1f6793d.9be5f8"]]},{"id":"3d3871cd.cb442e","type":"join","z":"56b1c979.b2c618","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":674,"y":1120,"wires":[["ddffd5ea.ebd528"]]},{"id":"e1f6793d.9be5f8","type":"moment","z":"56b1c979.b2c618","name":"pretty","topic":"","input":"payload.exp","inputType":"msg","inTz":"America/Los_Angeles","adjAmount":0,"adjType":"days","adjDir":"add","format":"timeAgo","locale":"en_US","output":"payload.pretty","outputType":"msg","outTz":"America/Los_Angeles","x":418,"y":1120,"wires":[["c96d522b.7cfbb"]]},{"id":"c96d522b.7cfbb","type":"function","z":"56b1c979.b2c618","name":"format","func":"const d = msg.payload;\\nmsg.payload = `${d.name} expire${d.inThePast ? 'd' : 's'} ${d.pretty}`;\\nreturn msg;","outputs":1,"noerr":0,"x":544,"y":1120,"wires":[["3d3871cd.cb442e"]]},{"id":"ddffd5ea.ebd528","type":"api-call-service","z":"56b1c979.b2c618","name":"","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_phone","entityId":"","data":"{\\t    \\"title\\": \\"Pantry Items Expiring:\\",\\t    \\"message\\": $join(payload, \\"\\\\n\\")\\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":882,"y":1120,"wires":[[]]}]\n

    image|551x297

    There's a lot more polish that could go into this such as being notified if the date entered in the shopping list is invalid or doesn't have a date at all. Sort the expired list so that the closest to expiring is at the top.

    ',18)]))}const k=n(c,[["render",r],["__file","expiration-date-monitor.html.vue"]]),q=JSON.parse('{"path":"/cookbook/expiration-date-monitor.html","title":"Expiration Date Monitor with notification","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Home Assistant stuff","slug":"home-assistant-stuff","link":"#home-assistant-stuff","children":[]},{"level":2,"title":"Node-RED stuff","slug":"node-red-stuff","link":"#node-red-stuff","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/expiration-date-monitor.md"}');export{k as comp,q as data}; diff --git a/assets/expiration-date-monitor_01-D-HOPyeA.png b/assets/expiration-date-monitor_01-D-HOPyeA.png new file mode 100644 index 0000000000..1061a3c1c9 Binary files /dev/null and b/assets/expiration-date-monitor_01-D-HOPyeA.png differ diff --git a/assets/expiration-date-monitor_02-CLuUTqyf.png b/assets/expiration-date-monitor_02-CLuUTqyf.png new file mode 100644 index 0000000000..700cd2e102 Binary files /dev/null and b/assets/expiration-date-monitor_02-CLuUTqyf.png differ diff --git a/assets/expiration-date-monitor_03-Cmsu_170.png b/assets/expiration-date-monitor_03-Cmsu_170.png new file mode 100644 index 0000000000..6d4c1c129d Binary files /dev/null and b/assets/expiration-date-monitor_03-Cmsu_170.png differ diff --git a/assets/exposed-nodes.html-YvdovF3I.js b/assets/exposed-nodes.html-YvdovF3I.js new file mode 100644 index 0000000000..62ad10d09e --- /dev/null +++ b/assets/exposed-nodes.html-YvdovF3I.js @@ -0,0 +1 @@ +import{_ as i,c as s,a as t,b as l,w as n,e as a,r,o as u,d}from"./app-CefLgoES.js";const p={};function g(h,e){const o=r("RouteLink");return u(),s("div",null,[e[10]||(e[10]=t("h1",{id:"exposed-nodes",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#exposed-nodes"},[t("span",null,"Exposed Nodes")])],-1)),e[11]||(e[11]=t("h2",{id:"nodes-available-for-exposure",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#nodes-available-for-exposure"},[t("span",null,"Nodes Available for Exposure")])],-1)),e[12]||(e[12]=t("p",null,"The following nodes can be exposed to Home Assistant, appearing as switches that can be toggled to enable or disable them in Node-RED:",-1)),t("ul",null,[t("li",null,[l(o,{to:"/node/device.html"},{default:n(()=>e[0]||(e[0]=[d("Device")])),_:1})]),t("li",null,[l(o,{to:"/node/events-all.html"},{default:n(()=>e[1]||(e[1]=[d("Events: all")])),_:1})]),t("li",null,[l(o,{to:"/node/events-state.html"},{default:n(()=>e[2]||(e[2]=[d("Events: state")])),_:1})]),t("li",null,[l(o,{to:"/node/poll-state.html"},{default:n(()=>e[3]||(e[3]=[d("Poll State")])),_:1})]),t("li",null,[l(o,{to:"/node/sentence.html"},{default:n(()=>e[4]||(e[4]=[d("Sentence")])),_:1})]),t("li",null,[l(o,{to:"/node/tag.html"},{default:n(()=>e[5]||(e[5]=[d("Tag")])),_:1})]),t("li",null,[l(o,{to:"/node/time.html"},{default:n(()=>e[6]||(e[6]=[d("Time")])),_:1})]),t("li",null,[l(o,{to:"/node/trigger-state.html"},{default:n(()=>e[7]||(e[7]=[d("Trigger: state")])),_:1})]),t("li",null,[l(o,{to:"/node/webhook.html"},{default:n(()=>e[8]||(e[8]=[d("Webhook")])),_:1})]),t("li",null,[l(o,{to:"/node/zone.html"},{default:n(()=>e[9]||(e[9]=[d("Zone")])),_:1})])]),e[13]||(e[13]=a('

    This feature provides a cleaner alternative to creating input_booleans in Home Assistant for controlling flow activation.

    Triggering Exposed Nodes via nodered.trigger

    Exposed nodes can be activated using the nodered.trigger service call with the following parameters:

    entity_id

    • Required
    • The entity_id of the exposed node to be triggered, as seen in Home Assistant. For example, use switch.my_node if that is the node's entity_id.

    output_path

    • Optional
    • Default: 0
    • Can be a comma-separated list of output paths.
    • Determines which output path(s) the message will be sent through:
      • 0: Send through all output paths.
      • 1: Send through the first output path.
      • 2: Send through the second output path, and so on.

    message

    • Required
    • The message to be sent when triggering the node. This should be a valid JSON object. For example, { "payload": "hello world" } would set msg.payload to hello world.
    ',9))])}const c=i(p,[["render",g],["__file","exposed-nodes.html.vue"]]),f=JSON.parse('{"path":"/guide/custom_integration/exposed-nodes.html","title":"Exposed Nodes","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Nodes Available for Exposure","slug":"nodes-available-for-exposure","link":"#nodes-available-for-exposure","children":[]},{"level":2,"title":"Triggering Exposed Nodes via nodered.trigger","slug":"triggering-exposed-nodes-via-nodered-trigger","link":"#triggering-exposed-nodes-via-nodered-trigger","children":[{"level":3,"title":"entity_id","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"output_path","slug":"output-path","link":"#output-path","children":[]},{"level":3,"title":"message","slug":"message","link":"#message","children":[]}]}],"git":{"updatedTime":1723694477000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"guide/custom_integration/exposed-nodes.md"}');export{c as comp,f as data}; diff --git a/assets/fire-event.html-CRNw0weX.js b/assets/fire-event.html-CRNw0weX.js new file mode 100644 index 0000000000..e4ea292510 --- /dev/null +++ b/assets/fire-event.html-CRNw0weX.js @@ -0,0 +1 @@ +import{_ as n,c as o,a,d as l,b as s,e as d,o as i,r}from"./app-CefLgoES.js";const p={},c={id:"event",tabindex:"-1"},h={class:"header-anchor",href:"#event"};function u(v,e){const t=r("Badge");return i(),o("div",null,[e[1]||(e[1]=a("h1",{id:"fire-event",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fire-event"},[a("span",null,"Fire Event")])],-1)),e[2]||(e[2]=a("p",null,"The Fire Event node allows you to fire an event on the Home Assistant event bus. This can be used to trigger automations or notify other parts of the system about specific occurrences. It’s a way to programmatically generate events that other nodes or systems can listen to and react upon.",-1)),e[3]||(e[3]=a("h2",{id:"configuration",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#configuration"},[a("span",null,"Configuration")])],-1)),a("h3",c,[a("a",h,[a("span",null,[e[0]||(e[0]=l("Event ")),s(t,{text:"required"})])])]),e[4]||(e[4]=d('
    • Type: string

    Event name to fire

    data

    • Type: Object

    JSON object to pass along

    Inputs

    If the incoming message has a payload property with event set it will override any config values if set. If the incoming message has a payload.data that is an object or parsable into an object these properties will be merged with any config values set. If the node has a property value in its config for Merge Context then the flow and global contexts will be checked for this property which should be an object that will also be merged into the data payload.

    payload.event

    • Type: string

    Event to fire

    payload.data

    • Type: Object

    Event data to send

    Outputs

    payload.event_type

    • Type: string

    Event Type that was fired

    payload.data

    • Type: Object

    The event data sent if one was used

    References

    Home Assistant Events

    ',22))])}const y=n(p,[["render",u],["__file","fire-event.html.vue"]]),g=JSON.parse('{"path":"/node/fire-event.html","title":"Fire Event","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Event","slug":"event","link":"#event","children":[]},{"level":3,"title":"data","slug":"data","link":"#data","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"payload.event","slug":"payload-event","link":"#payload-event","children":[]},{"level":3,"title":"payload.data","slug":"payload-data","link":"#payload-data","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"payload.event_type","slug":"payload-event-type","link":"#payload-event-type","children":[]},{"level":3,"title":"payload.data","slug":"payload-data-1","link":"#payload-data-1","children":[]}]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/fire-event.md"}');export{y as comp,g as data}; diff --git a/assets/first-automation.html-BYONk5Lb.js b/assets/first-automation.html-BYONk5Lb.js new file mode 100644 index 0000000000..0a314c2917 --- /dev/null +++ b/assets/first-automation.html-BYONk5Lb.js @@ -0,0 +1,2 @@ +import{_ as e}from"./first-automation_05-BSXfHgTV.js";import{_ as r,c as u,e as c,a as n,b as a,w as o,r as l,o as i,d as p}from"./app-CefLgoES.js";const k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPUAAAA3CAYAAADUkQzaAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAjgSURBVHhe7Z1ZbFRVGMcRDBURBEoBIxIXCvFBXwaVRSKgQYOyiUuwfTCB+AIPmoawpAgEKGBbGxbZBCpLFxAqi4gDGKgsStjamAhEitaACCYGikFA4PN+555z59wzZ+4ynXaGO98/+SXMPcs995zzm7lth5kWQKFQAhWSmkIJWEhqCiVgIakplICFpKZQAhaSmkJp5hw9ex7W7a+Bsu9roebXi/xo4kJSUyiNyMllC+HyT7X8kXOu37wFr8yrhOxZm6DrJ7uh64Iw9JxRCaMWbeM1EhOSmkKJM+cPVUP5c09BWehJfiR2UOg+syuhdfnv0GKvIZ5Em9LT0Hf+Fl6z8SGpKZQ4U/rsE3BlQnfYP/BhOLlwPj+qD75C64QWPLi8BnJWfstrNy4kNYUSR44UzoHDY58H+MBQyGBZtwfgxpUrvNSeo2cvQM+Zm7Qyy/Qq2Aanzl/mreIPSU2h+My1C+dhVa+ultDI2ddbwI7RQ3gNe/CXYl2Mn6F1Ist0m7IBppXv4a3iD0lNofhM1aihUD/O+DlakhrZHuoAdTu38lqRrK82pF7gLnXXKWWQn3SpayoAKnMAinoBzGhPEIHn9LttYFeoVZTQyI33jdvwLi2j2hyf+jRkT12pFVmmd/5qODXXuKVHp2oruWT+E5fUDRfPQsPy16BhartmRZ0sgmhuFndqCbfHRwstODGoBVS/1Dqq3dAPp0FGWb1WZqTt8hOQO+kje7u1I417/UvcOu8xRuI/V5e+yiTbOH0I9J+zBDrN2w6t5n/XpLSctQNaztsLrUp+IIikMK7fYFj5TCb8OOA+RxY/kgGPTV5nb198EDpPWmuI/VuU0G3WnILMqRWsXuane2Bg4SrYOftlJvbd0uHcOu/xL/XxL5jQm/IHa+WLxbCNJ6Hm0jUG/ltXxwmSmkg2j08qhWEjx3tC175V8SHIyiuFzsbPzh0KwtCxYBdkTd4AmQa6+kJsOLmBy+ct/qVe/yaT+oW5S7XyqYTWHIF99X/zxpHgMSzTtdFBUhNBIWNuGNp9/BU8ZJBRsEdbB+lftMaUuuwdbo23+Je6oDuTuv28r7XyCR5dfADW1P4Bd+6azf66fgsmhE8z8N8YLMM6WFfXhwxJTaQbnYt3m1LjL6J9xL/UxklQap14SNuifZBfXQfXbt5m1W/evgvFR+qhU0m1VQf/jcewDIN1sQ22lfuSIamJdIRJjfhIQqUevaUW6q/+yysCVJ25DL2WH9bWRbAM64hgW+xDV5ekJtKRpEt9/b87rMqJPxtgSPlxbZ2ZB85FHcO62AaDfajlCElNpCNJl1rkfk2ZAKMTG9uIqGUISU2kIykjta5MIKITW0Q9jjRe6jBkvRGCHtN0ZTrKoUcoF7IKdGWJpV1OCEI55dqyVCNjYi6E3iiBDE2ZX+S+EtmvHXXdcV3FY6ey5NJn0S4YsWQrHCsaY3LsGNTV1XFDnNPkUjtFFVtEPiYgqVODe19qr2XJoe+SMKxYsQI2bt4C4XDYRlVVFSs7d+4cN0WfpEqNkcUWkdsLvErNNofxbGsipDQXTxzPnhg26xeUQLZVV65vPmOL49aiT8uT6vrfDExeq30etJOP5+Tpz4nEHKcoy4Ms+boVOeTzZk8siXo10s+ZQJ6LXOiRI8vn4ZVNmTP5un1J7TD3eH3iuuzlunUXY3YqE33b66jjc563+EBpz5w54wjWcUrSpZ51MIFSs4WPbBr7Y+VZmYsStYC2DSstlNo3a+99IdVNKz82pYv0ZW4Wfi63cQrhrVd6c2OKJy5bXwZCcNGfOi77ddr7ss4l13eC9SXPkdmfGKt87qhxyLjMveP8qetuE9e9zLp2A3YeMc/qmNTHcYC33PhqrBNZBus43YonVWpZaLmufEwQl9Q21AWMxr6xcIHFRtG3ZfU93TbLmyUa22ZBXJ4wbOPU1I30pxk3F9M8Jl9jBGzPNrNmPh3l84B8rXJfsft1n3vn+VPbe5Qarz1qPNJ8JUBileHGz9B4m60TWQbr4M/YsZK0X5SpQstl6nHE2+23uUjilsi+EfSbQyykdRtlLaS84ZU6MvJmioWLpN6kjjFOR6nlaxCY/bB54ILbroeDUmtF0252F9Tz8Gv1JrX73DeF1Gw88rks7P2K45E+4ielpXb7k5ZO6ET/SYsttGYR1AXEOrZbVWtjYbloK2+EONBKGsF5U7qMU9O3P6ljj0srmh+pWf/m2MXcydcq9689F8N97ptMao/XGb3X4iMlpfby5hOd0E335hNz0UwZlAXUbE77QspCyP1E6nvHeWM6bkq3cTpKrW5aUV8ccxFGc4vpZ7OzuvJ1GfiX2n3um0Jq3bU709g9kqJSJ/1toupCOC2uWpc9NjaHtbFkqUW5LI+/RYzatNL5XaV2Gqej1Py8UntWJomslus2vXWN/AlBL1806jWb51LGxsvVujZc5r5JpOZltn7ltVDXRbMOfknJX5Qhyf4PHWLTCiILFr2pbHVxQymbR5SLzWO15/h9VraPTTlPzE3pMk4XqdX25p9+NPVF/wbynImNbpbxP51Z8skS6OBiiPbGmMw5NGXwLLWB09y7zZ/VltWxj9mpzH7tiPzk5zZv8ZFyf9KSof96margRrVLTaQOKffmEx30IQnJxH6biri9IhKpQeRtom+ZJOttok4E9+OMlFtMDYm4LYsbdisqjYeEvqdA3xg+0mxSNxZ6pSbSEZKaIAIGSU0QAaN5pC7syaTOLNimla+pIKmJdMP64MHCbC6ft/iXev0YJnXfOd4+IjhRkNREujGgUHxE8NtcPm/xL/XP25nUX07392H+jYWkJtKNXeLD/H/x96V5/qU20vD5CCb25vxB0G/uZ9CRvnaHIBJCl+IwvFi0Gr4RQleM5dZ5T3xS4xfkrRjGxG5O2EUSRLqAX5D3j/8voY9Laiv4dZsV79FX2RJEoijqDVCZ2/xfZUuhUFI3JDWFErCQ1BRKwEJSUygBC0lNoQQsJDWFErCQ1BRKwEJSUygBC0lNoQQsJDWFErCQ1BRKoALwP6rrMZVU96IvAAAAAElFTkSuQmCC",q="/node-red-contrib-home-assistant-websocket/assets/first-automation_02-vMFtAs18.png",d="/node-red-contrib-home-assistant-websocket/assets/first-automation_03-Cs4xo4aA.png",h="/node-red-contrib-home-assistant-websocket/assets/first-automation_04-D1RRhu3H.png",g={};function m(f,s){const t=l("RouteLink");return i(),u("div",null,[s[4]||(s[4]=c('

    First Automation

    For your first automation, let's keep it simple by setting up a light to turn on when the sun sets and off when it rises.

    This example uses the sun.sun entity in Home Assistant, which has states below_horizon and above_horizon, to trigger the light.

    Events: State Node

    1. Drag an Events: state node onto the workspace and double-click it to edit.

    screenshot

    Entity ID Configuration

    1. In the Entity ID field, enter sun.sun. This is the entity that will trigger the automation.

    If State Condition

    1. The If State condition checks the entity's state when the node is triggered. If the condition is true, the message will be sent through the top output; if false, it will be sent through the bottom output. If no condition is set, all messages will pass through a single output.

      For this example, set the If State to above_horizon.

    screenshot

    Action Node

    1. Now, let's set up the actions that will be triggered. Most Home Assistant interactions are done through action calls, which we'll handle with the Action node.

    2. Drag two Action nodes onto the workspace and connect them to the outputs of the Events: state node.

    screenshot

    • Since we set the If State to above_horizon, the top output will turn off the light, and the bottom output will turn it on.
    1. Configure the Action nodes:
      • Action: light.turn_off (for the top output) and light.turn_on (for the bottom output)
      • Entity: light.front_porch

    screenshot

    Complete Automation

    1. Once you've configured everything, deploy your flow. You now have your first working automation in Node-RED!

    screenshot

    [{"id":"b74ada49.d7e408","type":"server-state-changed","z":"ffbd7f06.4a014","name":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sun.sun","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"above_horizon","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":244,"y":784,"wires":[["1f467cbb.0c3983"],["da5ff3e0.cbb2a"]]},{"id":"1f467cbb.0c3983","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":474,"y":784,"wires":[[]]},{"id":"da5ff3e0.cbb2a","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":474,"y":832,"wires":[[]]}]
    +

    Related Resources:

    `,23)),n("ul",null,[s[3]||(s[3]=n("li",null,[n("a",{href:"https://nodered.org/docs/user-guide/editor/workspace/import-export",target:"_blank",rel:"noopener noreferrer"},"Importing and Exporting Flows")],-1)),n("li",null,[a(t,{to:"/node/action.html"},{default:o(()=>s[0]||(s[0]=[p("Action Node Documentation")])),_:1})]),n("li",null,[a(t,{to:"/node/events-state.html"},{default:o(()=>s[1]||(s[1]=[p("Events: State Node Documentation")])),_:1})]),n("li",null,[a(t,{to:"/guide/conditionals.html"},{default:o(()=>s[2]||(s[2]=[p("Conditionals in Node-RED")])),_:1})])])])}const A=r(g,[["render",m],["__file","first-automation.html.vue"]]),v=JSON.parse('{"path":"/guide/first-automation.html","title":"First Automation","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Events: State Node","slug":"events-state-node","link":"#events-state-node","children":[]},{"level":2,"title":"Entity ID Configuration","slug":"entity-id-configuration","link":"#entity-id-configuration","children":[]},{"level":2,"title":"If State Condition","slug":"if-state-condition","link":"#if-state-condition","children":[]},{"level":2,"title":"Action Node","slug":"action-node","link":"#action-node","children":[]},{"level":2,"title":"Complete Automation","slug":"complete-automation","link":"#complete-automation","children":[]}],"git":{"updatedTime":1724305054000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/first-automation.md"}');export{A as comp,v as data}; diff --git a/assets/first-automation_02-vMFtAs18.png b/assets/first-automation_02-vMFtAs18.png new file mode 100644 index 0000000000..8e5f1542ce Binary files /dev/null and b/assets/first-automation_02-vMFtAs18.png differ diff --git a/assets/first-automation_03-Cs4xo4aA.png b/assets/first-automation_03-Cs4xo4aA.png new file mode 100644 index 0000000000..bf4ba7daac Binary files /dev/null and b/assets/first-automation_03-Cs4xo4aA.png differ diff --git a/assets/first-automation_04-D1RRhu3H.png b/assets/first-automation_04-D1RRhu3H.png new file mode 100644 index 0000000000..fc13966c09 Binary files /dev/null and b/assets/first-automation_04-D1RRhu3H.png differ diff --git a/assets/first-automation_05-BBzXhkfO.png b/assets/first-automation_05-BBzXhkfO.png new file mode 100644 index 0000000000..104e8bbc4b Binary files /dev/null and b/assets/first-automation_05-BBzXhkfO.png differ diff --git a/assets/first-automation_05-BSXfHgTV.js b/assets/first-automation_05-BSXfHgTV.js new file mode 100644 index 0000000000..8678ae5c72 --- /dev/null +++ b/assets/first-automation_05-BSXfHgTV.js @@ -0,0 +1 @@ +const s="/node-red-contrib-home-assistant-websocket/assets/first-automation_05-BBzXhkfO.png";export{s as _}; diff --git a/assets/functions.html-DkwcU8r9.js b/assets/functions.html-DkwcU8r9.js new file mode 100644 index 0000000000..ddf15d2433 --- /dev/null +++ b/assets/functions.html-DkwcU8r9.js @@ -0,0 +1,8 @@ +import{_ as e,c as u,e as r,a as n,b as t,w as o,r as c,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_8_1-DHI1CMwN.png",k={};function q(y,s){const a=c("RouteLink");return l(),u("div",null,[s[2]||(s[2]=r('

    Other functions

    Several additional JSONata functions are provided for use within the WebSocket nodes. JSONata expressions are first 'prepared' then 'executed', and the preparation first stage is used to bind the expression to extra Node-RED or other functions. This means that these WebSocket functions can only be used within a WebSocket node.

    screenshot

    This example demonstrates the basic use of some of these functions.

    [{"id":"c3f7b442994c1a29","type":"group","z":"776c027950fc8c3f","name":"Using WebSocket functions to return entity, device, and area details","style":{"label":true,"color":"#000000"},"nodes":["578b1fe6b17d9053","9e2cc6208465cb53","24a0721c11a9dabf","0e27f1810d1f2726","25aa9320ec1b341f","87097a630683a0f3","2b079469d339ee68","6d7320ce7cf2d71b","4cf613030bdac458","4bba7af21fb76af8","80af7504e9450dd4"],"x":34,"y":2699,"w":732,"h":322},{"id":"578b1fe6b17d9053","type":"inject","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":2820,"wires":[["9e2cc6208465cb53"]]},{"id":"9e2cc6208465cb53","type":"ha-get-entities","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Entities with an attribute called \\"array\\"","server":"","version":1,"rules":[{"property":"","logic":"jsonata","value":"$entity().attributes.array!=[]","valueType":"jsonata"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":410,"y":2820,"wires":[["6d7320ce7cf2d71b"]]},{"id":"24a0721c11a9dabf","type":"api-current-state","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Entity attributes called \\"array\\"","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.date_time","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"$entities().*.attributes[$exists(array)]","valueType":"jsonata"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":380,"y":2900,"wires":[["4cf613030bdac458"]]},{"id":"0e27f1810d1f2726","type":"api-current-state","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Get Areas with Device and Entity Counts","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.time","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"$areas()^(name).{name: \\" Devices: \\" & $count($areaDevices(area_id)) & \\" Entities: \\" & $count($areaEntities(area_id))}~>$merge()","valueType":"jsonata"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":2980,"wires":[["87097a630683a0f3"]]},{"id":"25aa9320ec1b341f","type":"inject","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":2980,"wires":[["0e27f1810d1f2726"]]},{"id":"87097a630683a0f3","type":"debug","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":2980,"wires":[]},{"id":"2b079469d339ee68","type":"inject","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Manual trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":2900,"wires":[["24a0721c11a9dabf"]]},{"id":"6d7320ce7cf2d71b","type":"debug","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":2820,"wires":[]},{"id":"4cf613030bdac458","type":"debug","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":2900,"wires":[]},{"id":"4bba7af21fb76af8","type":"server-state-changed","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Using $entity() and $prevEntity()","server":"","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.time","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"{\\"old\\": $prevEntity(), \\"new\\": $entity()}","valueType":"jsonata"}],"x":390,"y":2740,"wires":[["80af7504e9450dd4"]]},{"id":"80af7504e9450dd4","type":"debug","z":"776c027950fc8c3f","g":"c3f7b442994c1a29","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":2740,"wires":[]}]
    +

    Reading entity state and entity attributes with $entity() and $prevEntity()

    In nodes with output properties, a number of properties are typically set by default, or can be optionally set as:

    • msg.payload = 'entity state'
    • msg.data = 'entity'
    • msg.event = 'event data'
    • msg.topic = 'entity id'

    This provides useful message values in the flow following the node, however these values can be obtained within the node itself using the appropriate functions.

    The function $entity() returns an object containing the entity details, relating to the entity that is the subject of the node. This means that the output property selection options are equivalent to JSONata expressions:

    • 'entity' ~ $entity()
    • 'entity state' ~ $entity().state
    • 'entity id' ~ $entity().entity_id

    For the Events: nodes (Events: all and Events: state) the node triggers from an entity-change event, with $entity() returning the current (new) entity details, and the function $prevEntity() returning the previous (old) entity details.

    {"old": $prevEntity(), "new": $entity()}
    +

    The first example uses an Events: state node, with a basic sensor.time entity to facilitate triggering the node every minute. The Time & Date Integration should be added to the configuration file, and then the given time sensor will return the current local time. The entity state (as time) is "hh:mm" and therefore changes every 60 seconds.

    The output msg.payload is set to a new JSONata expression, which creates a new object with the old and new entity details, just as the output property 'event data' would do, but permitting a more detailed JSONata expression to be executed if required.

    Using $entities() to return one or all entities

    The next two examples explore ways to obtain specific entities, and this code looks for all Home Assistant entities that have an attribute field called 'array'.

    $entity().attributes.array!=[]
    +

    In the first flow, a Get Entities node is used, with a JSONata expression used to filter the result, based on each entity having an attribute field called 'array' that is a non-empty JSON array. This will return the entire entity, and therefore the output will be an array of entities that have an 'attribute.array' field.

    $entities().*.attributes[$exists(array)]
    +

    In the second flow, a Current State node is used, with a valid subject entity. The return from the given entity itself is not required - the node is just being used as a vehicle in which to execute the $entities() function. When specifying a named entity such as $entities('sun.next_dawn') only that entity will be returned, otherwise an array of all entities in Home Assistant will be returned. This JSONata expression then matches all entities in the array, filtering out attributes fields where the object key 'array' exists.

    In contrast to the preceding flow, this will return just an array of the entity attributes. The JSONata code in this case can also be executed as and when required.

    Note: Where a number of entity state values or attributes are required at one point in a flow for collective processing, using JSONata in a Current State node can be highly effective. The alternatives are:

    • Several Current State nodes chained in sequence, with each writing the state or entity data to a different msg.field.
    • One Current State node executing a JSONata expression, collating various $entity() or $entities('sensor.name') functions to either place values into one object, or to perform the necessary computation at that point. Output from JSONata can be either a simple primitive, or an object with several fields.

    Using $areas(), $areaDevices and $areaEntities()

    Finally, a more complex JSONata expression that returns details about areas, devices, and entities.

    $areas()^(name).{
    +    name: " Devices: " & $count($areaDevices(area_id)) & " Entities: " & $count($areaEntities(area_id))
    +    } ~> $merge()
    +

    The JSONata above is just one long expression line (unnecessary new lines have been added just to make the expression easier to read). Evaluated left to right, it starts with the $areas() function:

    • Without a given area lookup value, this function returns an array of all areas in Home Assistant
      • which is then sorted alphabetically, by name
    • The result is an array, which is mapped (iterated over)
    • applying an {} object constructor for each array item
      • the object creates one key: value pair
      • the key is the area 'name' (this is a string)
      • the value is a constructed text string
    • The function $areaDevices(area_id) returns all devices in each area
      • using 'area_id' for the item area, and returning an array of devices
      • using $count() to count the number of devices in the returned array
    • The function $areaEntities(area_id) returns all entities in that area
      • returning an array, which is similarly counted
    • The resulting array of objects is then merged into one single object

    Also see:

    `,30)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const d=e(k,[["render",q],["__file","functions.html.vue"]]),m=JSON.parse('{"path":"/cookbook/jsonata/functions.html","title":"Other functions","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Reading entity state and entity attributes with $entity() and $prevEntity()","slug":"reading-entity-state-and-entity-attributes-with-entity-and-preventity","link":"#reading-entity-state-and-entity-attributes-with-entity-and-preventity","children":[]},{"level":3,"title":"Using $entities() to return one or all entities","slug":"using-entities-to-return-one-or-all-entities","link":"#using-entities-to-return-one-or-all-entities","children":[]},{"level":3,"title":"Using $areas(), $areaDevices and $areaEntities()","slug":"using-areas-areadevices-and-areaentities","link":"#using-areas-areadevices-and-areaentities","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":3}]},"filePathRelative":"cookbook/jsonata/functions.md"}');export{d as comp,m as data}; diff --git a/assets/generate-token_01-DB9TrXpw.png b/assets/generate-token_01-DB9TrXpw.png new file mode 100644 index 0000000000..667fc8b7c0 Binary files /dev/null and b/assets/generate-token_01-DB9TrXpw.png differ diff --git a/assets/generate-token_02-k2eQmSik.png b/assets/generate-token_02-k2eQmSik.png new file mode 100644 index 0000000000..7154870288 Binary files /dev/null and b/assets/generate-token_02-k2eQmSik.png differ diff --git a/assets/get-entities.html-DDxfqZLb.js b/assets/get-entities.html-DDxfqZLb.js new file mode 100644 index 0000000000..b85824b571 --- /dev/null +++ b/assets/get-entities.html-DDxfqZLb.js @@ -0,0 +1,50 @@ +import{_ as r,c as l,e as k,b as t,w as o,a as s,r as p,o as u,d as n}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/get-entities_03-C5epOs7g.png",y="/node-red-contrib-home-assistant-websocket/assets/get-entities_02-6WjKPZlv.png",g="/node-red-contrib-home-assistant-websocket/assets/get-entities_01-CNrrQzIG.png",d="/node-red-contrib-home-assistant-websocket/assets/get-entities_04-DgqPL72w.png",h={};function b(m,a){const e=p("InfoPanelOnly"),c=p("DocsOnly");return u(),l("div",null,[a[2]||(a[2]=k(`

    Get Entities

    The Get Entities node retrieves entities based on specific search criteria, with three different output options. This node is useful for filtering and finding entities that match certain conditions, such as all lights that are currently on, or sensors reporting a specific range of values.

    Configuration

    Search Criteria

    All specified criteria must be met for an entity to be considered valid.

    Property

    Autocomplete is available for all properties currently set on loaded entities.

    Inputs

    Payload

    • Type: Object

    Override the configuration values by passing in a property with a valid value.

    • rules (array)
      • condition: string (e.g., stateObject, labelRegistry, areaRegistry, deviceRegistry, floorRegistry)
      • property: string
      • logic: string
      • value: string
      • valueType: string
    • outputType: string
    • outputEmptyResults: boolean
    • outputLocationType: string
    • outputLocation: string
    • outputResultsCount: number

    Example

    To retrieve all entities with the device class battery on the First floor that are not labeled not replaceable, include the following in the payload property of the message:

    {
    +  "rules": [
    +    {
    +      "condition": "stateObject",
    +      "property": "attributes.device_class",
    +      "logic": "is",
    +      "value": "battery",
    +      "valueType": "str"
    +    },
    +    {
    +      "condition": "floorRegistry",
    +      "property": "name",
    +      "logic": "is",
    +      "value": "First floor",
    +      "valueType": "str"
    +    },
    +    {
    +      "condition": "labelRegistry",
    +      "property": "name",
    +      "logic": "is_not",
    +      "value": "not replaceable",
    +      "valueType": "str"
    +    }
    +  ]
    +}
    +

    Outputs

    Array

    • Type: Array

    Returns an array of state objects based on the search criteria and sends them to the specified output location.

    Count

    • Type: number

    Returns the total count of valid entities.

    Random

    • Type: Object | Array

    Returns a random object or array from the available state objects. If One Max Results is selected, it will return a single object; otherwise, it will return an array of state objects.

    Split

    • Type: msg.part

    Sends a separate message for each state object, similar to the output of a split node.

    State Object Format

    Sample output when the output type is an array:

    [
    +  {
    +    "entity_id": "light.kitchen",
    +    "state": "on",
    +    "attributes": {
    +      "brightness": 243,
    +      "friendly_name": "Kitchen Light",
    +      "supported_features": 33,
    +      "icon": "mdi:light-switch"
    +    },
    +    "last_changed": "2019-12-29T05:38:53.016984+00:00",
    +    "last_updated": "2019-12-29T05:38:53.016984+00:00",
    +    "context": {
    +      "id": "6c16e348494c42fb8c8e8bda92b20fb2",
    +      "parent_id": null,
    +      "user_id": null
    +    },
    +    "timeSinceChangedMs": 3466747
    +  }
    +]
    +

    entity_id

    • Type: string

    The entity to which this state belongs.

    state

    • Type: string

    The main attribute state value, such as 'on', 'off', 'home', 'open', 'closed', etc.

    attributes

    • Type: Object

    Supported attributes of the state as set by Home Assistant.

    last_changed

    • Type: string

    ISO Date string representing the last time the entity state changed.

    timeSinceChangedMs

    • Type: number

    Milliseconds since the last state change of the entity.

    last_updated

    • Type: string

    ISO Date string representing the last time the entity state was updated.

    context

    • Type: Object

    Information about who or what last changed the state of this entity.

    Examples

    `,53)),t(e,null,{default:o(()=>a[0]||(a[0]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/get-entities.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),t(c,null,{default:o(()=>a[1]||(a[1]=[n(" ### Example 1 "),s("p",null,[n("Get a notification when you leave if any doors or windows are left open. Use the "),s("code",null,"get entities"),n(" node to get a list of entity IDs (e.g., "),s("code",null,"binary_sensor.front_door"),n(", "),s("code",null,"binary_sensor.back_door"),n(", "),s("code",null,"binary_sensor.front_window"),n(", "),s("code",null,"binary_sensor.back_window"),n(") where the state is "),s("code",null,"open"),n(". The entities are returned with the output "),s("code",null,"Split"),n(", sending a message for each valid entity. A template node can then format the payload into the entity's friendly name, and the messages can be joined back into one payload using the "),s("code",null,"join"),n(" node.")],-1),s("p",null,[s("img",{src:i,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4ad3d88d8a2357d5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger-state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Left Home"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entities"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"entity"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"device_tracker.jason"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"substring"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"regex"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"constraints"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"this_entity"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous_state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"old_state.state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorValueDatatype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"home"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"this_entity"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"current_state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"new_state.state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorValueDatatype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"comparatorValue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"not_home"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"customOutputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputInitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"stateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableInput"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"284"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1248"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"d115adfcfa168310"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d115adfcfa168310"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"binary_sensor.front_door,binary_sensor.back_door,binary_sensor.front_window,binary_sensor.back_window"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"open"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"split"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"450"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1248"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"f7e4e11c30fe53bd"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f7e4e11c30fe53bd"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"template"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Format Friendly Name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"field"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"fieldType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"format"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"handlebars"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"syntax"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mustache"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"template"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{{payload.attributes.friendly_name}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"654"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1248"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"6932846cb5c86e6f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6932846cb5c86e6f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"join"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"custom"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"build"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"string"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"key"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"joiner"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'","'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"joinerType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"accumulate"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"count"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reduceRight"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reduceExp"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reduceInit"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reduceInitType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reduceFixup"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"824"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1248"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"601e97da25388235"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"601e97da25388235"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Notify"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"6"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"notify.push_jason"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"message\\": \\"The {{payload}} are open.\\",\\"title\\": \\"Left Open\\"}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"notify"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"push_jason"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"952"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1248"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),n(` +`),s("span",{class:"line"})])])],-1),s("h3",{id:"example-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-2"},[s("span",null,"Example 2")])],-1),s("p",null,[n("Create a vacation or away script to randomly turn on lights around your home. Use an "),s("code",null,"inject"),n(" node (or your preferred timer node) and the "),s("code",null,"get entities"),n(" node to randomly choose an entity from the criteria where "),s("code",null,"entity_id"),n(" starts with "),s("code",null,"light."),n(".")],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"39342a95.8db3d6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"300"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1360"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e9038030.b79e4"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e9038030.b79e4"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"starts_with"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light."'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"450"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1360"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2586f129.6136fe"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"58c67712.8aa4a8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"delay"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"pauseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeoutUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"seconds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"nbRateUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rateUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"second"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"randomFirst"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"20"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"randomLast"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"randomUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"drop"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"780"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1360"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"986369ca.af3f48"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2586f129.6136fe"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Turn on Light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"6"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light.turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"{{payload.entity_id}}"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"610"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1360"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"58c67712.8aa4a8"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"986369ca.af3f48"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Turn off Light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"6"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light.turn_off"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"{{payload.entity_id}}"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"turn_off"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"946"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1360"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),n(` +`),s("span",{class:"line"})])])],-1),s("h3",{id:"example-3",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-3"},[s("span",null,"Example 3")])],-1),s("p",null,[n("Join pre-defined messages based on separate entity states. Use the "),s("code",null,"get entities"),n(" and "),s("code",null,"function"),n(" nodes with the "),s("code",null,"Array"),n(" output option.")],-1),s("p",null,[s("img",{src:g,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2bdd6fb7.15743"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"6"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entities"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"entity"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"substring"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"binary_sensor.button_bedroom"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"regex"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputInitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"stateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ifState"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ifStateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ifStateOperator"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputOnlyOnStateChange"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"eventData"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"284"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1520"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"c2a9ffac.1e05d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c2a9ffac.1e05d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sensor.phon_charging,sensor.watch_charging,sensor.kaylas_phone_charging,lock.lock"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"no,unlocked"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"array"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"562"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1520"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2950c181.1ef95e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2950c181.1ef95e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"let lockFD = null;\\nlet PC = false;\\nlet WC = false;\\nlet KP = false;\\nlet FD = false;\\n\\nmsg.payload.forEach(entity => {\\n switch(entity.entity_id) {\\n case \\"sensor.phone_charging\\":\\n PC = true;\\n break;\\n case \\"sensor.watch_charging\\":\\n WC = true;\\n break;\\n case \\"sensor.kaylas_phone_charging\\":\\n KP = true;\\n break;\\n case \\"lock.lock\\":\\n FD = true;\\n lockFD = { payload: true };\\n break;\\n }\\n \\n});\\n\\nlet message = \\"Goodnight.\\";\\nif(PC && WC) {\\n message = `${message} Don’t forget to charge your phone and watch.`;\\n} else {\\n message = `${message} Don’t forget to charge your ${PC ? \'phone\' : \'watch\'}.`\\n}\\nif(KP) {\\n message = `${message} Remind Kayla to charge her phone${PC ? \' too\':\'\'}.`;\\n}\\nif(FD) {\\n message = `${message} The door is now locked.`\\n}\\nmsg.payload = message;\\nreturn [msg, lockFD];\\n"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"702"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1520"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"ca4a5643.9bf0d8"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"64374b0e.f72394"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ca4a5643.9bf0d8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cast-to-client"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"url"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"contentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"message"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"language"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"en"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ip"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"192.168.1.29"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"port"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"volume"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"40"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"886"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1520"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"64374b0e.f72394"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lock door"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"6"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"scene.turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"scene.lock_door"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"scene"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_location_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"856"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1568"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),n(` +`),s("span",{class:"line"})])])],-1),s("h3",{id:"example-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-4"},[s("span",null,"Example 4")])],-1),s("p",null,'Get all lights in an area named "Kitchen" that are off.',-1),s("p",null,[s("img",{src:d,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a13b46e3d393d3d6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"220"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1712"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a16bfc3b499fc173"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fe39495f3aab7683"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"do stuff"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"668"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1712"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a16bfc3b499fc173"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b9bff4863336dc6b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get all off lights in the kitchen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"starts_with"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light."'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"stateObject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"off"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"areaRegistry"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Kitchen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"array"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"444"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1712"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fe39495f3aab7683"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),n(` +`),s("span",{class:"line"})])])],-1)])),_:1}),a[3]||(a[3]=s("h2",{id:"references",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#references"},[s("span",null,"References")])],-1)),a[4]||(a[4]=s("ul",null,[s("li",null,[s("a",{href:"https://home-assistant.io/docs/configuration/state_object/",target:"_blank",rel:"noopener noreferrer"},"Home Assistant State Objects")])],-1))])}const v=r(h,[["render",b],["__file","get-entities.html.vue"]]),q=JSON.parse('{"path":"/node/get-entities.html","title":"Get Entities","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Search Criteria","slug":"search-criteria","link":"#search-criteria","children":[]},{"level":3,"title":"Property","slug":"property","link":"#property","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"Payload","slug":"payload","link":"#payload","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"Array","slug":"array","link":"#array","children":[]},{"level":3,"title":"Count","slug":"count","link":"#count","children":[]},{"level":3,"title":"Random","slug":"random","link":"#random","children":[]},{"level":3,"title":"Split","slug":"split","link":"#split","children":[]}]},{"level":2,"title":"State Object Format","slug":"state-object-format","link":"#state-object-format","children":[{"level":3,"title":"entity_id","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"state","slug":"state","link":"#state","children":[]},{"level":3,"title":"attributes","slug":"attributes","link":"#attributes","children":[]},{"level":3,"title":"last_changed","slug":"last-changed","link":"#last-changed","children":[]},{"level":3,"title":"timeSinceChangedMs","slug":"timesincechangedms","link":"#timesincechangedms","children":[]},{"level":3,"title":"last_updated","slug":"last-updated","link":"#last-updated","children":[]},{"level":3,"title":"context","slug":"context","link":"#context","children":[]}]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[{"level":3,"title":"Example 2","slug":"example-2","link":"#example-2","children":[]},{"level":3,"title":"Example 3","slug":"example-3","link":"#example-3","children":[]},{"level":3,"title":"Example 4","slug":"example-4","link":"#example-4","children":[]}]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":7}]},"filePathRelative":"node/get-entities.md"}');export{v as comp,q as data}; diff --git a/assets/get-entities_01-CNrrQzIG.png b/assets/get-entities_01-CNrrQzIG.png new file mode 100644 index 0000000000..590788214b Binary files /dev/null and b/assets/get-entities_01-CNrrQzIG.png differ diff --git a/assets/get-entities_02-6WjKPZlv.png b/assets/get-entities_02-6WjKPZlv.png new file mode 100644 index 0000000000..cb94c51a15 Binary files /dev/null and b/assets/get-entities_02-6WjKPZlv.png differ diff --git a/assets/get-entities_03-C5epOs7g.png b/assets/get-entities_03-C5epOs7g.png new file mode 100644 index 0000000000..dbbdf4b4ef Binary files /dev/null and b/assets/get-entities_03-C5epOs7g.png differ diff --git a/assets/get-entities_04-DgqPL72w.png b/assets/get-entities_04-DgqPL72w.png new file mode 100644 index 0000000000..2c8597f373 Binary files /dev/null and b/assets/get-entities_04-DgqPL72w.png differ diff --git a/assets/get-history.html-BhCpE7NY.js b/assets/get-history.html-BhCpE7NY.js new file mode 100644 index 0000000000..066fdd0a16 --- /dev/null +++ b/assets/get-history.html-BhCpE7NY.js @@ -0,0 +1,45 @@ +import{_ as n,c as t,e as l,a as s,b as o,w as p,r as i,o as r,d as c}from"./app-CefLgoES.js";const u={};function d(h,a){const e=i("RouteLink");return r(),t("div",null,[a[1]||(a[1]=l(`

    Get History

    The Get History node fetches the history of Home Assistant entities based on input criteria. This can be used to analyze past states or events, such as tracking temperature changes over time or reviewing when a door was last opened. It’s useful for creating more complex automations based on historical data.

    Configuration

    Entity ID

    • Type: string

    The entity id to fetch history for. Can be a single entity id or a comma separated list of entity ids.

    Entity ID Type

    • Type: string
    • Values: == | regex

    The type of entity id matching to use. == will do an exact match, regex will use a regular expression to match the entity ids.

    Start Date

    • Type: string
    • Values: ISO Formattted Date
    • Default: 24 hours prior

    Date to start fetching history from. Will override the configuration if passed in. If relativetime is used this will be ignored.

    Also See:

    End Date

    • Type: string
    • Values: ISO Formattted Date
    • Default: 24 hours from start date

    The end date to fetch history too. Will override the configuration if passed in. If relativetime is used this will be ignored.

    Also See:

    Use Relative Time

    • Type: boolean

    A checkbox to use relative time or not. If checked the startdate and enddate will be ignored and the relativetime will be used instead.

    In the Last

    • Type: string

    A time string that will be parsed the following keywords into time values.

    Example: 4h 30m = The last 4 hours and 30 minutes

    ms, milli, millisecond, milliseconds - will parse to milliseconds
    +s, sec, secs, second, seconds - will parse to seconds
    +m, min, mins, minute, minutes - will parse to minutes
    +h, hr, hrs, hour, hours - will parse to hours
    +d, day, days - will parse to days
    +w, week, weeks - will parse to weeks
    +mon, mth, mths, month, months - will parse to months
    +y, yr, yrs, year, years - will parse to years
    +

    Flatten Results

    Instead of returning the data from home assistant ( array for each entity_id ) return one flattened array of one item per history entry

    Output Types

    • Type: string
    • Values: array | split
    • Default: array

    The type of output to return. array will return an array of history objects. split will return an array of history objects for each entity id.

    Inputs

    All properties of msg.payload

    entityId

    • Type: string

    entityIdType

    • Type: equal | regex

    startDate

    • Type: string
    • Values: ISO Formattted Date

    endDate

    • Type: string
    • Values: ISO Formattted Date

    relativeTime

    • Type: string

    flatten

    • Type: boolean

    Outputs

    payload

    • Type: array

    The history returned by home-assistant, which is an array of arrays where each array entry contains history objects for one particular entity

    Example output of msg:

    {
    +  "payload": [
    +    {
    +      "attributes": {
    +        "friendly_name": "Kitchen Light",
    +        "icon": "mdi:light-switch",
    +      },
    +      "context": {
    +        "id": "850e510e36fb494c9abc79e01e897d54",
    +        "parent_id": null,
    +        "user_id": null
    +      },
    +      "entity_id": "light.kitchen_light",
    +      "last_changed": "2019-12-28T06:47:28.618000+00:00",
    +      "last_updated": "2019-12-28T06:47:28.618000+00:00",
    +      "state": "off"
    +    },
    +    {
    +      "attributes": {
    +        "brightness": 28,
    +        "friendly_name": "Kitchen Light",
    +        "icon": "mdi:light-switch",
    +      },
    +      "context": {
    +        "id": "4d4abe29f2bc43dab39101193f1fefe4",
    +        "parent_id": null,
    +        "user_id": null
    +      },
    +      "entity_id": "light.kitchen_light",
    +      "last_changed": "2019-12-28T07:48:11.514137+00:00",
    +      "last_updated": "2019-12-28T07:48:11.514137+00:00",
    +      "state": "on"
    +    },
    +    ...
    +  ]
    +}
    +

    Examples

    `,53)),s("p",null,[o(e,{to:"/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html"},{default:p(()=>a[0]||(a[0]=[c("Check if an entity was a certain state in the last 24 hours")])),_:1})]),a[2]||(a[2]=s("h2",{id:"references",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#references"},[s("span",null,"References")])],-1)),a[3]||(a[3]=s("ul",null,[s("li",null,[s("a",{href:"https://www.home-assistant.io/integrations/history",target:"_blank",rel:"noopener noreferrer"},"Home Assistant History Component")]),s("li",null,[s("a",{href:"https://developers.home-assistant.io/docs/en/external_api_rest.html#get-apihistoryperiodlttimestamp",target:"_blank",rel:"noopener noreferrer"},"Home Assistant API: /api/history/period")])],-1))])}const y=n(u,[["render",d],["__file","get-history.html.vue"]]),g=JSON.parse('{"path":"/node/get-history.html","title":"Get History","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity ID","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"Entity ID Type","slug":"entity-id-type","link":"#entity-id-type","children":[]},{"level":3,"title":"Start Date","slug":"start-date","link":"#start-date","children":[]},{"level":3,"title":"End Date","slug":"end-date","link":"#end-date","children":[]},{"level":3,"title":"Use Relative Time","slug":"use-relative-time","link":"#use-relative-time","children":[]},{"level":3,"title":"In the Last","slug":"in-the-last","link":"#in-the-last","children":[]},{"level":3,"title":"Flatten Results","slug":"flatten-results","link":"#flatten-results","children":[]},{"level":3,"title":"Output Types","slug":"output-types","link":"#output-types","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"entityId","slug":"entityid","link":"#entityid","children":[]},{"level":3,"title":"entityIdType","slug":"entityidtype","link":"#entityidtype","children":[]},{"level":3,"title":"startDate","slug":"startdate","link":"#startdate","children":[]},{"level":3,"title":"endDate","slug":"enddate","link":"#enddate","children":[]},{"level":3,"title":"relativeTime","slug":"relativetime","link":"#relativetime","children":[]},{"level":3,"title":"flatten","slug":"flatten","link":"#flatten","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]}]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6}]},"filePathRelative":"node/get-history.md"}');export{y as comp,g as data}; diff --git a/assets/get-state_changed-events-based-on-area.html-BYhJ4E6e.js b/assets/get-state_changed-events-based-on-area.html-BYhJ4E6e.js new file mode 100644 index 0000000000..b5afbe4f42 --- /dev/null +++ b/assets/get-state_changed-events-based-on-area.html-BYhJ4E6e.js @@ -0,0 +1,2 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/get-state_changed-events-based-on-area_01-CutpOdT7.png",e={};function u(c,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Get state_changed Events Based on Area

    screenshot

    [{"id":"c964194d.7ad5e8","type":"ha-api","z":"ffbd7f06.4a014","name":"areas","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/area_registry/list\\"}","dataType":"json","location":"areas","locationType":"msg","responseType":"json","x":514,"y":944,"wires":[["4b011603.4c27f8"]]},{"id":"832ebec4.0d4a4","type":"inject","z":"ffbd7f06.4a014","name":"Manual Update","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":320,"y":944,"wires":[["c964194d.7ad5e8"]]},{"id":"4b011603.4c27f8","type":"ha-api","z":"ffbd7f06.4a014","name":"devices","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/device_registry/list\\"}","dataType":"json","location":"devices","locationType":"msg","responseType":"json","x":654,"y":944,"wires":[["4be8b708.430ec8"]]},{"id":"4be8b708.430ec8","type":"ha-api","z":"ffbd7f06.4a014","name":"entities","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/entity_registry/list\\"}","dataType":"json","location":"entities","locationType":"msg","responseType":"json","x":798,"y":944,"wires":[["59e18ea8.03287"]]},{"id":"2538006.71ef4","type":"debug","z":"ffbd7f06.4a014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1144,"y":944,"wires":[]},{"id":"81c8e84.471e218","type":"server-events","z":"ffbd7f06.4a014","name":"","event_type":"state_changed","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":308,"y":1040,"wires":[["6e177280.669dec"]]},{"id":"59e18ea8.03287","type":"function","z":"ffbd7f06.4a014","name":"","func":"const entities = {};\\n\\nmsg.entities.forEach(e => {\\n    if(!e.device_id) return;\\n    \\n    const device = msg.devices.find(d => d.id === e.device_id);\\n    const area = msg.areas.find(a => a.area_id === device.area_id);\\n    if(area) {\\n        entities[e.entity_id] = {\\n            area_id: area.area_id,\\n            name: area.name\\n        };\\n    }\\n});\\n\\nmsg.payload = entities;\\nmsg.update = true;\\nreturn msg;","outputs":1,"noerr":0,"x":964,"y":944,"wires":[["2538006.71ef4","6e177280.669dec"]]},{"id":"6e177280.669dec","type":"function","z":"ffbd7f06.4a014","name":"set area","func":"if(msg.update) {\\n    node.status({fill:\\"green\\", shape: \\"dot\\", text: \\"Area Data Loaded\\", })\\n    context.set(\\"data\\", msg.payload);\\n    return;\\n}\\nconst data = context.get(\\"data\\");\\n\\nif(!data) {\\n    node.status({fill:\\"red\\", shape: \\"ring\\", text: \\"No Area Data\\", })\\n    return;\\n}\\n\\nconst area = data[msg.payload.entity_id];\\nif(!area) return;\\n\\nmsg.area = area.name.toLowerCase();     \\nnode.status({text: msg.area});\\n\\nreturn msg;","outputs":1,"noerr":0,"x":524,"y":1040,"wires":[["86100cd0.de8c5"]]},{"id":"582c98e0.5cd328","type":"debug","z":"ffbd7f06.4a014","name":"Kitchen","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":828,"y":1024,"wires":[]},{"id":"b60ead00.b4aaa","type":"debug","z":"ffbd7f06.4a014","name":"Bedroom","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":828,"y":1072,"wires":[]},{"id":"86100cd0.de8c5","type":"switch","z":"ffbd7f06.4a014","name":"","property":"area","propertyType":"msg","rules":[{"t":"eq","v":"kitchen","vt":"str"},{"t":"eq","v":"bedroom","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":656,"y":1040,"wires":[["582c98e0.5cd328"],["b60ead00.b4aaa"]]},{"id":"94d81549.f88148","type":"server-events","z":"ffbd7f06.4a014","name":"On Connect","event_type":"home_assistant_client","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":278,"y":896,"wires":[["72ef46c0.dbbce8"]]},{"id":"72ef46c0.dbbce8","type":"switch","z":"ffbd7f06.4a014","name":"connected","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":896,"wires":[["c964194d.7ad5e8"]]},{"id":"47aad143.f438c","type":"server-events","z":"ffbd7f06.4a014","name":"entity_registry_updated","event_type":"entity_registry_updated","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":308,"y":752,"wires":[["c7d0582b.715958"]]},{"id":"58d3bcdb.d39014","type":"server-events","z":"ffbd7f06.4a014","name":"device_registry_updated","event_type":"device_registry_updated","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":318,"y":800,"wires":[["c7d0582b.715958"]]},{"id":"8a9f192c.425718","type":"server-events","z":"ffbd7f06.4a014","name":"area_registry_updated","event_type":"area_registry_updated","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":308,"y":848,"wires":[["c7d0582b.715958"]]},{"id":"c7d0582b.715958","type":"trigger","z":"ffbd7f06.4a014","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":false,"units":"s","reset":"","bytopic":"all","name":"Update at most every 10 secs","x":610,"y":800,"wires":[["c964194d.7ad5e8"]]}]
    +
    `,3)]))}const l=n(e,[["render",u],["__file","get-state_changed-events-based-on-area.html.vue"]]),k=JSON.parse('{"path":"/cookbook/get-state_changed-events-based-on-area.html","title":"Get state_changed Events Based on Area","lang":"en-US","frontmatter":{},"headers":[],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/get-state_changed-events-based-on-area.md"}');export{l as comp,k as data}; diff --git a/assets/get-state_changed-events-based-on-area_01-CutpOdT7.png b/assets/get-state_changed-events-based-on-area_01-CutpOdT7.png new file mode 100644 index 0000000000..80d29ba6e6 Binary files /dev/null and b/assets/get-state_changed-events-based-on-area_01-CutpOdT7.png differ diff --git a/assets/getting-started_03-B4ue_ZcX.png b/assets/getting-started_03-B4ue_ZcX.png new file mode 100644 index 0000000000..f8374b84e8 Binary files /dev/null and b/assets/getting-started_03-B4ue_ZcX.png differ diff --git a/assets/getting_started_02-7mfV03T6.png b/assets/getting_started_02-7mfV03T6.png new file mode 100644 index 0000000000..e7d6c705ca Binary files /dev/null and b/assets/getting_started_02-7mfV03T6.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled.html-mqFFTo0l.js b/assets/holiday-lights-scheduler-and-demo-mode-for-wled.html-mqFFTo0l.js new file mode 100644 index 0000000000..2ec4bee589 --- /dev/null +++ b/assets/holiday-lights-scheduler-and-demo-mode-for-wled.html-mqFFTo0l.js @@ -0,0 +1,90 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_01-CHAwUUih.png",e="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_03-D-JrQP6b.png",u="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_08-BKy7okvm.png",c="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_05-9II8TJDT.png",r="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_06-FMERduQa.png",l="/node-red-contrib-home-assistant-websocket/assets/holiday-lights-scheduler-and-demo-mode-for-wled_02-DLPVHS6D.png",k={};function i(q,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Holiday lights scheduler and demo mode for WLED

    Questions and Discussion

    Post questions and follow the discussion about this recipe here

    Here's a flow to control some outdoor house LEDs hooked up to an ESP8266 running WLED.

    The holiday lights turn on each day at sunset and then off at midnight. It uses WLED presets based on the day or season. It has a demo mode that will cycle through all the defined presets or all the included effects.

    screenshot of flow

    Version 1

    [{"id":"886a465.91a0ab8","type":"switch","z":"894a6b3077af9604","name":"dark?","property":"dark","propertyType":"flow","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":240,"wires":[["5e38e1ee8665f5e7"],["90579358.a3dce"]]},{"id":"34cb332b.f8228c","type":"server-state-changed","z":"894a6b3077af9604","name":"Demo Mode","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.holiday_lights_demo_mode","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":294,"y":384,"wires":[["df0da821.aa74b8"],["91131276.4f322"]]},{"id":"90579358.a3dce","type":"api-call-service","z":"894a6b3077af9604","name":"turn off holiday lights","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"last","x":692,"y":288,"wires":[[]]},{"id":"dc4b2af1.d366a8","type":"ha-wait-until","z":"894a6b3077af9604","name":"loop","server":"","version":0,"outputs":2,"entityId":"{{flow.wledHolidayLightsEntityId}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"60","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":false,"x":850,"y":240,"wires":[[],["5e38e1ee8665f5e7"]]},{"id":"59e25c2c.a3a514","type":"eztimer","z":"894a6b3077af9604","name":"","debug":false,"autoname":"sunset - 00:00","tag":"test1","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"1","ontimesun":"sunset","ontimetod":"17:00","onpropertytype":"flow","onproperty":"dark","onvaluetype":"bool","onvalue":"true","onoffset":"","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"00:00","offduration":0,"offpropertytype":"flow","offproperty":"dark","offvaluetype":"bool","offvalue":"false","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"1m","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":304,"y":240,"wires":[["886a465.91a0ab8"]]},{"id":"f4ab62e2.10029","type":"api-call-service","z":"894a6b3077af9604","name":"turn on holiday lights","server":"","version":3,"debugenabled":false,"service_domain":"select","service":"select_option","entityId":"{{flow.wledHolidayLightsPresetEntityId}}","data":"{\\"option\\": payload}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"last","x":900,"y":192,"wires":[[]]},{"id":"98efb1f6.c85b8","type":"ha-wait-until","z":"894a6b3077af9604","name":"loop","server":"","version":0,"outputs":2,"entityId":"{{flow.wledHolidayLightsEntityId}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"$number($entities(\\"input_number.holiday_lights_demo_mode_delay\\").state)","timeoutType":"jsonata","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":1058,"y":432,"wires":[[],["91131276.4f322"]]},{"id":"91131276.4f322","type":"switch","z":"894a6b3077af9604","name":"which mode?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"cycle presets","vt":"str"},{"t":"eq","v":"cycle effects","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":432,"wires":[["5adba3095728cdab"],["28fd29dc.96d306"]]},{"id":"333ed476.51a77c","type":"api-call-service","z":"894a6b3077af9604","name":"turn on preset","server":"","version":3,"debugenabled":false,"service_domain":"select","service":"select_option","entityId":"{{flow.wledHolidayLightsPresetEntityId}}","data":"{\\"option\\": name}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":432,"wires":[["98efb1f6.c85b8","d0b9f667.79a8c8"]]},{"id":"fcf7dabd.b7a368","type":"api-call-service","z":"894a6b3077af9604","name":"turn on effect","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"{\\"effect\\": name}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":480,"wires":[["98efb1f6.c85b8","d0b9f667.79a8c8"]]},{"id":"df0da821.aa74b8","type":"change","z":"894a6b3077af9604","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":384,"wires":[["886a465.91a0ab8","98efb1f6.c85b8"]]},{"id":"998c4f75.52cbf","type":"api-call-service","z":"894a6b3077af9604","name":"turn off demo mode","server":"","version":3,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"input_select.holiday_lights_demo_mode","data":"{\\"option\\": \\"off\\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":570,"y":528,"wires":[[]]},{"id":"5caeec35.01a114","type":"server-state-changed","z":"894a6b3077af9604","name":"Holiday Lights turned off?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.wled","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":332,"y":528,"wires":[["998c4f75.52cbf"],[]]},{"id":"28fd29dc.96d306","type":"function","z":"894a6b3077af9604","name":"get next effect","func":"const states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst entityId = flow.get(\\"wledHolidayLightsEntityId\\");\\nconst effects = states[entityId].attributes.effect_list;\\nconst activeEffect = states[entityId].attributes.effect;\\nlet index = effects.findIndex(ele => ele === activeEffect);\\nindex = (index === -1 || index >= effects.length - 1) ? 0 : index + 1;\\n\\nnode.status({text: effects[index]});\\n\\nmsg.name = effects[index];\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":672,"y":480,"wires":[["fcf7dabd.b7a368"]]},{"id":"d0b9f667.79a8c8","type":"ha-entity","z":"894a6b3077af9604","name":"current demo","server":"","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Holiday Lights Demo Current"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"name","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":1078,"y":480,"wires":[[]]},{"id":"9168ce00.dc7de","type":"comment","z":"894a6b3077af9604","name":"Scheduler","info":"","x":284,"y":192,"wires":[]},{"id":"241d097a.a3fe76","type":"comment","z":"894a6b3077af9604","name":"Demo Mode","info":"","x":294,"y":336,"wires":[]},{"id":"22f2928a.e2ae9e","type":"inject","z":"894a6b3077af9604","name":"Manual Start","props":[{"p":"payload"},{"p":"topic","vt":"str"},{"p":"dark","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":294,"y":288,"wires":[["5e38e1ee8665f5e7"]]},{"id":"9f8ca90550d41489","type":"inject","z":"894a6b3077af9604","name":"Setup","props":[{"p":"entityId","v":"light.holiday_lights","vt":"str"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":284,"y":144,"wires":[["1047f2356f1e5203"]]},{"id":"1047f2356f1e5203","type":"change","z":"894a6b3077af9604","name":"set entity ids here","rules":[{"t":"set","p":"wledHolidayLightsEntityId","pt":"flow","to":"light.wled","tot":"str"},{"t":"set","p":"wledHolidayLightsPresetEntityId","pt":"flow","to":"select.wled_preset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":144,"wires":[[]]},{"id":"5e38e1ee8665f5e7","type":"function","z":"894a6b3077af9604","name":"date ranges","func":"const now = new Date();\\nconst monthDay = getMonthDay(now);\\nconst states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst entityId = flow.get(\\"wledHolidayLightsEntityId\\");\\nconst presetId = flow.get(\\"wledHolidayLightsPresetEntityId\\");\\nconst christmasPresets = [\\n  \\"Christmas\\",\\n  \\"Christmas Candy Cane\\",\\n  \\"Christmas Classic\\",\\n  \\"Christmas Holly Jolly\\"\\n];\\n\\nlet updateInterval = 0; // in minutes\\nlet preset;\\n\\nswitch(true) {\\n// Winter \\n    case isToday(214):\\n      preset = \\"Valentine\\";\\n      break;\\n// President's Day changes every year, Veteran's Day & Flag Day always the same date\\n    case isToday(614): // 6/14 Flag Day\\n    case isToday(1111): // 11/11 Veterans Day\\n    case isToday(\\"President's Day\\"):\\n    case isToday(\\"Memorial Day\\"):\\n      preset = \\"Red White Blue\\";\\n      break;\\n    case isToday(317):\\n      preset = \\"St Patty\\";\\n      break;\\n    case isToday(\\"Easter\\"):\\n      preset = \\"Easter\\";\\n      break;\\n    case isToday(\\"Ash Wednesday\\", \\"Easter\\"):\\n      preset = \\"Spring\\";\\n      break;\\n// Spring\\n    case isToday(504):\\n      preset = \\"Star Wars\\";\\n      break;\\n    case isToday(505):\\n      preset = \\"Cinco de Mayo\\";\\n      break;\\n// Summer\\n    case isToday(704):\\n      preset = \\"Fireworks\\";\\n      break;\\n// Autumn\\n    case isToday(1014, 1031):\\n      preset = \\"Halloween\\";\\n      break;\\n    case isToday(\\"Thanksgiving Day\\"):\\n      preset = \\"Autumn\\";\\n      break;\\n    case isToday(1231):\\n      preset = \\"Fireworks White\\";\\n      break;\\n    case isToday(\\"Thanksgiving Day\\", 1231):\\n    case isToday(101, 106):\\n      preset = getRandomPreset(christmasPresets);\\n      updateInterval = 60;\\n      break;\\n    default:\\n      const seasons = {\\n        \\"winter\\": \\"Winter\\",\\n        \\"spring\\": \\"Spring\\",\\n        \\"summer\\": \\"Summer\\",\\n        \\"autumn\\": \\"Autumn\\"\\n      }\\n      const currentSeason = states[\\"sensor.season\\"].state;\\n      preset = seasons[currentSeason];\\n      break;\\n}\\n\\nnode.status({ text: preset});\\nmsg.payload = preset;\\nconst secondOutput = updateInterval ?  { payload: { timeout: updateInterval } } : { reset: true };\\n\\nreturn [msg, secondOutput];\\n\\nfunction isToday(start, end) {\\n  if (typeof start === \\"string\\") {\\n    start = getHolidayDate(now, start)\\n  }\\n  if (typeof end === \\"string\\") {\\n    end = getHolidayDate(now, end)\\n  }\\n  if (end === undefined) return monthDay === start;\\n\\n  return monthDay >= start && monthDay <= end;\\n}\\n\\nfunction getHolidayDate(date, holiday) {\\n    holiday = holiday.toLowerCase();\\n    // dates are formatted as month, week, day of the week\\n    // names should be lowercase\\n    const holidays = {\\n        \\"martin luther king day\\": [0,2,1],\\n        \\"president's day\\": [1,2,1],\\n        \\"daylight savings time begins\\": [2,1,0],\\n        \\"mother's day\\": [4,1,0],\\n        \\"memorial day\\": [4,-1,1],\\n        \\"father's day\\": [5,2,0],\\n        \\"labor day\\": [8,0,1],\\n        \\"columbus day\\": [9,1,1],\\n        \\"daylight savings time ends\\": [10,0,0],\\n        \\"thanksgiving day\\": [10,3,4]\\n    };\\n    let holidayDate;\\n    if(holiday === \\"easter\\") {\\n        holidayDate = getEasterDate(date);\\n    } else if (holiday === \\"ash wednesday\\") {\\n        const easter = getEasterDate(date);\\n        holidayDate = new Date(easter.getFullYear(), easter.getMonth(), (easter.getDate()-46));\\n    } else {\\n        const [month, week, day] = holidays[holiday];\\n        holidayDate = getDate(date.getFullYear(), month, week, day);\\n    }\\n    \\n    const monthDay = getMonthDay(holidayDate);\\n    \\n    return monthDay;\\n}\\n\\nfunction getMonthDay(date) {\\n    const monthString = String(date.getMonth() + 1).padStart(2, \\"0\\");\\n    const dayString = String(date.getDate()).padStart(2, \\"0\\");\\n    const monthDay = Number(`${monthString}${dayString}`);\\n    \\n    return monthDay;\\n}\\n\\nfunction getDate(year, month, week, day) {\\n    let firstDay = 1;\\n    if (week < 0) {\\n        month++;\\n        firstDay--;\\n    }\\n    const date = new Date(year, month, (week * 7) + firstDay);\\n    if (day < date.getDay()) {\\n        day += 7;\\n    }\\n    date.setDate(date.getDate() - date.getDay() + day);\\n    return date;\\n}\\n\\n/**\\n * Calculates Easter in the Gregorian/Western (Catholic and Protestant) calendar\\n * based on the algorithm by Oudin (1940) from http://www.tondering.dk/claus/cal/easter.php\\n * @returns {array} [int month, int day]\\n */\\nfunction getEasterDate(date) {\\n  const year = date.getFullYear();\\n  const f = Math.floor,\\n    // Golden Number - 1\\n    G = year % 19,\\n    C = f(year / 100),\\n    // related to Epact\\n    H = (C - f(C / 4) - f((8 * C + 13) / 25) + 19 * G + 15) % 30,\\n    // number of days from 21 March to the Paschal full moon\\n    I = H - f(H / 28) * (1 - f(29 / (H + 1)) * f((21 - G) / 11)),\\n    // weekday for the Paschal full moon\\n    J = (year + f(year / 4) + I + 2 - C + f(C / 4)) % 7,\\n    // number of days from 21 March to the Sunday on or before the Paschal full moon\\n    L = I - J,\\n    month = 3 + f((L + 40) / 44),\\n    day = L + 28 - 31 * f(month / 4);\\n\\n  return new Date(`${month}/${day}/${year}`);\\n}\\n\\nfunction getRandomPreset(list) {\\n  const activePreset = states[presetId].state;\\n  const filteredList = list.filter((e) => e !== activePreset);\\n  \\n  return filteredList[Math.floor(Math.random() * filteredList.length)];\\n}\\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":662,"y":240,"wires":[["f4ab62e2.10029"],["dc4b2af1.d366a8"]]},{"id":"e01d1bd31bd9e634","type":"comment","z":"894a6b3077af9604","name":"Change holiday dates in the \\"date ranges\\" node","info":"","x":404,"y":96,"wires":[]},{"id":"5adba3095728cdab","type":"function","z":"894a6b3077af9604","name":"get next preset","func":"const states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst presetId = flow.get(\\"wledHolidayLightsPresetEntityId\\");\\nconst presets = states[presetId].attributes.options;\\nconst activePreset = states[presetId].state;\\nlet index = presets.findIndex(ele => ele === activePreset);\\nindex = index === -1 || index >= presets.length - 1 ? 0 : index +1;\\nconst name = presets[index];\\n\\nnode.status({text: name });\\n\\nmsg.name = name;\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":672,"y":432,"wires":[["333ed476.51a77c"]]}]\n
    version 0
    [{"id":"eb756b3f.d770f8","type":"subflow","name":"Create HA Helpers","info":"","category":"","in":[{"x":84,"y":96,"wires":[{"id":"7f1493fc.1300fc"}]}],"out":[],"env":[{"name":"serverName","type":"str","value":"Home Assistant","ui":{"label":{"en-US":"HA Server Name"},"type":"input","opts":{"types":["str"]}}},{"name":"helpers","type":"json","value":"[]","ui":{"label":{"en-US":"Helpers"},"type":"input","opts":{"types":["json"]}}}],"color":"#DDAA99","status":{"x":246,"y":48,"wires":[{"id":"a66d5d93.8a5f","port":0}]}},{"id":"7f1493fc.1300fc","type":"function","z":"eb756b3f.d770f8","name":"process helpers","func":"const serverName = toCamelCase(env.get('serverName'));\\nconst haServer = global.get(\\"homeassistant\\")[serverName];\\nif(!haServer) {\\n    node.error(\\"Invalid HA server name\\");\\n    return;\\n}\\nconst states = haServer.states;\\nconst helpers = env.get(\\"helpers\\");\\n\\nhelpers.forEach(h => {\\n    const entityId = `${h.type}.${h.id}`;\\n    if(!states[entityId]) {\\n        const {id, type, ...data} = h;\\n        const apiData = {\\n            entity: h,\\n            payload: { \\n                data \\n            }\\n        };\\n        apiData.payload.data.type = `${type}/create`;\\n    \\n        node.send(apiData);\\n        node.status({text: `Creating ${entityId}`});\\n    }\\n});\\n\\nnode.done();\\n\\nfunction toCamelCase(str) {\\n    return str.replace(/(?:^\\\\w|[A-Z]|\\\\b\\\\w|\\\\s+)/g, (match, index) => {\\n        if (+match === 0) return '';\\n        return index === 0 ? match.toLowerCase() : match.toUpperCase();\\n    });\\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":224,"y":96,"wires":[["a4a0abd9.7576d8"]]},{"id":"a4a0abd9.7576d8","type":"ha-api","z":"eb756b3f.d770f8","name":"create helper","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":390,"y":96,"wires":[["b76d0c56.d54b9"]]},{"id":"388bb5c7.47346a","type":"ha-api","z":"eb756b3f.d770f8","name":"rename helper entity id","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\t   \\"type\\":\\"config/entity_registry/update\\",\\t   \\"entity_id\\": entity.type & \\".\\" & payload.id,\\t   \\"new_entity_id\\": entity.type & \\".\\" & entity.id\\t}","dataType":"jsonata","location":"payload","locationType":"msg","responseType":"json","x":788,"y":96,"wires":[[]]},{"id":"b76d0c56.d54b9","type":"switch","z":"eb756b3f.d770f8","name":"need to rename?","property":"payload.id","propertyType":"msg","rules":[{"t":"neq","v":"entity.id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":570,"y":96,"wires":[["388bb5c7.47346a","3e47440a.eee2cc"]]},{"id":"a66d5d93.8a5f","type":"status","z":"eb756b3f.d770f8","name":"","scope":["7f1493fc.1300fc","858d7015.518f4","3e47440a.eee2cc"],"x":124,"y":48,"wires":[[]]},{"id":"3e47440a.eee2cc","type":"function","z":"eb756b3f.d770f8","name":"rename status","func":"const oldEntityId = `${msg.entity.type}.${msg.payload.id}`;\\nconst newEntityId = `${msg.entity.type}.${msg.entity.id}`;\\n\\nnode.status({text: `Renaming ${oldEntityId} to ${newEntityId}`});","outputs":1,"noerr":0,"initialize":"","finalize":"","x":768,"y":144,"wires":[[]]},{"id":"4762791a.4c5408","type":"function","z":"daf25abf.0203b8","name":"date ranges","func":"const now = new Date();\\nconst monthDay = getMonthDay(now);\\nconst { idLookup, nameLookup } = flow.get(\\"wledHolidayLightsPresets\\");\\nconst christmasPresets = [\\n  \\"Christmas\\",\\n  \\"Christmas Classic\\",\\n  \\"Christmas Holly Jolly\\",\\n  \\"Christmas Candy Cane\\"\\n];\\nconst states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst entityId = flow.get(\\"wledHolidayLightsEntityId\\");\\n\\nlet updateInterval = 0; // in minutes\\nlet preset;\\n\\nswitch(true) {\\n// Winter \\n    case isToday(214):\\n      preset = \\"Valentine\\";\\n      break;\\n// President's Day changes every year, Veteran's Day & Flag Day always the same date\\n    case isToday(614): // 6/14 Flag Day\\n    case isToday(1111): // 11/11 Veterans Day\\n    case isToday(\\"President's Day\\"):\\n    case isToday(\\"Memorial Day\\"):\\n      preset = \\"Red, White, and Blue\\";\\n      break;\\n    case isToday(317):\\n      preset = \\"St Patty\\";\\n      break;\\n    case isToday(\\"Easter\\"):\\n      preset = \\"Easter\\";\\n      break;\\n// Spring\\n    case isToday(504):\\n      preset = \\"Starwars\\";\\n      break;\\n    case isToday(505):\\n      preset = \\"Cinco de Mayo\\";\\n      break;\\n// Summer\\n    case isToday(704):\\n      preset = \\"Independence Day\\";\\n      break;\\n// Autumn\\n    case isToday(1017, 1031):\\n      preset = \\"Halloween\\";\\n      break;\\n    case isToday(\\"Thanksgiving Day\\"):\\n      preset = \\"Autumn\\";\\n      break;\\n    case isToday(1231):\\n      preset = \\"New Years\\";\\n      break;\\n    case isToday(\\"Thanksgiving Day\\", 1231):\\n    case isToday(101, 106):\\n      preset = getRandomPreset(christmasPresets);\\n      updateInterval = 60;\\n      break;\\n    default:\\n      const seasons = {\\n        \\"winter\\": \\"Winter\\",\\n        \\"spring\\": \\"Spring\\",\\n        \\"summer\\": \\"Summer\\",\\n        \\"autumn\\": \\"Autumn\\"\\n      }\\n      const currentSeason = states[\\"sensor.season\\"].state;\\n      preset = seasons[currentSeason];\\n      break;\\n}\\n\\nnode.status({ text: preset});\\nmsg.payload = nameLookup[preset];\\nconst secondOutput = updateInterval ?  { payload: { timeout: updateInterval } } : { reset: true };\\n\\nreturn [msg, secondOutput];\\n\\nfunction isToday(start, end) {\\n  if (typeof start === \\"string\\") {\\n    start = getHolidayDate(now, start)\\n  }\\n  if (typeof end === \\"string\\") {\\n    end = getHolidayDate(now, end)\\n  }\\n  if (end === undefined) return monthDay === start;\\n\\n  return monthDay >= start && monthDay <= end;\\n}\\n\\nfunction getHolidayDate(date, holiday) {\\n    holiday = holiday.toLowerCase();\\n    // dates are formatted as month, week, day of the week\\n    // names should be lowercase\\n    const holidays = {\\n        \\"martin luther king day\\": [0,2,1],\\n        \\"president's day\\": [1,2,1],\\n        \\"daylight savings time begins\\": [2,1,0],\\n        \\"mother's day\\": [4,1,0],\\n        \\"memorial day\\": [4,-1,1],\\n        \\"father's day\\": [5,2,0],\\n        \\"labor day\\": [8,0,1],\\n        \\"columbus day\\": [9,1,1],\\n        \\"daylight savings time ends\\": [10,0,0],\\n        \\"thanksgiving day\\": [10,3,4]\\n    };\\n    let holidayDate;\\n    if(holiday === \\"easter\\") {\\n        holidayDate = getEasterDate(date); \\n    } else {\\n        const [month, week, day] = holidays[holiday];\\n        holidayDate = getDate(date.getFullYear(), month, week, day);\\n    }\\n    \\n    const monthDay = getMonthDay(holidayDate);\\n    \\n    return monthDay;\\n}\\n\\nfunction getMonthDay(date) {\\n    const monthString = String(date.getMonth() + 1).padStart(2, \\"0\\");\\n    const dayString = String(date.getDate()).padStart(2, \\"0\\");\\n    const monthDay = Number(`${monthString}${dayString}`);\\n    \\n    return monthDay;\\n}\\n\\nfunction getDate(year, month, week, day) {\\n    let firstDay = 1;\\n    if (week < 0) {\\n        month++;\\n        firstDay--;\\n    }\\n    const date = new Date(year, month, (week * 7) + firstDay);\\n    if (day < date.getDay()) {\\n        day += 7;\\n    }\\n    date.setDate(date.getDate() - date.getDay() + day);\\n    return date;\\n}\\n\\n/**\\n * Calculates Easter in the Gregorian/Western (Catholic and Protestant) calendar\\n * based on the algorithm by Oudin (1940) from http://www.tondering.dk/claus/cal/easter.php\\n * @returns {array} [int month, int day]\\n */\\nfunction getEasterDate(date) {\\n  const year = date.getFullYear();\\n  const f = Math.floor,\\n    // Golden Number - 1\\n    G = year % 19,\\n    C = f(year / 100),\\n    // related to Epact\\n    H = (C - f(C / 4) - f((8 * C + 13) / 25) + 19 * G + 15) % 30,\\n    // number of days from 21 March to the Paschal full moon\\n    I = H - f(H / 28) * (1 - f(29 / (H + 1)) * f((21 - G) / 11)),\\n    // weekday for the Paschal full moon\\n    J = (year + f(year / 4) + I + 2 - C + f(C / 4)) % 7,\\n    // number of days from 21 March to the Sunday on or before the Paschal full moon\\n    L = I - J,\\n    month = 3 + f((L + 40) / 44),\\n    day = L + 28 - 31 * f(month / 4);\\n\\n  return new Date(`${month}/${day}/${year}`);\\n}\\n\\nfunction getRandomPreset(list) {\\n  const activePreset = states[entityId].attributes.preset;\\n  const presetName = idLookup[activePreset];\\n  const filteredList = list.filter((e) => e !== presetName);\\n  \\n  return filteredList[Math.floor(Math.random() * filteredList.length)];\\n}\\n","outputs":2,"noerr":0,"initialize":"","finalize":"","x":470,"y":272,"wires":[["91b62e9f.fe736","dece0bc.3c215f8"],["dc570e50.22a3a"]]},{"id":"c46d93f8.1fe18","type":"switch","z":"daf25abf.0203b8","name":"dark?","property":"dark","propertyType":"flow","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":306,"y":272,"wires":[["4762791a.4c5408"],["73710f8.1582bf"]]},{"id":"fe4f63d8.5312c","type":"server-state-changed","z":"daf25abf.0203b8","name":"Demo Mode","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.holiday_lights_demo_mode","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"x":102,"y":464,"wires":[["1a546dd7.2d8ef2"],["92c007de.c4a168"]]},{"id":"73710f8.1582bf","type":"api-call-service","z":"daf25abf.0203b8","name":"turn off holiday lights","server":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":500,"y":320,"wires":[[]]},{"id":"dc570e50.22a3a","type":"ha-wait-until","z":"daf25abf.0203b8","name":"loop","server":"","outputs":2,"entityId":"{{flow.wledHolidayLightsEntityId}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"60","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":false,"x":658,"y":272,"wires":[[],["4762791a.4c5408"]]},{"id":"f5422b5c.762798","type":"eztimer","z":"daf25abf.0203b8","name":"","debug":false,"autoname":"sunset - 00:00","tag":"test1","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"1","ontimesun":"sunset","ontimetod":"17:00","onpropertytype":"msg","onproperty":"dark","onvaluetype":"bool","onvalue":"true","onoffset":"","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"00:00","offduration":0,"offpropertytype":"msg","offproperty":"dark","offvaluetype":"bool","offvalue":"false","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"1m","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":112,"y":272,"wires":[["c800976d.89af98"]]},{"id":"91b62e9f.fe736","type":"api-call-service","z":"daf25abf.0203b8","name":"turn on holiday lights","server":"","version":1,"debugenabled":false,"service_domain":"wled","service":"preset","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"{\\"preset\\": payload}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":708,"y":224,"wires":[[]]},{"id":"78b7479f.e79dd8","type":"function","z":"daf25abf.0203b8","name":"get preset","func":"// WLED Presets\\nconst { nameLookup } = flow.get(\\"wledHolidayLightsPresets\\");\\n\\nmsg.payload = nameLookup[msg.payload];\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":668,"y":176,"wires":[["cc0fc459.d7f3a8"]]},{"id":"6a3ef206.84c5fc","type":"api-call-service","z":"daf25abf.0203b8","name":"populate HA dropdown with presets","server":"","version":1,"debugenabled":false,"service_domain":"input_select","service":"set_options","entityId":"input_select.holiday_lights_presets","data":"{\\"options\\": payload}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":748,"y":128,"wires":[["d7d3f0e8.9971d"]]},{"id":"a6b79bf.256d268","type":"inject","z":"daf25abf.0203b8","name":"Setup","props":[{"p":"entityId","v":"light.holiday_lights","vt":"str"},{"p":"WLED_IP","v":"","vt":"str"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":108,"y":128,"wires":[["4b308915.771578"]]},{"id":"1538c003.e770a","type":"ha-wait-until","z":"daf25abf.0203b8","name":"loop","server":"","outputs":2,"entityId":"{{flow.wledHolidayLightsEntityId}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"$number($entities(\\"input_number.holiday_lights_demo_mode_delay\\").state)","timeoutType":"jsonata","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":866,"y":512,"wires":[[],["92c007de.c4a168"]]},{"id":"92c007de.c4a168","type":"switch","z":"daf25abf.0203b8","name":"which mode?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"cycle presets","vt":"str"},{"t":"eq","v":"cycle effects","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":278,"y":512,"wires":[["29bbe4ad.4de71c"],["7f2dc75.a04cf38"]]},{"id":"422a9fe2.d974c","type":"api-call-service","z":"daf25abf.0203b8","name":"turn on preset","server":"","version":1,"debugenabled":false,"service_domain":"wled","service":"preset","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"{\\"preset\\": preset}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":688,"y":512,"wires":[["1538c003.e770a","e132c6fa.e3da18"]]},{"id":"9755a99c.54ba18","type":"api-call-service","z":"daf25abf.0203b8","name":"turn on effect","server":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"{{flow.wledHolidayLightsEntityId}}","data":"{\\"effect\\": effect}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":678,"y":560,"wires":[["1538c003.e770a","e132c6fa.e3da18"]]},{"id":"1a546dd7.2d8ef2","type":"change","z":"daf25abf.0203b8","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"info","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":258,"y":464,"wires":[["1538c003.e770a","c46d93f8.1fe18"]]},{"id":"71da85fd.de44fc","type":"api-call-service","z":"daf25abf.0203b8","name":"turn off demo mode","server":"","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"input_select.holiday_lights_demo_mode","data":"{\\"option\\": \\"off\\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":378,"y":608,"wires":[[]]},{"id":"320d2444.2aa86c","type":"server-state-changed","z":"daf25abf.0203b8","name":"Holiday Lights turned off?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.holiday_lights","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":140,"y":608,"wires":[["71da85fd.de44fc"],[]]},{"id":"7f2dc75.a04cf38","type":"function","z":"daf25abf.0203b8","name":"get next effect","func":"const states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst entityId = flow.get(\\"wledHolidayLightsEntityId\\");\\nconst effects = states[entityId].attributes.effect_list;\\nconst activeEffect = states[entityId].attributes.effect;\\nlet index = effects.findIndex(ele => ele === activeEffect);\\nindex = (index === -1 || index >= effects.length - 1) ? 0 : index + 1;\\n\\nnode.status({text: effects[index]});\\n\\nmsg.effect = msg.name = effects[index];\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":560,"wires":[["9755a99c.54ba18"]]},{"id":"29bbe4ad.4de71c","type":"function","z":"daf25abf.0203b8","name":"get next preset","func":"const states = global.get(\\"homeassistant\\").homeAssistant.states;\\nconst entityId = flow.get(\\"wledHolidayLightsEntityId\\");\\nconst { idLookup, nameLookup } = flow.get(\\"wledHolidayLightsPresets\\");\\nconst keys = Object.keys(idLookup);\\nconst activePreset = states[entityId].attributes.preset;\\nlet index = keys.findIndex(ele => ele == activePreset);\\nindex = index === -1 || index >= keys.length - 1 ? 0 : index +1;\\nconst name = idLookup[keys[index]];\\n\\nnode.status({text: name });\\n\\nmsg.preset = keys[index];\\nmsg.name = name;\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":512,"wires":[["422a9fe2.d974c"]]},{"id":"d89db901.9fd588","type":"function","z":"daf25abf.0203b8","name":"process data","func":"if(msg.statusCode !== 200) {\\n    node.status({fill: 'red', shape: 'dot', text: `Status Code: ${msg.statusCode}`})\\n    return;\\n}\\n\\nconst wledPresets = msg.payload;\\nconst idLookup = {};\\nconst nameLookup = {};\\n\\nfor(const key in wledPresets) {\\n    if(Object.keys(wledPresets[key]).length > 0) {\\n        const name = wledPresets[key].n;\\n        idLookup[key] = name;\\n        nameLookup[name] = key;\\n    }\\n}\\n\\nconst presets = {\\n    idLookup,\\n    nameLookup,\\n    names: Object.values(idLookup).sort()\\n};\\n\\nflow.set(\\"wledHolidayLightsPresets\\", presets);\\nflow.set(\\"wledHolidayLightsEntityId\\", msg.entityId);\\nnode.status({text: `${presets.names.length} Presets Processed`});\\n\\nmsg.payload = presets.names;\\n\\nreturn [msg, { payload: \\"disable\\" }];","outputs":2,"noerr":0,"initialize":"","finalize":"","x":470,"y":128,"wires":[["6a3ef206.84c5fc"],["539eea44.9b6524"]]},{"id":"d7d3f0e8.9971d","type":"change","z":"daf25abf.0203b8","name":"enable","rules":[{"t":"set","p":"payload","pt":"msg","to":"enable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":962,"y":128,"wires":[["7c6317af.370198"]]},{"id":"539eea44.9b6524","type":"trigger-state","z":"daf25abf.0203b8","name":"Preset Selector","server":"","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"input_select.holiday_lights_presets","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is_not","comparatorValueDatatype":"prevEntity","comparatorValue":"state","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":480,"y":176,"wires":[["78b7479f.e79dd8"],[]]},{"id":"e132c6fa.e3da18","type":"ha-entity","z":"daf25abf.0203b8","name":"current demo","server":"","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Holiday Lights Demo Current"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"name","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":886,"y":560,"wires":[[]]},{"id":"a3f0ee9.6fd551","type":"server-events","z":"daf25abf.0203b8","name":"HA Client Events","server":"","event_type":"home_assistant_client","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":112,"y":176,"wires":[["6c13e445.ca929c"]]},{"id":"6c13e445.ca929c","type":"function","z":"daf25abf.0203b8","name":"HA running?","func":"if(msg.payload !== \\"running\\") return;\\n\\nconst { names } = flow.get(\\"wledHolidayLightsPresets\\");\\n\\nmsg.payload = names;\\n\\nreturn [msg, { payload: \\"disable\\" }];","outputs":2,"noerr":0,"initialize":"","finalize":"","x":278,"y":176,"wires":[["6a3ef206.84c5fc"],["539eea44.9b6524"]]},{"id":"afc3f7e9.88ac98","type":"comment","z":"daf25abf.0203b8","name":"Setup","info":"","x":82,"y":32,"wires":[]},{"id":"5b75e78b.d9d608","type":"comment","z":"daf25abf.0203b8","name":"Scheduler","info":"","x":92,"y":224,"wires":[]},{"id":"cc0fc459.d7f3a8","type":"link out","z":"daf25abf.0203b8","name":"turn on holiday lights","links":["d830a00d.1d744"],"x":852,"y":176,"wires":[],"l":true},{"id":"d830a00d.1d744","type":"link in","z":"daf25abf.0203b8","name":"Holiday Lights On","links":["cc0fc459.d7f3a8"],"x":527,"y":224,"wires":[["91b62e9f.fe736"]]},{"id":"215b93f8.a1883c","type":"comment","z":"daf25abf.0203b8","name":"Demo Mode","info":"","x":102,"y":416,"wires":[]},{"id":"4b308915.771578","type":"http request","z":"daf25abf.0203b8","name":"get presets","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://{{WLED_IP}}/presets.json","tls":"","persist":false,"proxy":"","authType":"","x":278,"y":128,"wires":[["d89db901.9fd588"]]},{"id":"7c6317af.370198","type":"delay","z":"daf25abf.0203b8","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1100,"y":128,"wires":[["539eea44.9b6524"]]},{"id":"aea9da7f.af56a8","type":"ha-entity","z":"daf25abf.0203b8","name":"current preset","server":"","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Holiday Lights Current Preset"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":480,"y":368,"wires":[[]]},{"id":"4b02330f.bc08fc","type":"function","z":"daf25abf.0203b8","name":"format","func":"const { idLookup } = flow.get(\\"wledHolidayLightsPresets\\");\\nconst id = msg.data.new_state.attributes.preset || 0;\\nconst presetName = idLookup[id] || \\"none\\";\\n\\nmsg.payload = msg.payload === \\"on\\" ? presetName : \\"none\\";\\n\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":258,"y":368,"wires":[["aea9da7f.af56a8"]]},{"id":"a3f37acd.911a88","type":"server-state-changed","z":"daf25abf.0203b8","name":"Preset Updated","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.holiday_lights","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":112,"y":368,"wires":[["4b02330f.bc08fc"]]},{"id":"dece0bc.3c215f8","type":"debug","z":"daf25abf.0203b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":752,"y":336,"wires":[]},{"id":"c800976d.89af98","type":"change","z":"daf25abf.0203b8","name":"","rules":[{"t":"set","p":"dark","pt":"flow","to":"dark","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":223,"y":272,"wires":[["c46d93f8.1fe18"]],"l":false},{"id":"b1ec00ad.8c8f7","type":"subflow:eb756b3f.d770f8","z":"daf25abf.0203b8","name":"","env":[{"name":"helpers","value":"[{\\"id\\":\\"holiday_lights_demo_mode_delay\\",\\"type\\":\\"input_number\\",\\"name\\":\\"Cycle Delay\\",\\"initial\\":30,\\"min\\":-5,\\"max\\":300,\\"step\\":5,\\"icon\\":\\"mdi:timer-sand\\"},{\\"id\\":\\"holiday_lights_demo_mode\\",\\"type\\":\\"input_select\\",\\"name\\":\\"Mode\\",\\"options\\":[\\"off\\",\\"cycle effects\\",\\"cycle presets\\"],\\"initial\\":\\"off\\",\\"icon\\":\\"mdi:animation\\"},{\\"id\\":\\"holiday_lights_presets\\",\\"type\\":\\"input_select\\",\\"name\\":\\"Presets\\",\\"options\\":[\\"none\\"],\\"icon\\":\\"mdi:animation\\"}]","type":"json"}],"x":346,"y":80,"wires":[]},{"id":"297d2a12.388f86","type":"inject","z":"daf25abf.0203b8","name":"Create HA elements","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":138,"y":80,"wires":[["b1ec00ad.8c8f7"]]}]\n

    Requirements

    Integrations

    The season integration is used to determine the current season and set a WLED preset if no other holiday range is defined.

    The two entity nodes will require the Node-RED custom integration but the flow will function fine without it. The UI just won't have the updated current preset and demo effect displayed.

    Nodes

    Setup

    The flow has been modified so that it should run pretty much out of the box after changing the entity id for the light and IP for the WLED controller.

    1. Setting up WLED variables
    2. Modifing holiday date ranges
    3. Creating Home Assistant entities

    WLED variables

    screenshot of a node that needs to be editted

    Edit the change node, set entity ids here, to edit the Home Assistant entity id of the holiday lights and the select entity for presets. The entity of your WLED light needs to be changed in two places.

    Setting date ranges up

    Holidays can be either a single day or a range of dates. If no holiday is defined for the current day it will default to the season preset WINTER, SPRING, SUMMER, and AUTUMN.

    screenshot of a node that needs to be editted

    In the date ranges node, a lot is going on but the main thing is the switch statement that determines which preset to use.

    The isToday function can take two arguments but only the first one is required which is the start date of the holiday. The second argument is the end date of the holiday. Both of the arguments can take a number in the format of MONTHDAY or a holiday name defined in the getHolidayDate function on line #92.

    Lines 16 - 72

    switch (true) {
    +  // Winter
    +  case isToday(214):
    +    preset = "Valentine";
    +    break;
    +  // President's Day changes every year, Veteran's Day & Flag Day always the same date
    +  case isToday(614): // 6/14 Flag Day
    +  case isToday(1111): // 11/11 Veterans Day
    +  case isToday("President's Day"):
    +  case isToday("Memorial Day"):
    +    preset = "Red, White, and Blue";
    +    break;
    +  case isToday(317):
    +    preset = "St Patty";
    +    break;
    +  case isToday("Easter"):
    +    preset = "Easter";
    +    break;
    +  // Spring
    +  case isToday(504):
    +    preset = "Starwars";
    +    break;
    +  case isToday(505):
    +    preset = "Cinco de Mayo";
    +    break;
    +  // Summer
    +  case isToday(704):
    +    preset = "Independence Day";
    +    break;
    +  // Autumn
    +  case isToday(1017, 1031):
    +    preset = "Halloween";
    +    break;
    +  case isToday("Thanksgiving Day"):
    +    preset = "Autumn";
    +    break;
    +  case isToday(1231):
    +    preset = "New Years";
    +    break;
    +  case isToday("Thanksgiving Day", 1231):
    +  case isToday(101, 106):
    +    const activePreset = states[entityId].attributes.preset;
    +    const presetName = idLookup[activePreset];
    +    preset = getRandomPreset(christmasPresets.filter((e) => e !== presetName));
    +    updateInterval = 60;
    +    break;
    +  default:
    +    const seasons = {
    +      winter: "Winter",
    +      spring: "Spring",
    +      summer: "Summer",
    +      autumn: "Autumn",
    +    };
    +    const currentSeason = states["sensor.season"].state;
    +    preset = seasons[currentSeason];
    +    break;
    +}
    +

    Home Assistant Entities

    Three entities will need to be created in Home Assistant two input_select and an input_number. The helpers configuration, Configuration > Helpers, can be used or writing them in YAML.

    input_number.holiday_lights_demo_mode_delay

    input_number:
    +  holiday_lights_demo_mode_delay:
    +    name: Cycle Delay
    +    initial: 30
    +    min: -5
    +    max: 300
    +    step: 5
    +    icon: "mdi:timer-sand"
    +

    screenshot of lovelace ui

    input_select.holiday_lights_demo_mode

    input_select:
    +  holiday_lights_demo_mode:
    +    name: Mode
    +    options:
    +      - off
    +      - cycle effects
    +      - cycle presets
    +    initial: off
    +    icon: "mdi:animation"
    +

    screenshot of lovelace ui

    Lovelace UI

    screenshot of lovelace ui

    title: Holiday Lights
    +type: entities
    +entities:
    +  - entity: light.holiday_lights
    +  - entity: select.holiday_lights_presets
    +  - type: section
    +    label: Demo Mode
    +  - type: conditional
    +    conditions:
    +      - entity: input_select.holiday_lights_demo_mode
    +        state_not: "off"
    +    row:
    +      entity: sensor.holiday_lights_demo_current
    +  - entity: input_select.holiday_lights_demo_mode
    +  - entity: input_number.holiday_lights_demo_mode_delay
    +

    Things that could have been added but never got around to it

    • Previous and Next button in the demo UI
    `,42)]))}const g=n(k,[["render",i],["__file","holiday-lights-scheduler-and-demo-mode-for-wled.html.vue"]]),d=JSON.parse('{"path":"/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html","title":"Holiday lights scheduler and demo mode for WLED","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Version 1","slug":"version-1","link":"#version-1","children":[]},{"level":2,"title":"Requirements","slug":"requirements","link":"#requirements","children":[{"level":3,"title":"Integrations","slug":"integrations","link":"#integrations","children":[]},{"level":3,"title":"Nodes","slug":"nodes","link":"#nodes","children":[]}]},{"level":2,"title":"Setup","slug":"setup","link":"#setup","children":[{"level":3,"title":"WLED variables","slug":"wled-variables","link":"#wled-variables","children":[]},{"level":3,"title":"Setting date ranges up","slug":"setting-date-ranges-up","link":"#setting-date-ranges-up","children":[]},{"level":3,"title":"Home Assistant Entities","slug":"home-assistant-entities","link":"#home-assistant-entities","children":[]}]},{"level":2,"title":"Lovelace UI","slug":"lovelace-ui","link":"#lovelace-ui","children":[]},{"level":2,"title":"Things that could have been added but never got around to it","slug":"things-that-could-have-been-added-but-never-got-around-to-it","link":"#things-that-could-have-been-added-but-never-got-around-to-it","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":8}]},"filePathRelative":"cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.md"}');export{g as comp,d as data}; diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_01-CHAwUUih.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_01-CHAwUUih.png new file mode 100644 index 0000000000..5616a60251 Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_01-CHAwUUih.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_02-DLPVHS6D.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_02-DLPVHS6D.png new file mode 100644 index 0000000000..344fbc2c77 Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_02-DLPVHS6D.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_03-D-JrQP6b.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_03-D-JrQP6b.png new file mode 100644 index 0000000000..e4035c9f73 Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_03-D-JrQP6b.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_05-9II8TJDT.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_05-9II8TJDT.png new file mode 100644 index 0000000000..e978664cc1 Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_05-9II8TJDT.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_06-FMERduQa.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_06-FMERduQa.png new file mode 100644 index 0000000000..57af27765c Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_06-FMERduQa.png differ diff --git a/assets/holiday-lights-scheduler-and-demo-mode-for-wled_08-BKy7okvm.png b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_08-BKy7okvm.png new file mode 100644 index 0000000000..452fd8d585 Binary files /dev/null and b/assets/holiday-lights-scheduler-and-demo-mode-for-wled_08-BKy7okvm.png differ diff --git a/assets/index.html-B93_d2Ov.js b/assets/index.html-B93_d2Ov.js new file mode 100644 index 0000000000..448b3316f8 --- /dev/null +++ b/assets/index.html-B93_d2Ov.js @@ -0,0 +1 @@ +import{_ as a,c as l,a as e,b as o,w as i,d as n,r,o as d}from"./app-CefLgoES.js";const u={},h={id:"action",tabindex:"-1"},f={class:"header-anchor",href:"#action"},c={id:"api",tabindex:"-1"},g={class:"header-anchor",href:"#api"},m={id:"binary-sensor",tabindex:"-1"},p={class:"header-anchor",href:"#binary-sensor"},v={id:"button",tabindex:"-1"},y={class:"header-anchor",href:"#button"},b={id:"calendar",tabindex:"-1"},w={class:"header-anchor",href:"#calendar"},T={id:"current-state",tabindex:"-1"},k={class:"header-anchor",href:"#current-state"},x={id:"device",tabindex:"-1"},A={class:"header-anchor",href:"#device"},_={id:"device-config",tabindex:"-1"},H={class:"header-anchor",href:"#device-config"},E={id:"entity-config",tabindex:"-1"},N={class:"header-anchor",href:"#entity-config"},S={id:"events-all",tabindex:"-1"},D={class:"header-anchor",href:"#events-all"},R={id:"events-state",tabindex:"-1"},C={class:"header-anchor",href:"#events-state"},I={id:"fire-event",tabindex:"-1"},P={class:"header-anchor",href:"#fire-event"},z={id:"get-entities",tabindex:"-1"},B={class:"header-anchor",href:"#get-entities"},U={id:"get-history",tabindex:"-1"},W={class:"header-anchor",href:"#get-history"},G={id:"number",tabindex:"-1"},j={class:"header-anchor",href:"#number"},F={id:"poll-state",tabindex:"-1"},Z={class:"header-anchor",href:"#poll-state"},q={id:"render-template",tabindex:"-1"},L={class:"header-anchor",href:"#render-template"},V={id:"select",tabindex:"-1"},J={class:"header-anchor",href:"#select"},O={id:"sensor",tabindex:"-1"},K={class:"header-anchor",href:"#sensor"},M={id:"sentence",tabindex:"-1"},Q={class:"header-anchor",href:"#sentence"},X={id:"server-config",tabindex:"-1"},Y={class:"header-anchor",href:"#server-config"},$={id:"switch",tabindex:"-1"},ee={class:"header-anchor",href:"#switch"},te={id:"tag",tabindex:"-1"},ne={class:"header-anchor",href:"#tag"},se={id:"text",tabindex:"-1"},oe={class:"header-anchor",href:"#text"},ie={id:"time",tabindex:"-1"},ae={class:"header-anchor",href:"#time"},le={id:"time-entity",tabindex:"-1"},re={class:"header-anchor",href:"#time-entity"},de={id:"trigger-state",tabindex:"-1"},ue={class:"header-anchor",href:"#trigger-state"},he={id:"update-config",tabindex:"-1"},fe={class:"header-anchor",href:"#update-config"},ce={id:"wait-until",tabindex:"-1"},ge={class:"header-anchor",href:"#wait-until"},me={id:"webhook",tabindex:"-1"},pe={class:"header-anchor",href:"#webhook"},ve={id:"zone",tabindex:"-1"},ye={class:"header-anchor",href:"#zone"};function be(we,t){const s=r("RouteLink");return d(),l("div",null,[t[31]||(t[31]=e("h1",{id:"nodes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#nodes"},[e("span",null,"Nodes")])],-1)),e("h2",h,[e("a",f,[e("span",null,[o(s,{to:"/node/action.html"},{default:i(()=>t[0]||(t[0]=[n("Action")])),_:1})])])]),t[32]||(t[32]=e("p",null,[n("This node allows you to send a request to Home Assistant to perform specific actions. These actions could include tasks such as turning on a light ("),e("code",null,"light.turn_on"),n("), selecting an option from a dropdown menu ("),e("code",null,"input_select.select_option"),n("), or any other service call supported by Home Assistant. It serves as a bridge between Node-RED and Home Assistant, enabling automation flows to directly control devices or entities in your smart home setup.")],-1)),e("h2",c,[e("a",g,[e("span",null,[o(s,{to:"/node/API.html"},{default:i(()=>t[1]||(t[1]=[n("API")])),_:1})])])]),t[33]||(t[33]=e("p",null,"The API node provides access to all points of the Home Assistant WebSocket and HTTP API. This enables you to interact programmatically with Home Assistant, sending and receiving data through these protocols. It’s a powerful tool for integrating third-party systems, custom automations, or advanced control within Node-RED, offering full access to Home Assistant's core functionalities.",-1)),e("h2",m,[e("a",p,[e("span",null,[o(s,{to:"/node/binary-sensor.html"},{default:i(()=>t[2]||(t[2]=[n("Binary Sensor")])),_:1})])])]),t[34]||(t[34]=e("p",null,'This node allows you to create a binary sensor entity within Home Assistant that can be controlled directly from Node-RED. A binary sensor is a type of entity that has only two possible states: typically "on" or "off". It can represent various real-world conditions, such as whether a door is open or closed, or if motion is detected.',-1)),e("h2",v,[e("a",y,[e("span",null,[o(s,{to:"/node/button.html"},{default:i(()=>t[3]||(t[3]=[n("Button")])),_:1})])])]),t[35]||(t[35]=e("p",null,"The Button node creates a button entity within Home Assistant that, when pressed, triggers a flow in Node-RED. This is useful for manual triggers within automations, allowing users to start an automation sequence directly from the Home Assistant interface with a simple click.",-1)),e("h2",b,[e("a",w,[e("span",null,[o(s,{to:"/node/events-calendar.html"},{default:i(()=>t[4]||(t[4]=[n("Calendar")])),_:1})])])]),t[36]||(t[36]=e("p",null,"The Calendar node listens for events from Home Assistant's calendar integration. It triggers a flow in Node-RED when a calendar event starts or ends, allowing you to automate actions based on your calendar schedule.",-1)),e("h2",T,[e("a",k,[e("span",null,[o(s,{to:"/node/current-state.html"},{default:i(()=>t[5]||(t[5]=[n("Current State")])),_:1})])])]),t[37]||(t[37]=e("p",null,"This node is used to fetch the last known state of any entity within Home Assistant when it receives an input. It’s useful for making decisions based on the current status of entities, such as checking if a light is already on before turning it off, or determining the temperature reading before adjusting the thermostat.",-1)),e("h2",x,[e("a",A,[e("span",null,[o(s,{to:"/node/device.html"},{default:i(()=>t[6]||(t[6]=[n("Device")])),_:1})])])]),t[38]||(t[38]=e("p",null,"The Device node enables you to create device automations and call device actions within Home Assistant. This node interacts with devices connected to your Home Assistant instance, allowing you to perform tasks such as turning devices on or off, changing settings, or triggering specific device-related actions.",-1)),e("h2",_,[e("a",H,[e("span",null,[o(s,{to:"/node/device-config.html"},{default:i(()=>t[7]||(t[7]=[n("Device Config")])),_:1})])])]),t[39]||(t[39]=e("p",null,"The Device Config node is used for configuring devices that have been added to Home Assistant. It allows you to set up and manage device-specific settings and options within Node-RED, ensuring that your automations can correctly interact with your devices.",-1)),e("h2",E,[e("a",N,[e("span",null,[o(s,{to:"/node/entity-config.html"},{default:i(()=>t[8]||(t[8]=[n("Entity Config")])),_:1})])])]),t[40]||(t[40]=e("p",null,"The Entity Config node provides configuration options for the different entity type nodes within Node-RED. It’s used to set up and manage the properties and settings for entities, ensuring they behave as expected within your automations and Home Assistant environment.",-1)),e("h2",S,[e("a",D,[e("span",null,[o(s,{to:"/node/events-all.html"},{default:i(()=>t[9]||(t[9]=[n("Events: all")])),_:1})])])]),t[41]||(t[41]=e("p",null,"This node listens for all types of events from Home Assistant, with the ability to filter by event type. It’s a powerful tool for triggering automations based on specific events occurring within Home Assistant, such as state changes, sensor readings, or user interactions.",-1)),e("h2",R,[e("a",C,[e("span",null,[o(s,{to:"/node/events-state.html"},{default:i(()=>t[10]||(t[10]=[n("Events: state")])),_:1})])])]),t[42]||(t[42]=e("p",null,"The Events: State node listens for state changes of entities within Home Assistant. It triggers a flow in Node-RED whenever an entity's state changes, allowing you to automate responses to various conditions, like turning on lights when motion is detected or sending a notification when a door is opened.",-1)),e("h2",I,[e("a",P,[e("span",null,[o(s,{to:"/node/fire-event.html"},{default:i(()=>t[11]||(t[11]=[n("Fire Event")])),_:1})])])]),t[43]||(t[43]=e("p",null,"The Fire Event node allows you to fire an event on the Home Assistant event bus. This can be used to trigger automations or notify other parts of the system about specific occurrences. It’s a way to programmatically generate events that other nodes or systems can listen to and react upon.",-1)),e("h2",z,[e("a",B,[e("span",null,[o(s,{to:"/node/get-entities.html"},{default:i(()=>t[12]||(t[12]=[n("Get Entities")])),_:1})])])]),t[44]||(t[44]=e("p",null,"The Get Entities node retrieves entities based on specific search criteria, with three different output options. This node is useful for filtering and finding entities that match certain conditions, such as all lights that are currently on, or sensors reporting a specific range of values.",-1)),e("h2",U,[e("a",W,[e("span",null,[o(s,{to:"/node/get-history.html"},{default:i(()=>t[13]||(t[13]=[n("Get History")])),_:1})])])]),t[45]||(t[45]=e("p",null,"The Get History node fetches the history of Home Assistant entities based on input criteria. This can be used to analyze past states or events, such as tracking temperature changes over time or reviewing when a door was last opened. It’s useful for creating more complex automations based on historical data.",-1)),e("h2",G,[e("a",j,[e("span",null,[o(s,{to:"/node/number.html"},{default:i(()=>t[14]||(t[14]=[n("Number")])),_:1})])])]),t[46]||(t[46]=e("p",null,"The Number node creates a number entity in Home Assistant that can be manipulated from within Node-RED. This entity type is typically used to represent numeric values that can be adjusted, such as a thermostat setting or a brightness level for lights.",-1)),e("h2",F,[e("a",Z,[e("span",null,[o(s,{to:"/node/poll-state.html"},{default:i(()=>t[15]||(t[15]=[n("Poll State")])),_:1})])])]),t[47]||(t[47]=e("p",null,"The Poll State node outputs the state of an entity at regular intervals. It can also be configured to trigger at startup and whenever the entity changes state, if desired. This node is useful for regularly checking the status of an entity, ensuring your automations stay up to date with the latest information.",-1)),e("h2",q,[e("a",L,[e("span",null,[o(s,{to:"/node/render-template.html"},{default:i(()=>t[16]||(t[16]=[n("Render Template")])),_:1})])])]),t[48]||(t[48]=e("p",null,"The Render Template node allows you to render templates based on input data. Templates in Home Assistant are powerful tools for dynamically generating text or values based on the state of entities or other variables. This node sends the template to Home Assistant for rendering and outputs the result.",-1)),e("h2",V,[e("a",J,[e("span",null,[o(s,{to:"/node/select.html"},{default:i(()=>t[17]||(t[17]=[n("Select")])),_:1})])])]),t[49]||(t[49]=e("p",null,"The Select node creates a select entity in Home Assistant that can be manipulated from Node-RED. This type of entity typically represents a dropdown menu or a list of options from which the user can choose, and it can be used to control or adjust settings within your automations.",-1)),e("h2",O,[e("a",K,[e("span",null,[o(s,{to:"/node/sensor.html"},{default:i(()=>t[18]||(t[18]=[n("Sensor")])),_:1})])])]),t[50]||(t[50]=e("p",null,"The Sensor node creates a sensor entity within Home Assistant that is controlled from Node-RED. Sensors are entities that report data from various sources, such as temperature, humidity, or motion detection. This node allows you to create and manage such sensors directly from your Node-RED flows.",-1)),e("h2",M,[e("a",Q,[e("span",null,[o(s,{to:"/node/sentence.html"},{default:i(()=>t[19]||(t[19]=[n("Sentence")])),_:1})])])]),t[51]||(t[51]=e("p",null,"The Sentence node triggers when the Home Assistant Assist feature matches a sentence from a voice assistant using the default conversation agent. This node is used for voice control integrations, allowing specific voice commands to trigger automations within Node-RED.",-1)),e("h2",X,[e("a",Y,[e("span",null,[o(s,{to:"/node/config-server.html"},{default:i(()=>t[20]||(t[20]=[n("Server Config")])),_:1})])])]),t[52]||(t[52]=e("p",null,"The Server Config node is used for configuring the connection to Home Assistant. This node manages the details of how Node-RED communicates with your Home Assistant instance, including server URL, authentication, and other connection settings.",-1)),e("h2",$,[e("a",ee,[e("span",null,[o(s,{to:"/node/switch.html"},{default:i(()=>t[21]||(t[21]=[n("Switch")])),_:1})])])]),t[53]||(t[53]=e("p",null,"The Switch node creates a switch entity within Home Assistant that can be controlled from Node-RED. This node also allows a flow to be started from a service call, making it a versatile tool for both controlling devices and triggering automations.",-1)),e("h2",te,[e("a",ne,[e("span",null,[o(s,{to:"/node/tag.html"},{default:i(()=>t[22]||(t[22]=[n("Tag")])),_:1})])])]),t[54]||(t[54]=e("p",null,"The Tag node outputs data when Home Assistant receives a tag scanned event for a configured tag ID. This node is useful for creating automations based on NFC tags or other scannable identifiers, allowing specific actions to be triggered when a tag is scanned.",-1)),e("h2",se,[e("a",oe,[e("span",null,[o(s,{to:"/node/text.html"},{default:i(()=>t[23]||(t[23]=[n("Text")])),_:1})])])]),t[55]||(t[55]=e("p",null,"The Text node creates a text entity within Home Assistant that can be manipulated from Node-RED. Text entities are used to store and display text values, and this node allows you to dynamically update and control these values within your automations.",-1)),e("h2",ie,[e("a",ae,[e("span",null,[o(s,{to:"/node/time.html"},{default:i(()=>t[24]||(t[24]=[n("Time")])),_:1})])])]),t[56]||(t[56]=e("p",null,"The Time node can be scheduled to trigger at a specific future date and time, based on a Home Assistant entity. This node is useful for creating time-based automations, such as triggering a notification or alarm at a specific hour.",-1)),e("h2",le,[e("a",re,[e("span",null,[o(s,{to:"/node/time-entity.html"},{default:i(()=>t[25]||(t[25]=[n("Time Entity")])),_:1})])])]),t[57]||(t[57]=e("p",null,"The Time Entity node creates a time entity within Home Assistant that can be controlled from Node-RED. This entity type is used to represent time values, such as a specific time of day or a duration, and can be used to trigger automations based on time-related conditions.",-1)),e("h2",de,[e("a",ue,[e("span",null,[o(s,{to:"/node/trigger-state.html"},{default:i(()=>t[26]||(t[26]=[n("Trigger: state")])),_:1})])])]),t[58]||(t[58]=e("p",null,"The Trigger: State node functions similarly to the State Changed Node but provides advanced functionality for common automation use cases. This node allows for more complex conditions and actions based on entity state changes, making it a powerful tool for creating detailed and nuanced automations.",-1)),e("h2",he,[e("a",fe,[e("span",null,[o(s,{to:"/node/update-config.html"},{default:i(()=>t[27]||(t[27]=[n("Update Config")])),_:1})])])]),t[59]||(t[59]=e("p",null,"The Update Config node allows you to update the configuration of entities within Home Assistant. This node is used for dynamically adjusting the settings of entities, ensuring they stay in sync with your automation requirements.",-1)),e("h2",ce,[e("a",ge,[e("span",null,[o(s,{to:"/node/wait-until.html"},{default:i(()=>t[28]||(t[28]=[n("Wait Until")])),_:1})])])]),t[60]||(t[60]=e("p",null,"The Wait Until node waits for a specific condition to be met or for a timeout to occur before passing on the last received message. This node is useful for pausing the flow of automation until certain criteria are met, such as waiting for a door to close before turning off the lights.",-1)),e("h2",me,[e("a",pe,[e("span",null,[o(s,{to:"/node/webhook.html"},{default:i(()=>t[29]||(t[29]=[n("Webhook")])),_:1})])])]),t[61]||(t[61]=e("p",null,"The Webhook node outputs data received from a created webhook in Home Assistant. Webhooks are a way to receive data or trigger automations from external sources, and this node allows you to integrate those triggers into your Node-RED flows.",-1)),e("h2",ve,[e("a",ye,[e("span",null,[o(s,{to:"/node/zone.html"},{default:i(()=>t[30]||(t[30]=[n("Zone")])),_:1})])])]),t[62]||(t[62]=e("p",null,"The Zone node outputs data when a configured entity enters or leaves one of the defined zones in Home Assistant. Zones are geographical areas you define in Home Assistant, and this node can trigger automations based on whether entities (like phones or trackers) enter or exit these zones.",-1))])}const ke=a(u,[["render",be],["__file","index.html.vue"]]),xe=JSON.parse('{"path":"/node/","title":"Nodes","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Action","slug":"action","link":"#action","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[]},{"level":2,"title":"Binary Sensor","slug":"binary-sensor","link":"#binary-sensor","children":[]},{"level":2,"title":"Button","slug":"button","link":"#button","children":[]},{"level":2,"title":"Calendar","slug":"calendar","link":"#calendar","children":[]},{"level":2,"title":"Current State","slug":"current-state","link":"#current-state","children":[]},{"level":2,"title":"Device","slug":"device","link":"#device","children":[]},{"level":2,"title":"Device Config","slug":"device-config","link":"#device-config","children":[]},{"level":2,"title":"Entity Config","slug":"entity-config","link":"#entity-config","children":[]},{"level":2,"title":"Events: all","slug":"events-all","link":"#events-all","children":[]},{"level":2,"title":"Events: state","slug":"events-state","link":"#events-state","children":[]},{"level":2,"title":"Fire Event","slug":"fire-event","link":"#fire-event","children":[]},{"level":2,"title":"Get Entities","slug":"get-entities","link":"#get-entities","children":[]},{"level":2,"title":"Get History","slug":"get-history","link":"#get-history","children":[]},{"level":2,"title":"Number","slug":"number","link":"#number","children":[]},{"level":2,"title":"Poll State","slug":"poll-state","link":"#poll-state","children":[]},{"level":2,"title":"Render Template","slug":"render-template","link":"#render-template","children":[]},{"level":2,"title":"Select","slug":"select","link":"#select","children":[]},{"level":2,"title":"Sensor","slug":"sensor","link":"#sensor","children":[]},{"level":2,"title":"Sentence","slug":"sentence","link":"#sentence","children":[]},{"level":2,"title":"Server Config","slug":"server-config","link":"#server-config","children":[]},{"level":2,"title":"Switch","slug":"switch","link":"#switch","children":[]},{"level":2,"title":"Tag","slug":"tag","link":"#tag","children":[]},{"level":2,"title":"Text","slug":"text","link":"#text","children":[]},{"level":2,"title":"Time","slug":"time","link":"#time","children":[]},{"level":2,"title":"Time Entity","slug":"time-entity","link":"#time-entity","children":[]},{"level":2,"title":"Trigger: state","slug":"trigger-state","link":"#trigger-state","children":[]},{"level":2,"title":"Update Config","slug":"update-config","link":"#update-config","children":[]},{"level":2,"title":"Wait Until","slug":"wait-until","link":"#wait-until","children":[]},{"level":2,"title":"Webhook","slug":"webhook","link":"#webhook","children":[]},{"level":2,"title":"Zone","slug":"zone","link":"#zone","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"node/index.md"}');export{ke as comp,xe as data}; diff --git a/assets/index.html-BHJtTjPi.js b/assets/index.html-BHJtTjPi.js new file mode 100644 index 0000000000..9a7af50c79 --- /dev/null +++ b/assets/index.html-BHJtTjPi.js @@ -0,0 +1 @@ +import{_ as o,c as t,e as s,b as a,o as n,r as l}from"./app-CefLgoES.js";const i={};function c(d,e){const r=l("scrubber");return n(),t("div",null,[e[0]||(e[0]=s('

    Scrubber Tool

    The Scrubber tool cleans up your exported flow by removing specific references and properties, making it more shareable and user-friendly.

    Key Features

    • User-Friendly Export: Simplifies your exported flow, making it easier for others to use.
    • Server Reference Removal: Eliminates all references to the Home Assistant server.
    • Location Data Cleanup: Clears lat, lon, latitude, and longitude properties from all nodes.
    ',4)),a(r)])}const p=o(i,[["render",c],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/scrubber/","title":"Scrubber Tool","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Key Features","slug":"key-features","link":"#key-features","children":[]}],"git":{"updatedTime":1723695934000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"scrubber/index.md"}');export{p as comp,m as data}; diff --git a/assets/index.html-BZB1rhDi.js b/assets/index.html-BZB1rhDi.js new file mode 100644 index 0000000000..7215a940dc --- /dev/null +++ b/assets/index.html-BZB1rhDi.js @@ -0,0 +1 @@ +import{_ as s,c as a,a as t,d as l,b as e,w as i,r,o as d}from"./app-CefLgoES.js";const u="/node-red-contrib-home-assistant-websocket/assets/index_import_screenshot-B6IPVgb8.png",m={};function k(f,o){const n=r("RouteLink");return d(),a("div",null,[o[21]||(o[21]=t("h1",{id:"cookbook",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#cookbook"},[t("span",null,"Cookbook")])],-1)),o[22]||(o[22]=t("p",null,"Here is a collection of beginner to advanced flows and explanations to help you further educate yourself in the world of Home Automation with Node-RED.",-1)),t("ul",null,[t("li",null,[o[7]||(o[7]=l("JSONata Examples ")),t("ul",null,[t("li",null,[e(n,{to:"/cookbook/jsonata/action.html"},{default:i(()=>o[0]||(o[0]=[l("Action node")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/change-node.html"},{default:i(()=>o[1]||(o[1]=[l("Change Node")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/events-state.html"},{default:i(()=>o[2]||(o[2]=[l("Events: state node")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/functions.html"},{default:i(()=>o[3]||(o[3]=[l("Functions")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/sensor.html"},{default:i(()=>o[4]||(o[4]=[l("Sensor Node")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/switch-node.html"},{default:i(()=>o[5]||(o[5]=[l("Switch Node")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/jsonata/trigger-state.html"},{default:i(()=>o[6]||(o[6]=[l("Trigger state node")])),_:1})])])]),t("li",null,[e(n,{to:"/cookbook/motion-triggered-light.html"},{default:i(()=>o[8]||(o[8]=[l("Motion Triggered Light")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/saving-and-restoring-states.html"},{default:i(()=>o[9]||(o[9]=[l("Saving and Restoring States")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/get-state_changed-events-based-on-area.html"},{default:i(()=>o[10]||(o[10]=[l("Get state_changed Events Based on Area")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/sun-events.html"},{default:i(()=>o[11]||(o[11]=[l("Turn Light On/Off with Sunset/Sunrise")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/vacation-mode.html"},{default:i(()=>o[12]||(o[12]=[l("Vacation Mode")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/expiration-date-monitor.html"},{default:i(()=>o[13]||(o[13]=[l("Expiration Date Monitor")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/using-date-and-time-entities-to-trigger-flows.html"},{default:i(()=>o[14]||(o[14]=[l("Using date and time entities to trigger flows")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html"},{default:i(()=>o[15]||(o[15]=[l("Check if an entity was a certain state in the last 24 hours")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/starting-flow-after-home-assistant-restart.html"},{default:i(()=>o[16]||(o[16]=[l("Starting flow after Home Assistant restart")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html"},{default:i(()=>o[17]||(o[17]=[l("Holiday lights scheduler and demo mode for WLED")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/actionable-notifications-subflow-for-android.html"},{default:i(()=>o[18]||(o[18]=[l("Actionable Notifications Subflow for Android")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/events-by-label.html"},{default:i(()=>o[19]||(o[19]=[l("Events by Label")])),_:1})]),t("li",null,[e(n,{to:"/cookbook/play-jellyfin-show-using-sentence-node.html"},{default:i(()=>o[20]||(o[20]=[l("Play Jellyfin Show using the Sentence Node")])),_:1})])]),o[23]||(o[23]=t("p",null,"All JSON exports are also available under the examples tab in the Node-RED import menu.",-1)),o[24]||(o[24]=t("p",null,[t("img",{src:u,alt:"screenshot"})],-1)),o[25]||(o[25]=t("p",null,[t("strong",null,"Also see:")],-1)),o[26]||(o[26]=t("ul",null,[t("li",null,[t("a",{href:"https://nodered.org/docs/user-guide/editor/workspace/import-export",target:"_blank",rel:"noopener noreferrer"},"Importing and Exporting Flows")])],-1))])}const g=s(m,[["render",k],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/cookbook/","title":"Cookbook","lang":"en-US","frontmatter":{},"headers":[],"git":{"updatedTime":1726728365000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/index.md"}');export{g as comp,p as data}; diff --git a/assets/index.html-D06ojgm6.js b/assets/index.html-D06ojgm6.js new file mode 100644 index 0000000000..38417e49a8 --- /dev/null +++ b/assets/index.html-D06ojgm6.js @@ -0,0 +1 @@ +import{_ as l,c as r,e as i,a as e,b as o,w as a,r as d,o as u,d as s}from"./app-CefLgoES.js";const p={};function h(c,t){const n=d("RouteLink");return u(),r("div",null,[t[16]||(t[16]=i('

    JSONata

    JSONata is a functional declarative language, designed to work with JSON objects. It is built-in within Node-RED and is available in standard nodes where you see the J: expression option, for example in the Inject Node.

    • JSONata code is written as a line expression, which is evaluated and returns the result.
    • The expression is evaluated against a JSON object. In Node-RED this JSON is the top level message object. There is no need to use a leading 'msg.' therefore just payload will evaluate as the message payload value, and topic as the topic value.

    Warning

    JSONata is very different to Mustache templates, and the use of {{msg.payload}} will not work as you might expect.

    In the Home Assistant nodes, JSONata can be used to set entity states, set output property values, generate UI parameters, or as conditional tests (both generating the test value, and as an evaluated predicate expression).

    Examples of using JSONata in the Home Assistant Nodes:

    ',6)),e("ol",null,[e("li",null,[o(n,{to:"/cookbook/jsonata/action.html"},{default:a(()=>t[0]||(t[0]=[s("Call a service using JSONata to build the data object")])),_:1}),t[1]||(t[1]=e("ul",null,[e("li",null,"Increase light brightness with remote"),e("li",null,"Set A/C target temperature and hvac mode"),e("li",null,"Send 'lights on' notification when leaving home"),e("li",null,"Extract weather forecast details from call return")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/current-state.html"},{default:a(()=>t[2]||(t[2]=[s("Read the current state or attribute value of an entity")])),_:1}),t[3]||(t[3]=e("ul",null,[e("li",null,"Report difference between A/C current and target temperatures"),e("li",null,"Report if A/C been cooling for more than 2 hours before 17:00"),e("li",null,"Report if A/C unit is running outside of 'office hours'")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/events-state.html"},{default:a(()=>t[4]||(t[4]=[s("Listen for entity state or attribute changes")])),_:1}),t[5]||(t[5]=e("ul",null,[e("li",null,"Motion detection start, and motion ending only before 08:30 and after 17:30"),e("li",null,"Switch just turned off, and has been on for less than three minutes"),e("li",null,"Motion detection only before dawn and after dusk, with dusk and dawn times output")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/trigger-state.html"},{default:a(()=>t[6]||(t[6]=[s("Trigger a flow from state change conditions")])),_:1}),t[7]||(t[7]=e("ul",null,[e("li",null,"Every minute before and after sunset"),e("li",null,"Automation events just before, at, and just after sunset"),e("li",null,"Adjust light brightness from 0 to 100 percent over sunset")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/sensor.html"},{default:a(()=>t[8]||(t[8]=[s("Write state and attribute values to an HA sensor")])),_:1}),t[9]||(t[9]=e("ul",null,[e("li",null,"Provide a sensor with a count of the number of lights that are on"),e("li",null,"Provide an attribute array (list) of the lights that are on"),e("li",null,"Since I last looked, list which lights have been turned on, or off")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/switch-node.html"},{default:a(()=>t[10]||(t[10]=[s("Route flow (switch node) based on computed outcomes")])),_:1}),t[11]||(t[11]=e("ul",null,[e("li",null,"Select flow routing depending on state 'last changed ms' period in minutes")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/change-node.html"},{default:a(()=>t[12]||(t[12]=[s("Read state history and process the return JSON (change node)")])),_:1}),t[13]||(t[13]=e("ul",null,[e("li",null,"Calculate when, and for how long, I have not been at home in the past week")],-1))]),e("li",null,[o(n,{to:"/cookbook/jsonata/functions.html"},{default:a(()=>t[14]||(t[14]=[s("Using the additional $entity() functions in JSONata")])),_:1}),t[15]||(t[15]=e("ul",null,[e("li",null,"Reading node entity states and attributes"),e("li",null,"Reading all Home Assistant entities"),e("li",null,"Reading Areas, Devices, and their Entities")],-1))])]),t[17]||(t[17]=i('

    Home Assistant functions

    There are several additional Home Assistant functions added for use in JSONata expressions, and these can only be used within the Home Assistant nodes.

    • $entity() returns the entity that triggered the node

    • $prevEntity() returns the previous state entity if the node is an event node

    • $areaDevices(areaId) returns all devices associated with a specific area ID.

    • $areaEntities(areaId) returns all entities associated with a specific area ID.

    • $areas(lookup) returns an area based on a provided lookup value, or all areas if no lookup value is provided. The lookup value can be an area ID, an entity ID, or a device ID.

    • $deviceEntities(device_id) returns all entities associated with a specific device.

    • $device(lookup) returns a device based on a provided lookup value. The lookup value can be an entity ID or a device name.

    • $entities() returns all entities in the cache

    • $entities(entity_id) returns a single entity from cache matching the given entity_id

    Exposed Lodash functions

    • $sampleSize(collection, [n=1]) https://lodash.com/docs/#sampleSize

      Gets n random elements at unique keys from collection up to the size of collection.

    • $randomNumber([lower=0], [upper=1], [floating]) https://lodash.com/docs/#random

      Produces a random number between the inclusive lower and upper bounds. If only one argument is provided a number between 0 and the given number is returned. If floating is true, or either lower or upper are floats, a floating-point number is returned instead of an integer.

    Also see:

    ',7))])}const f=l(p,[["render",h],["__file","index.html.vue"]]),g=JSON.parse('{"path":"/guide/jsonata/","title":"JSONata","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Examples of using JSONata in the Home Assistant Nodes:","slug":"examples-of-using-jsonata-in-the-home-assistant-nodes","link":"#examples-of-using-jsonata-in-the-home-assistant-nodes","children":[]},{"level":2,"title":"Home Assistant functions","slug":"home-assistant-functions","link":"#home-assistant-functions","children":[]},{"level":2,"title":"Exposed Lodash functions","slug":"exposed-lodash-functions","link":"#exposed-lodash-functions","children":[]}],"git":{"updatedTime":1724305054000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/jsonata/index.md"}');export{f as comp,g as data}; diff --git a/assets/index.html-DM7m0Nlu.js b/assets/index.html-DM7m0Nlu.js new file mode 100644 index 0000000000..439747e108 --- /dev/null +++ b/assets/index.html-DM7m0Nlu.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as s}from"./app-CefLgoES.js";const i={};function o(a,n){return s(),t("div")}const l=e(i,[["render",o],["__file","index.html.vue"]]),c=JSON.parse(`{"path":"/","title":"","lang":"en-US","frontmatter":{"home":true,"heroImage":null,"heroText":"Home Assistant nodes for Node-RED","tagline":"A suite of nodes that seamlessly integrates Home Assistant with Node-RED.","actions":[{"text":"Get Started","link":"/guide/","type":"primary"},{"text":"Nodes","link":"/node/","type":"secondary"}],"features":[{"title":"Seamless Integration","details":"Easily connect Home Assistant entities and services with Node-RED flows."},{"title":"Real-time Interaction","details":"Trigger Node-RED workflows based on Home Assistant events, states, and services."},{"title":"Custom Automation","details":"Build custom automations using a visual interface, combining Home Assistant's capabilities with Node-RED's powerful logic nodes."}]},"headers":[],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"index.md"}`);export{l as comp,c as data}; diff --git a/assets/index.html-DTYPDoQS.js b/assets/index.html-DTYPDoQS.js new file mode 100644 index 0000000000..16742210a6 --- /dev/null +++ b/assets/index.html-DTYPDoQS.js @@ -0,0 +1 @@ +import{_ as t,c as n,e as i,o as a}from"./app-CefLgoES.js";const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAABrCAYAAAAb3qc1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAgGSURBVHhe7d3BixvnGQfg/mGBJIfgSyCX7CGEQHKK8y/s5hD2kIChUHyM91DINZccvOhgl7bUNyPWbA6h7KGHQuoNrkmMsFOr+apPGq1GI438rbXdnXn3eeCFyDOaGfkd3p++sbP+XQKAQAQbAKEINgBCEWwAhCLYAAhFsAEQimADIBTBBkAogg2AUAQbAKEIto777cmT9OL27TT69NP0yxtvKKVU+Bp98kl6/uWXafz999UkPB/B1mH/OTxMv9y4sbbxSil1HerFN99UE7GcYOuo//74Y/r57bfXNloppa5TjYfDajKWEWwd9fMXX6xtsFJKXbf698cfV5OxjGDrqH+9995SY//y4YfpD7u7aX9/XymlwtbvP/88fXvz5tL8e/rmm9VkLCPYOqre1Fz3vvsuPX36tNoKENOzZ8/S0dHRygw8D8HWUc2mPn/+vNoCEF9zBp6HYOuobZoK0HfbzEDB1lHbNBWg77aZgYKto0qbOhqN0snJSRoOh+nhw4dKKdWryrMrz7A8y+pKZ+A6gq2jSpqab4R8U5yenqbxeFz9KkB/5NmVZ1ieZfVwK5mBbQRbR5U0NX/LyTcEQN/lWZZn2lzJDGwj2DqqpKn5G46VGhBBnmV5ps2VzMA2gq2jSpqan08DRFGfaSUzsI1g66iSpgo2IBLBFlxJUwUbEIlgC66kqYINiESwBVfSVMEGRCLYgitpqmADIhFswZU0VbABkVxSsD1Og92dtLOzrg7ScbVX0/GdyfY7bVu38/hwL+3sDiZXNnE6SHs7e2kQ8P9RLmmqYAMiudRgO3hUvewAwbYg2IBIuhNsOVwmQTPIq7S8kpus1FZWbI8OllZ79ePlffcOB+mgZftkj9q2vXRwZ32wra4SZ9e+dzjdc9n0fQdpkENyfuz5MSvT452dd1K1Y8+u+bi2mq1dQ7X/8nkbK9/GudYpaapgAyLpVrA1BvlSyExDrfbYsrHKmoXB4vV0RXa2/yzUzo5dnWvtim3teVoel86PcxZWy+eZXlM9fKpgnv8+NK95Hmhn17l0LasBu/T706KkqYINiORSg+1spXFWi6HeDKpsMbjXB+M0vKrBvjLkN4XVRPujyFk4zc9VP8eKjde8zvKxV/Zduc68f+0zrKzQattblDRVsAGRdGzF1hYSs0BYDcZJVcGwKdiWQmyuHhSNc+dj1VddrdddGGyz1ePimjcG29J1LoKreYxFLZ+/qaSpgg2IpFfBtun9KyGxRbAttuXztjyGzF4RbIswmh9j+XOcO9ian6FASVMFGxBJT4Jt9v76ny81bQq2aWAUP4rMqkA5nLyvfsymgmte/syvH2zrPkOJkqYKNiCSngTbxHSw17cvh93GYGvsO9s22b812KrjvWKVWBJsizCeva4f81zBNn9/c/9XhF1JUwUbEEl/gm2i+edM9RXc5mDLZqul2Xurv6K/IdiKVkivuubp9vk58+dfDqfzBVtW/wy5Xr2CK2mqYAMiuaRg66EcMvXQ6amSpgo2IBLB1iKvpjauMHuipKmCDYhEsDXNHx8GWK1lJU0VbEAkgi24kqYKNiASwRZcSVMFGxCJYAuupKmCDYhEsAVX0lTBBkQi2IIraapgAyIRbMGVNFWwAZEItuBKmjocDtN4PK5eAfRXnmV5ps2VzMA2gq2jSpp6cnKSTk/rP08MoJ/yLMszba5kBrYRbB1V0tTRaDT9hpNvCCs3oI/y7MozLM+yPNPmSmZgG8HWUaVNzTdC/paTb4r8fFoppfpUeXblGVYPtax0Bq4j2Dpqm6YC9N02M1CwddQ2TQXou21moGDrqJWm/vprtQUgvpUZeA6CraN+euutpaa+ePCg2gIQ229PnizNv1znIdg66tH77680VimlrmP948aNajKWEWwd9eevvlrbYKWUum71t88+qyZjGcHWUT/88EN68MEHa5uslFLXpf7+7rvpr/fuVZOxjGDrsLt376Zvb95M/3znnbUNV0qpqJX/nsGfPvoo/fHrr9PLly+rqVhGsHXc0dFRun37dtrf31dKqWtTt27dSvfv3z93qGWCDYBQBBsAoQg2AEIRbD3nhyArpfpcbT8EeRuCrcfyjZBvCv9sDdBXbf9szTYEW4/lbzn5hgDouzzL8ky7CIKtx/I3HCs1III8y/JMuwiCrcfy82mAKC5qpgm2HhNsQCSCDcEGhCLYEGxAKIINwQaEItgQbEAogg3BBoRyScH2OA12d9Le4ePqNV0i2IBIBBuCDQjlCoPtOB3s7KSded05rn49m+2/dtvpIO3tHKTB4d5i++5g8g5el2ADIrmiYNv0ugq1szBrvJ4GW337LCCtBl+fYAMiuZpge3QwWWkdTCJpjXXbpmG2lwb55/TW/7tyfKcedJyXYAMiuZJge5wfI7Y8Ply/La/KBNv/i2ADIhFsCDYglCsJNo8iu0WwAZFcTbCtvK6H02zbIqgarwXbhRNsQCRXFGxZ46/7Lz1+rMJsvq0eWoLtwgk2IJJLCja6TLABkQg2BBsQimBDsAGhCDYEGxCKYEOwAaEINgQbEIpgQ7ABoQg2BBsQimBDsAGhCDbScDhM4/G4egXQX3mW5Zl2EQRbj52cnKTT09rPKAPoqTzL8ky7CIKtx0aj0fQbTr4hrNyAPsqzK8+wPMvyTLsIgq3n8o2Qv+XkmyI/n1ZKqT5Vnl15hl1UqGWCDYBQBBsAoQg2AEIRbACEItgACEWwARCKYAMgFMEGQCAp/Q+4bDo1V84gbAAAAABJRU5ErkJggg==",r={};function o(A,e){return a(),n("div",null,e[0]||(e[0]=[i('

    Getting Started

    Installation

    To install this custom integration, you can use HACS or follow the manual installation instructions provided in the README.

    Tip

    When configuring an entity in Node-RED, consider filling in the "friendly name" field before your first deployment. This will create the entity with the specified entity_id. If left blank, it will default to sensor.nodered_<node id>, where <node id> is a unique identifier assigned by Node-RED. The entity_id can be changed later in Home Assistant.

    Tip Image

    ',6)]))}const l=t(r,[["render",o],["__file","index.html.vue"]]),g=JSON.parse('{"path":"/guide/custom_integration/","title":"Getting Started","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Installation","slug":"installation","link":"#installation","children":[]},{"level":2,"title":"Tip","slug":"tip","link":"#tip","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/custom_integration/index.md"}');export{l as comp,g as data}; diff --git a/assets/index.html-wDz1CEsG.js b/assets/index.html-wDz1CEsG.js new file mode 100644 index 0000000000..fbba185acb --- /dev/null +++ b/assets/index.html-wDz1CEsG.js @@ -0,0 +1,4 @@ +import{_ as a,c as o,e as n,a as i,d as t,b as r,w as l,r as c,o as A}from"./app-CefLgoES.js";const d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAABbCAYAAAABbZArAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA6uSURBVHhe7Z3xbxzFFcf7h6ECQSikBQQBV+UiZEUECSIgKHGK2B8wIiENBckWpC45CawgLNVRjGMVKg6ZhoZUgSqCCJ9wTJMSJFuJXYgbHBwbF17nzc7czs7N7e3d7dq+2e9Hekpud252b3f9Pn7jud1fEAAAAOAhEBwAAAAvgeAAAAB4CQQHAADASyA4D1hdXaW5uTmqVqt07tw5BAKB8DY4z3G+47zXDAiuy+GTPD09LU/48vKyWgoAAH7CeY7zHee9ZpKD4LocPtEcAABQJNLkPgiuy+FyHZUbAKBocN7j/JcEBNfl8Jg0AAAUkWb5D4LrciA4AEBRgeA8B4IDABQVCM5zIDgAQFGB4DwHggMAFBUIznMgOABAUelQcPNUCUrU09MTRamXguHPaVG1ABsLBAcAKCodCq5KZZbarn46Uj5C/bsi0e36wxmhvzSwJMV7gkp9+2pZ9FUWWwHtAsEBAIpKJoLrezdU03wliCq51JJTghPtg4rVGoLrmOQTPE9nJ47T8Ymz9edpepKOH5+kafUSAAC6jdwquPSSCwVXLrPMAoo5zhbcfIWCWP9me94X8bpqtJFVodrHuvYC2b9eJ/bBQ5OmEtzx4zRx1jpLEBwAoMvpXHClSBCNIllySnBCLtWyaG8OVZqCU3KLJGQPbSqR2a8Nqcn+dQdOeVoC9IA0gpucZJlNUMxxtuDmz9KEECHLMAyz/TRN8utpo42sCnm5q71A9q/XiX2ASQEAGdOh4IhmhnfVRJYUjSUXCU5LqTZU2WSIUg6JWkIzq7CY0BjuT7Y3txkh+7MXdjmpBCfkMj2ppaQwBafkFknIHtpUIrNfG1KT/esOnPK0BAgAAB3SseCIFunTgZSSE/Kof3iBJRspNVVJOQWnKzMVTQQX+7teTXBWH2YUVHBaSrWhyiZDlPNnJ+qEZlZhMaEx3J9sb24zQvZnLwQAgA7IQHBMOsmlEpygNlQZE1wkJS2tNBVckuA8c5mT9IITSKmpSsopOHPIUUQTwcX+rlcTnNWHGRAcACBDMhIckyy5dEOUmlBAQcCzMpXganKKaF9w4TZj6zylJcEJakOVMcFFUtLSSlPBJQkOLgMA5E2GgmPckks7ySSGrN74/YbgzOFKvb4twan/xyaV+Cm9VgWnZTUxIQSmBVeTU0T7ggu3GVsHAAA5kLHgmLjkUn9NwBacQA5VGlILX6tgUcUk1aLgBPb39nys6FoXnEBWb1yxGYIzhyv1+rYEp/4fm1QC6QEAsicHwTFCckf6qG+gmdxA3rQlOIEcqjSkFr5WwaKKSapFwQlkBaj7EwG5AdACq6u0dvq0egEakZPgwGah2QkGAHQfy4OD9P0tt9Dyk0/S/6qO4S8ggeA8B4IDwC9+/u47+u9tt0nB6bjZ308/XbmiWgANBOc5EBwAfvH9/v0xuem4fvvttPr66/Tz0pJqCSA4z4HgAPCLk8PDdO7BB52Sk3HPPbQ6OqpaFxsIznMgOAD8YklUaGNjY1Teu5em773XLTkRN3bsKPxEFAjOcyA4APxkdnaWjh07RiNPPEGzd97plByHnIjy1VfqXcUCgvMcCA4Av7lw4QL9cWCA/vLII/Qfa/KJGTwRhSeoFAkIznMgOAD8Z21tjT755BMafPFF+vuOHU7BydiypVATUSA4z6lWq7S8vKxeAQB85ubNm1SpVGgwCOjz7dvdkuPgiSjj4+pdfsJ5j/NfEhBclzM3NycDAFAcFhcXaXR0lN58+mm6tG2bW3Ii5EQUUfn5SJrcB8F1OaurqzQ9PS1PNCo5AIrF5cuX6ejRo/Tn3bvpypYtTslx+DQRhfMc5zvOe5z/koDgPIBPMp9wLtd5TBqBQBQr+H6vvxPV3Nj27bRw661OyXHM7ttH50+dcvbRKM5/8IFz+UYF5znOd83kxkBwAADgATwR5aOPPqIjBw7QPx56yCk4GaLSW3njjdQTUb5//PGunbQCwQEAgEfwF8Xfe+89+tP+/TR1331uyXGknIhydds2WurtlU846DYgOAAA8JCrV6/SyMgIHXvqKbq8datbciJ+2LkzcSLKv9RszR/27u06yUFwAADgMRcvXqShoSEaf/TR5Iko+/Y5J6L8u6cnavPcc2ppdwDBAQBAAeAJGkdeeok+6O2la7/8ZUxuZqy88krsjiim4PT6bgGCAwCAgsBfFOeJKIP9/clPLFATUXhI0hYch1zXBUBwAABQMPQTC3giStITC5bEuoUGN3ruhjulQHAAAFBQeCJKmicWNIofJydVT5sTCA4AAAoOP7Hg1VdfbfrEAjv4KeOb+VZgEBwAAACJ+cSCpIkoZrDkNuttwCA4AAAANW5ev04XnnnGKbOGsXUr/XT5suph8wDBAQAAkKydPk1LpZJbYk3i+vbt9NOVK6qnzQEE5wE/XrtGCyfH6WLwLH25sxeBQCBaiku//Q1928YkEzsW7r+fPvv447obJOcRU1NTTW+4DMF1OSy3rw8eoIXxd2hlblYtBQCAdPDfz77ds4fm7r7bKa1WY73uW8nPxGPJJQHBdTlcubHcAACgHfirAvzwVL6d16Hnn5cPUeXZlGfuuoum77jDKbFmsV73reRKLgkIrsvhYUlUbgCALOBH7vBDVHk25YnhN+n3v/4VvfDCC1QWwjrx2GP0t4cfll8MTzPDcj3uWwnBeQ6PnwMAQB7o/DI7O0vnz5+nDz/8UH4x/NChQzQYBPRaqSTvbcmP5XF9UTzv+1ZCcJ4DwQEA8iIpv/DfwPh2X3xvS34sD39R/CVRtfEQ51937pT3urzywAO53rcSgvMcCA4AkBfN8ostGL6ZMw9xnjlzRsrv6NGjUoB5AcF5DgQHAMiLVgW33kBwngPBAQDyokCCu0GzZ96mg3t6qdTTQz09Jerdc5CGT30t1oCNAoIDAORFMQR3Y4aG+0pCakJspV7avXu3jN4Si66HSn3DNNPEctVy2LYWQYXm1TrQPhAcACAvCiC4eaoELLcSBeMztKiWhizSzHggK7pSgrCk3MpV9SokFF6Z4ktBq0BwAIC8WB/BLdGld4fo8OEBGv1iSS1LR8eCWzzVLyuuPeONv0w8O75Htuk/FddfSJXKYp3lN0H98vlKEFZ3MgKq1IzJbctU0euDE3Qi6KEgaiBhaUbLwv5r/Rkb4u0ElUptff2+dQ9tC65alp/dPoZO5isUxM5HHHneUJED4B3rIbibM2M0cPiwEBxHa5LrUHCLonoTEigN0Kfqris3Zt6mPh6aLPXR23pccvVTGuBlIsnVK44rwHBdUgKsS5IyAesKT8nKklS8T26jk7Atz3AfdDIPRdo4YXcT7QkuPB7lsnmME4DgACgk+Qpuib4ce40GRj6jb/75liG5UfpStWhGh4JTYqklrxka7hWveRlH77BYwiiJNUyWVjUlIl41mXKKiCoyW1gCO+myENV+yoRrl2Wyfbh/PiXktgRXOxaO46ow/2YaCBHGBWeez0CIMuF4qm3Vqm8Ou62qJnXo/ak7Tw7R8n669j9sG/VpV6rhLzl6vaNPUeGH799Pg/vr31/E0QLQ/fT3hyNyZvCyRuQnuFBuLw+N0mj5ZUNyA/TmqfS3HtwkgjOIJR7V3kpGZjQUnNqmTjJmwjGTczwgOEZ+fnUw5bGysq5cVjs++txqCYTnopbc9blrdDz1+to2rPfHKnWBbK+2Jf8frdNSinaX+3Jdc/b1En9dd/6tfQivH2u7sc/H/cWPR7St+HUZ7nNcoABsFNVqVf4MmcHLGpGP4LTcxujkWwOqajscSu7qt6pNOjoUXBZDlI0wEoGZ1JzYSSQkSjxmwlEJym5sUJ+wupfWBWcdy7pj7zjWZhtbSILE4+k4t9H5Ca8B53l1rOf3yWHVaEGD8+y+XkLi14qG+479gmS+2f4MvF31eaN9NZDtw2Pk07UG/MCs4pKqNyZ7wbnlxn97a6Vy03QouAwmmTgSoiZKJEkJiWmwXieeSpRwwsXJScWnpNOy4IzkHBKvOGrHNHZwIik4j11dnwaJggvPq/5hi4U62ZF4uK24jrg/tS1e1+iakftp9SWR+2Nsx4iGgrOOUbRPqq2jL33NQ3Bgs2FWcUnVG5Ot4LKVG9Ox4MIf7vBrAn3DVatCW6TqcF+TrwmEyaHuh9xKfGFCMkVoSq2B4HTffLJiK8P2taQtMBONT0mnNcEZx6su1LHfAMHVn1cD3XdNbPwZuD/+1/2LUwz5C1b4GeX14Px8ceoFZ37u6FgwrrYmPl1rwB+4cmtWvTHZCU5NKBkYoqHXspEbk4HgBHl80dtR1dltorzROBHKBOJaJxOZ0Z+RZAoruEbJXR2r8Bg6jrX5PimM+LlLPJ6ObUZSCIVr/iJSD+9POEnFrJrkJBDXBdGAuKDc15LGKS39OQo8WgD8gSu3ZtUbk53gvqCRwyP0Ga3RN+/zd946lxuTjeAkuFXXZqQVwSUlWzOpx9vpqk9LypKSkmPDJJ4oOPnC6Juxpae3H0lJ7l+ipGyJxfsM399otMDavxrRfsTXhe81JW0ev6RjDsBmJ1vBCakNvU9X1y7RSVHFdSo3JkPBgc1IK4KzE3EMSzQyyXMy58Qvp8ybEgqTerhefQWgXcEJtLB02PtYJyRHn3UYQ5MyLGGZn4/DXO0WXLSfdau05HUYx6JOcFYFbK+vaw/ABpK54DKq3DQQnOe0IjgAAGiF7ASXDxCc50BwAIC8gODAhgLBAQDyAoIDGwoEBwDICwgObCgQHAAgLyA4sKFAcACAvIDgwIYCwQEA8gKCAxsKBAcAyAsIDmwoF4NnaWUumy9NAgCAhvMK55ckIDiQKwsnx2lh/B31CgAAsiFNboHgQK78eO0afX3wgLwYUckBADqF8wjnE84rnF+SmJqaosXF9E8BzRLeLm8/CQjOA/gi5N+0eDiBx8wRCASi3eA8wvmkmdyYlZUVKRmupNY7eLu8/SQgOAAAAF4CwQEAAPASCA4AAICXQHAAAAC8BIIDAADgJRAcAAAAL4HgAAAAeAjR/wFApNLoYF88mgAAAABJRU5ErkJggg==",g="/node-red-contrib-home-assistant-websocket/assets/getting-started_03-B4ue_ZcX.png",p="/node-red-contrib-home-assistant-websocket/assets/getting_started_02-7mfV03T6.png",h="/node-red-contrib-home-assistant-websocket/assets/generate-token_01-DB9TrXpw.png",u="/node-red-contrib-home-assistant-websocket/assets/generate-token_02-k2eQmSik.png",m={};function k(f,e){const s=c("RouteLink");return A(),o("div",null,[e[3]||(e[3]=n(`

    Getting Started

    Prerequisites

    Ensure you have Node-RED installed and running. If not, follow the installation guide.

    Installation

    Using the Palette Manager

    1. Open the Palette Manager in Node-RED.
    2. Search for node-red-contrib-home-assistant-websocket.
    3. Install the package.

    Using npm from the Command Line

    $ cd ~/.node-red
    +$ npm install node-red-contrib-home-assistant-websocket
    +# Restart Node-RED
    +

    Home Assistant Add-on

    `,10)),i("p",null,[e[1]||(e[1]=t("The Community Home Assistant add-on includes this set of nodes pre-installed and pre-configured for connection to Home Assistant. You can start building your ")),r(s,{to:"/guide/first-automation.html"},{default:l(()=>e[0]||(e[0]=[t("first automation")])),_:1}),e[2]||(e[2]=t(" immediately."))]),e[4]||(e[4]=n('

    Find the add-on here: Home Assistant Add-on.

    Configuration

    1. Add an Events: all node to your workspace and open its settings.

    2. Click the pencil icon next to the Server field.

      screenshot

    3. Locate your local Home Assistant instance or manually enter the Base URL.

      screenshot

    4. Enter an Access Token in the server configuration, then save the settings and deploy the changes.

    After deploying, you should see a green status box below the Events: all node, indicating connection (e.g., "connected" or "state_changed"). If the box is open and shows "connecting" or "disconnected," double-check the Base URL or access token.

    • Base URL: The web address and port for accessing the Home Assistant frontend (e.g., http://localhost:8123, http://192.168.x.x, or http://example.duckdns.org).
    • Access Token: Generated in Home Assistant. See the instructions below for creating one.

    Tips

    • To prevent reloading all flows on deployment, change the deploy type to Modified Flows or Modified Nodes. This only reloads the flows you've modified.

      screenshot

    • If new entities aren't appearing in the autocomplete results, try unchecking Cache Autocomplete Results in the server configuration and restart Node-RED.

    Generate Access Token

    WARNING

    The user creating the access token must belong to the administrator group for this package to function correctly.

    1. Go to your Home Assistant home page. In the bottom left corner, click on the blue circle with your initial (e.g., "J").

      screenshot

    2. Scroll to the bottom of the page and click Create Token.

    3. Name the token for easy identification.

    4. Copy the generated access token into Node-RED.

      screenshot

    Additional Tips

    • Creating a separate Home Assistant user for Node-RED allows you to track which entities were modified by Node-RED.
    • After configuring the WebSocket connection using the Events: all node, consider removing it for better performance. Instead, use specific nodes like Events: state or Trigger: state, or apply an event filter to avoid overloading the WebSocket message queue.
    ',12))])}const w=a(m,[["render",k],["__file","index.html.vue"]]),b=JSON.parse('{"path":"/guide/","title":"Getting Started","lang":"en-US","frontmatter":{"sidebarDepth":2},"headers":[{"level":2,"title":"Prerequisites","slug":"prerequisites","link":"#prerequisites","children":[]},{"level":2,"title":"Installation","slug":"installation","link":"#installation","children":[{"level":3,"title":"Using the Palette Manager","slug":"using-the-palette-manager","link":"#using-the-palette-manager","children":[]},{"level":3,"title":"Using npm from the Command Line","slug":"using-npm-from-the-command-line","link":"#using-npm-from-the-command-line","children":[]},{"level":3,"title":"Home Assistant Add-on","slug":"home-assistant-add-on","link":"#home-assistant-add-on","children":[]}]},{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Tips","slug":"tips","link":"#tips","children":[]},{"level":3,"title":"Generate Access Token","slug":"generate-access-token","link":"#generate-access-token","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/index.md"}');export{w as comp,b as data}; diff --git a/assets/index_import_screenshot-B6IPVgb8.png b/assets/index_import_screenshot-B6IPVgb8.png new file mode 100644 index 0000000000..29875d3abd Binary files /dev/null and b/assets/index_import_screenshot-B6IPVgb8.png differ diff --git a/assets/jsonata-primer.html-DvrDlwTO.js b/assets/jsonata-primer.html-DvrDlwTO.js new file mode 100644 index 0000000000..61517a40a2 --- /dev/null +++ b/assets/jsonata-primer.html-DvrDlwTO.js @@ -0,0 +1,13 @@ +import{_ as t,c as a,e as o,o as n}from"./app-CefLgoES.js";const r={};function i(s,e){return n(),a("div",null,e[0]||(e[0]=[o(`

    JSONata primer

    This is a simple introduction highlighting the key aspects of this language. Full details can be found at the online JSONata documentation

    JSONata code can be written as either a single line expression, or as multiple line expressions in a code block ( ). Expressions are evaluated against a _JSON object. In Node-RED this object is the node input message.

    A single line expression is evaluated left to right by operator, and the result returned is the final evaluation.

    • Everything in JSONata is an expression and will be evaluated, returning the result
    • Literals are evaluated as themselves, but must be valid JSON (number, string, Boolean, null, array or object)
    • Object keys (fields) are evaluated as the key value, where found, thus payload will return the value contained in msg.payload
    • The primary use of JSONata is to evaluate a JSON path, such as msg.payload.foo.bar
    • Path operators are evaluated in a line expression by being applied to the top level message
      • . is the mapping (iteration) operator
      • [ ] is the filter (selection) operator
      • { } is the reduce (aggregation) operator
      • ^( ) is the sorting (ordering) operator

    Context: At the start of a line expression, the context is the entire top level message. Each path operator takes input from the current context, with the final result of each operation passed as output context to the next operator. Available context therefore changes as the evaluation proceeds. The current context at a specific point can be referred to using $. An additional operator $$ can be used to refer to the top level context at any point, and % can be used to refer to the parent context (back one level) but only where this is possible to determine.

    The mapping (iteration) operator .

    Syntax can be considered as <sequence-list> . <expression>.

    The current input-context on the left hand side of the operator is parsed as a sequence or ordered list of items (for an array this is a list of the array elements, for an object or for a primitive this is usually a singleton list). Each item in this list is taken in sequence as the evaluation-context, and evaluated by the expression formed from the right hand side of the operator. The result sequence is then collated into an output array (from an input list) or returned as a singleton (from an input singleton, or where the input sequence reduces to a singleton).

    As an example, $type(payload) returns the type of the message payload, however payload.$type($) returns an array of the type of each element within payload. For an array of numbers, this would be ["number", "number", "number"]. The right hand side, $type() is a JSONata function requiring a parameter. For many functions one or more parameters are optional, and where omitted they take the current (evaluation) context $ instead. In this case, the parameter is not optional, hence the use of $ for the immediate context (each array element in turn).

    Index operator #: Applied with the mapping operator, the # index operator can be used to capture the iteration index value for use later in the expression. The operator must be followed by a variable, for example $i, and this variable is made available for the remaining line expression. If payload is an array of three items, then payload#$i.($i+2) would return [2, 3, 4]. The use of () here is required since JSONata is left-associative and the parentheses are required to force the correct order of evaluation.

    Wildcards and array flattening: Within a path expression, * can be used to select all fields in an object, and ** is a descendant wildcard for any depth of nesting. Thus payload.**.time would return an array of the values of all nested time keys.

    The path expression may generate an array of arrays for the evaluation sequence list. In this case, the list will always first be flattened to just one array. This flattening also occurs for output when the result is an arrays of arrays.

    If payload is an array of objects then payload.$keys() returns an array, listing the keys names for each array object. For an array of nested objects, payload.**.$keys() returns a flattened array of all keys. To remove duplicates, the $distinct() function can be used, thus $distinct(payload.**.$keys()) returns an array of every key in message payload to any depth.

    The filter (selection) operator [ ]

    The [ ] operator has several applications.

    • If the operator encloses an integer, this acts as array index addressing, where payload[0] returns the first item in the array, [-1] the last item. Note that the index can be an integer, or any number expression that returns or rounds down to an integer.
    • If the operator encloses an array of integers, these act as a selection list, thus payload[0, -1] returns the first and last items from payload array.
    • Otherwise, where the operator encloses a predicate expression, this will map over the current context as a list, filtering only the list items where the predicate evaluates as true. For example payload[time<"12:00"] where time is a key value within payload object.
    • For the special range operator [a..b], such as [0..3] this syntax generates an array of integers between the two given integer values. Note that, as in all cases in JSONata, the defining integer values can be either literals, or expressions that evaluate to an integer. To generate an array of integers to be used as a filter requires [[a..b]].
    • Lastly, this operator acts as an array constructor. ["one", "two", "three"] is an array. The simple form [] may also be used at any point in a line expression to force singleton output to an array, as in payload.data[].

    JSONata does not inherently regard singleton values as fundamentally different to arrays. Although a singleton is a value without enclosing structure, path expressions that require an array input can accept a singleton, which is treated as an array of one item. In some situations, particularly with path input or output list flattening, it may be necessary to add an additional [] to the expression to ensure correct evaluation, and where an array of arrays is required in the result.

    No result means nothing is returned: One of the more unusual aspects of JSONata is the behaviour when an expression evaluates to no discernible result. Simply put, JSONata will neither return a value, nor null nor an error message where there is no result from an expression. Mistyping paylaod or requesting an array index payload[100] for an array of only 25 items will return nothing. This can make writing, testing and debugging JSONata code challenging, but it eliminates the need to code for exception conditions - declare what you want, and nothing else will be returned.

    The filter operator binds more strongly than the mapping operator. This means that payload.array[0] is returned as an array of the first items in each payload.array and not the first item in the payload.array array result. Use (payload.array)[0] to force evaluation in a different order.

    The reduce (aggregation) operator { }

    This operator can only be used once in an expression line, and should ideally be at the very end. Note that { } is a valid empty object, and {"key": "value"} is a one-field object as expected. Both the key as well as the value can be any expression, thus{last_updated: payload.state} will generate a valid object as long as last_updated results in a string value. Naturally values may be an valid JSON type, including objects and arrays.

    It is worth noting that in a key-value pair where the value is an expression that returns nothing, the key-value pair will not be returned in the result.

    Thus {"key": "value", "result": [1, 2][4]} will just return {"key": "value"}

    The order-by (sort) operator ^( )

    Applies to arrays, and will sort the array by one or more expressions, where the expression results in either a string or an number. Sorting is ascending < by default, but can be modified to descending >. Where payload is an array of objects, then payload^(>field, second) will sort the array, by the field value, in descending order, and for equal values, additionally by the second field in ascending order. To sort an array of primitives such as strings, use the context variable $. If payload is an object, $keys(payload)^($) returns an array of the object keys sorted into alphabetic order.

    Other Operators

    JSONata is built on JavaScript, so much of the syntax and basic functions will be familiar. The usual mathematical operators apply.

    Comparison operators are as expected, and also the in inclusion operator where "b" in ["a", "b", "c"] returns true.

    Boolean operators are the usual and and or, but not is provided as a function $not().

    String concatenation operator is &, which provides the only situation where type is cast. Numbers, Boolean, arrays and objects are all stringified as required. Hence payload & "" will turn an object to a stringified equivalent.

    Conditional testing is a ternary operator, syntax as <test expression> ? <true expression> : <false expression> which returns the result of either the true or false expression. False expression is optional, and if omitted a false test expression result will return nothing. Nested conditionals evaluate as expected although the use of parentheses can help visual clarity or to change order.

    Variables

    JSONata permits the use of variables, although some care needs to be exercised in their use. Variables are named as $name and assigned using $name:= <expression>. Scope is from first declaration when assigned, and lasts for the enclosing line, code block ( ), or nested blocks.

    Variables in JSONata are not values held in memory-allocated space but rather bindings. In effect this means that variables can only be assigned, then referred to. Once assigned, further references to the variable are replaced at evaluation with the originally evaluated value at assignment. In practice, this means that

    • The left hand side of := assignment can only be a variable $name, and therefore-
    • Variables cannot be modified, only re-assigned
    • The value of an assignment is the value assigned, thus $a:=3 returns 3

    Variable use should be avoided in single line expressions and only used in code blocks. Whilst expression lines are evaluated in order of the operators, left to right, JSONata execution is asynchronous and different parts of the expression may be prepared in any order. Any later reference to a variable in an expression may be evaluated prior to an earlier assignment in the same line. It also worth noting that, all variable and object field references are evaluated at the very start of statement execution. Nothing done during the expression execution can reliably update or change these values. For example: [$a:=3 .. $b:=6].{"result": $a:=$a+$b, "next": $a} may or may not work as expected.

    Functions

    JSONata has a wide range of inbuilt functions (see documentation) for manipulating:

    • strings
    • numbers
    • aggregation (sum, average)
    • arrays
    • objects
    • time (limited to date-time string <-> Unix millisecond)

    There are also several higher-order functions, such as $map() and $reduce() which apply a mapping function over an array, and similarly with result accumulation.

    Functions can be nested, so that

    $substringAfter($substringBefore("2024-01-10T10:32:14.0324","."),"T") returns just the time part of the string.

    The function chaining operator ~> allows for greater visual clarity

    $substringBefore("2024-01-10T10:32:14.0324",".") ~> $substringAfter("T").

    This works with the function chain passing the result as context, and subsequent functions permitting an optional parameter to be substituted by this context.

    Additional features: Regex is available in JSONata. The usual regex format /regular_expression/flags applies, and this can be used in the functions $match(), $contains(), $split() and $replace(). In addition, a regex expression can be used as a function.

    $join($entities().*[state = "on" and entity_id ~> /^light|^switch/].attributes.friendly_name, ", ")

    • $entities() returns an object containing all Home Assistant entities, each key being an entity id, and value being an object with details of that entity
    • .* maps over the object matching all keys, therefore returning an array of all entities
    • [] filters out the entities that match the predicate expression, using
      • state = "on" to match all entities with state 'on'
      • entity_id ~> /^light|^switch/ generates a function from the regex expression "match any string containing 'light' or 'switch'". Each entity_id is passed to this function, which
      • returns a Boolean true or false, and
      • when both parts of the predicate expression are true, the entity is selected (otherwise the entity is not returned in the result)
    • the result of this is an array of selected entities
    • the field attributes.friendly_name is picked out, resulting in an array of friendly names for all lights / switches left on
    • then the $join() function joins each item in the array, using ", " as the separator, and returning a string

    Note that the $entities() function is a special function added just to the WebSocket nodes.

    Note that entity id names are made up from a domain (platform / integration) and name, separated by .. This is potentially confusing as the object key becomes person.george. Where object keys contain spaces and special characters, the payload.'person.george' referencing syntax has to be used.

    User defined functions: User functions can be easily defined and assigned to a variable name using the syntax

    $fname:= function(arg){"Result Is " & arg}.

    Once defined the function can be called using $fname(parmValue) from later within the enclosing code block.

    Code blocks

    To breakout from the constraints of just a single line expression, JSONata permits the use of (expression; expression) code blocks. These start and end with ( ) and contain one or more line expressions terminated by ;. The return value of the block is the return of the execution result of the very last line.

    Using code blocks permits a much richer coding experience, allowing the use of variable and function definitions.

    How it works in practice

    The following expression takes an object in payload and re-sorts the object keys alphabetically.

    $keys(payload)^($).{$:$lookup($$.payload,$)}~>$merge()

    This works by

    • using $keys() to obtain an array of key name strings from the object in payload
      • sorting this array alphabetically
    • mapping over the sorted array of keys, creating a new object for each key
    • with the context (each key in the iteration) as the new object key
    • and using $lookup(object, key) to find the value of this key, as the new object value
      • where $$.payload refers back to the $$ top level context to reach payload, and $ the current context (the key in each iteration)
    • thus producing an result array with each new key:object pair (in the new order)
    • and then using $merge() to merge this array of objects back into one object

    The simplicity comes from the power of JSONata to map, filter, sort and aggregate, however compared to most procedural languages it is a new way of thinking. Since the JSON object and variables cannot be modified, there is the question of how to, for example, change just one element in an array. The expression $array[2]:=10 will return an error since the left hand side of assignment can only be a variable and not an expression. To achieve this requires a declaration of the new array, built as follows.

      (
    +    $array:=[1, 2, 3, 4, 5, 6];
    +    $newval:=10;
    +    $index:=2;
    +    $append($array[[0..$index-1]], $newval)~>$append($array[[$index+1..$count($array)]])
    +  )
    +

    Here we declare the result to be the first part of the array up to the new value, the new value, then the remainder of the array. You may note that $count($array) is incorrect being one greater than the end index, however as JSONata does not complain when accessing beyond the array length, this point can be relaxed.

    It is worth noting that it is not necessary to refer to the input JSON document. The following expression generates an array of 24 objects. ([1..24])#$pos.{"index": $, "hour": $formatInteger($pos, "09") & ":00"}

    Declarative functional programming for objects: Given an object in msg.payload, how then do we change just one field value, since payload.field:="new value" is not permitted? The answer is that we have to write a "function" that declares - that is, returns - the result we require, with the idea that JSONata expressions are functions applied to the input JSON object.

    The $spread() function takes a JSON object and returns an array of objects, each with a single key:value pair. The $merge() function reverses this, taking an array of objects and combining back into one object. A particular feature of this function is that, where key values are duplicated, the end result contains only the last such key to be found. Therefore, the approach to take is to spread the object, append the replacement key:value as an object to the end of this array, then to merge the array back together.

     (
    +   $object:={"first": 1, "second": 2, "third": 3};
    +   $replaceKey:= "second";
    +   $replaceVal:= 15;
    +   $spread($object) ~> $append({$replaceKey: $replaceVal}) ~> $merge()
    + )
    +

    Deeply nested objects are much more complex, as the entire tree has to be unpicked and rebuilt in order. Fortunately there is a special function that can perform transformation on an object for us. $object ~> | $ | {"second": 15} |

    Errors and error handling

    JSONata has minimal error management. Errors occur at compile time when editing due to incorrect syntax, and will show as red line box in the UI input field, as well as a red triangle on the node. Common reasons for this are missing:

    • & between string concatenation
    • : in conditional testing, or in object construction
    • ; line terminators

    Errors at run time are mostly limited to passing nothing or an incorrect type as parameter to a function. The $number() function accepts a string and returns a JSON number, but only where the input can be correctly parsed. JSON numbers must only contain numbers throughout. Passing "12,34a" will generate a fatal error, and the entire expression evaluation will be aborted.

    Where functions explicitly require an array, passing singletons will generate an error, and thus the use of [ ] to either construct arrays or cast singletons to an array may be required, for example $append(payload.array, [$additional]). Where necessary the use of $exits() to check for object fields, and the use of $type() can help.

    Writing JSONata code

    JSONata can be directly entered into any node where the UI field entry type is J: expression. The Node-RED editor permits expansion of the simple box using the '...' field at the end of the line. This editor provides more space, the ability to select and insert JSONata functions from a pick list, a formatting option, and a tab for testing. However, this can be limited and the try JSONata website is easier to use.

    If using the JSONata Exerciser website, use a debug node set to output the "complete message", copy this entire object and paste over the left hand side JSON input object (there is a useful formatter option). Test JSONata code can then be written in the top right hand window, and the result appears immediately below. Useful output messages indicate where there is an error in the input JSON, where no result is generated, or where an error has occurred.

    Note that there are special Node-RED functions, $env() is one, that can be tested in the Node-RED editor, but not in try JSONata. The WebSocket functions, such as $entity() cannot be tested in either editor.

    What JSONata cannot do

    JSONata can almost completely replace JavaScript in function nodes. However, the simplicity and power of the declarative language is at the expense of efficiency. Arrays and files with more than, say, 500 elements or lines will require significant CPU processing as to temporarily halt Node-RED and potentially Home Assistant. The main barrier to use is more likely to be the time and effort required to generate code, since it can be challenging to think in terms of a functional declaration, the outcome of which is the required result, rather than the more usual approach of designing and writing an algorithm to prescribe how to obtain the required result.

    Good luck.

    `,82)]))}const c=t(r,[["render",i],["__file","jsonata-primer.html.vue"]]),d=JSON.parse('{"path":"/guide/jsonata/jsonata-primer.html","title":"JSONata primer","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"The mapping (iteration) operator .","slug":"the-mapping-iteration-operator","link":"#the-mapping-iteration-operator","children":[]},{"level":2,"title":"The filter (selection) operator [ ]","slug":"the-filter-selection-operator","link":"#the-filter-selection-operator","children":[]},{"level":2,"title":"The reduce (aggregation) operator { }","slug":"the-reduce-aggregation-operator","link":"#the-reduce-aggregation-operator","children":[]},{"level":2,"title":"The order-by (sort) operator ^( )","slug":"the-order-by-sort-operator","link":"#the-order-by-sort-operator","children":[]},{"level":2,"title":"Other Operators","slug":"other-operators","link":"#other-operators","children":[]},{"level":2,"title":"Variables","slug":"variables","link":"#variables","children":[]},{"level":2,"title":"Functions","slug":"functions","link":"#functions","children":[]},{"level":2,"title":"Code blocks","slug":"code-blocks","link":"#code-blocks","children":[]},{"level":2,"title":"How it works in practice","slug":"how-it-works-in-practice","link":"#how-it-works-in-practice","children":[]},{"level":2,"title":"Errors and error handling","slug":"errors-and-error-handling","link":"#errors-and-error-handling","children":[]},{"level":2,"title":"Writing JSONata code","slug":"writing-jsonata-code","link":"#writing-jsonata-code","children":[]},{"level":2,"title":"What JSONata cannot do","slug":"what-jsonata-cannot-do","link":"#what-jsonata-cannot-do","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/jsonata/jsonata-primer.md"}');export{c as comp,d as data}; diff --git a/assets/jsonata_1_1-BOrSTtQg.png b/assets/jsonata_1_1-BOrSTtQg.png new file mode 100644 index 0000000000..9aff20120e Binary files /dev/null and b/assets/jsonata_1_1-BOrSTtQg.png differ diff --git a/assets/jsonata_2_1-AVzKzbZv.png b/assets/jsonata_2_1-AVzKzbZv.png new file mode 100644 index 0000000000..40584c6f97 Binary files /dev/null and b/assets/jsonata_2_1-AVzKzbZv.png differ diff --git a/assets/jsonata_3_1-DCTS43SR.png b/assets/jsonata_3_1-DCTS43SR.png new file mode 100644 index 0000000000..9e368550a9 Binary files /dev/null and b/assets/jsonata_3_1-DCTS43SR.png differ diff --git a/assets/jsonata_4_1-CfZXdRrw.png b/assets/jsonata_4_1-CfZXdRrw.png new file mode 100644 index 0000000000..3107378176 Binary files /dev/null and b/assets/jsonata_4_1-CfZXdRrw.png differ diff --git a/assets/jsonata_5_1-DmQtZ7mW.png b/assets/jsonata_5_1-DmQtZ7mW.png new file mode 100644 index 0000000000..b3e7127fa7 Binary files /dev/null and b/assets/jsonata_5_1-DmQtZ7mW.png differ diff --git a/assets/jsonata_6_1-Cc8tbBMr.png b/assets/jsonata_6_1-Cc8tbBMr.png new file mode 100644 index 0000000000..8b5872544b Binary files /dev/null and b/assets/jsonata_6_1-Cc8tbBMr.png differ diff --git a/assets/jsonata_6_2-CnhkdrfZ.png b/assets/jsonata_6_2-CnhkdrfZ.png new file mode 100644 index 0000000000..96a1937221 Binary files /dev/null and b/assets/jsonata_6_2-CnhkdrfZ.png differ diff --git a/assets/jsonata_7_1-BgEt8HOI.png b/assets/jsonata_7_1-BgEt8HOI.png new file mode 100644 index 0000000000..d8e3cff86b Binary files /dev/null and b/assets/jsonata_7_1-BgEt8HOI.png differ diff --git a/assets/jsonata_8_1-DHI1CMwN.png b/assets/jsonata_8_1-DHI1CMwN.png new file mode 100644 index 0000000000..dc5bc144e0 Binary files /dev/null and b/assets/jsonata_8_1-DHI1CMwN.png differ diff --git a/assets/jsonata_boolean-BjpZUFYr.png b/assets/jsonata_boolean-BjpZUFYr.png new file mode 100644 index 0000000000..076e13d06a Binary files /dev/null and b/assets/jsonata_boolean-BjpZUFYr.png differ diff --git a/assets/jsonata_boolean_example-DbjCVol3.png b/assets/jsonata_boolean_example-DbjCVol3.png new file mode 100644 index 0000000000..d4c7d9d317 Binary files /dev/null and b/assets/jsonata_boolean_example-DbjCVol3.png differ diff --git a/assets/jsonata_value_example-DJn_j-gH.png b/assets/jsonata_value_example-DJn_j-gH.png new file mode 100644 index 0000000000..c20d793089 Binary files /dev/null and b/assets/jsonata_value_example-DJn_j-gH.png differ diff --git a/assets/migration.html-D6ccKEm6.js b/assets/migration.html-D6ccKEm6.js new file mode 100644 index 0000000000..0eee745f77 --- /dev/null +++ b/assets/migration.html-D6ccKEm6.js @@ -0,0 +1,33 @@ +import{_ as n,c as a,e as t,o}from"./app-CefLgoES.js";const p={};function e(c,s){return o(),a("div",null,s[0]||(s[0]=[t(`

    Migration

    Current-State Node Output

    Unchecking 'Override Topic' and 'Override Payload' doesn't work in node-red-contrib-home-assistant v0.3.2. It always overwrites msg.topic and msg.payload. If you have current-state nodes where you have unchecked the 'Override Payload' with node-red-contrib-home-assistant-websocket it will stop overriding payload and put the state object into msg.data

    Poll-State Node Output

    msg.payload.data moved to msg.data

    msg.payload becomes just the state of the state object msg.payload.data.state => msg.payload

    msg.payload.dateChanged removed

    msg.timeSinceChanged and msg.timeSinceChangedMs moved into msg.data

    node-red-contrib-home-assistant v0.3.2

    {
    +  "topic": "sun.sun",
    +  "payload": {
    +    "timeSinceChanged": "4 hours ago",
    +    "timeSinceChangedMs": 15342567,
    +    "dateChanged": "2018-10-11T14:21:01.004Z",
    +    "data": {
    +      "entity_id": "sun.sun",
    +      "state": "above_horizon",
    +      "attributes": { ... },
    +      "last_changed": "2018-10-11T14:21:01.004183+00:00",
    +      "last_updated": "2018-10-11T18:36:30.002985+00:00",
    +      "context": { ... }
    +    }
    +  },
    +  "_msgid": "345fd403.6e71ec"
    +}
    +

    node-red-contrib-home-assistant-websocket v0.1.1

    {
    +  "topic": "sun.sun",
    +  "payload": "above_horizon",
    +  "data": {
    +    "entity_id": "sun.sun",
    +    "state": "above_horizon",
    +    "timeSinceChanged": "5 hours ago",
    +    "timeSinceChangedMs": 16236433
    +    "attributes": { ... },
    +    "last_changed": "2018-10-11T14:21:01.004183+00:00",
    +    "last_updated": "2018-10-11T18:51:30.002737+00:00",
    +    "context": { ... },
    +  },
    +  "_msgid": "5071255c.ad802c"
    +}
    +
    `,12)]))}const r=n(p,[["render",e],["__file","migration.html.vue"]]),u=JSON.parse('{"path":"/guide/migration.html","title":"Migration","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Current-State Node Output","slug":"current-state-node-output","link":"#current-state-node-output","children":[]},{"level":2,"title":"Poll-State Node Output","slug":"poll-state-node-output","link":"#poll-state-node-output","children":[]}],"git":{"updatedTime":1577699988000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":1}]},"filePathRelative":"guide/migration.md"}');export{r as comp,u as data}; diff --git a/assets/motion-triggered-light.html-DqSmmixp.js b/assets/motion-triggered-light.html-DqSmmixp.js new file mode 100644 index 0000000000..3184b0445b --- /dev/null +++ b/assets/motion-triggered-light.html-DqSmmixp.js @@ -0,0 +1,3 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/motion-triggered-light_01-_ryc2wuv.png",e="/node-red-contrib-home-assistant-websocket/assets/motion-triggered-light_02-Cnf1c8VK.png",u={};function c(r,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Motion Triggered Light

    Example 1

    A motion sensor that always sends an on event when any motion is detected and continues sending an update on each detection. This example turns a light on when motion is detected and waits 5 minutes for no motion and turns off the light.

    screenshot

    [{"id":"20f6aead.8b5d52","type":"server-state-changed","z":"cf5fa59f.b4f528","name":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":224,"y":1560,"wires":[["11c7e80d.388958"]]},{"id":"11c7e80d.388958","type":"trigger","z":"cf5fa59f.b4f528","name":"","op1":"{\\"service\\": \\"turn_on\\"}","op2":"{\\"service\\": \\"turn_off\\"}","op1type":"json","op2type":"json","duration":"5","extend":true,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":460,"y":1560,"wires":[["371465f9.46b39a"]]},{"id":"371465f9.46b39a","type":"api-call-service","z":"cf5fa59f.b4f528","name":"Kitchen Light","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":652,"y":1560,"wires":[[]]}]
    +

    Example 2

    A motion sensor that only sends an on event once then an off event when motion is no longer detected.

    screenshot

    [{"id":"9e2a08f5.4634b8","type":"server-state-changed","z":"ffbd7f06.4a014","name":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":250,"y":1008,"wires":[["6a54b527.806bec"],["c066de8f.8a0e2"]]},{"id":"6a54b527.806bec","type":"api-call-service","z":"ffbd7f06.4a014","name":"Kitchen Light On","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":666,"y":1008,"wires":[[]]},{"id":"c066de8f.8a0e2","type":"ha-wait-until","z":"ffbd7f06.4a014","name":"","outputs":2,"entityId":"sensor.motion","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"5","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":476,"y":1056,"wires":[[],["28f00104.71e9de"]]},{"id":"28f00104.71e9de","type":"api-call-service","z":"ffbd7f06.4a014","name":"Kitchen Light Off","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":656,"y":1056,"wires":[[]]}]
    +
    `,9)]))}const k=n(u,[["render",c],["__file","motion-triggered-light.html.vue"]]),i=JSON.parse('{"path":"/cookbook/motion-triggered-light.html","title":"Motion Triggered Light","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Example 1","slug":"example-1","link":"#example-1","children":[]},{"level":2,"title":"Example 2","slug":"example-2","link":"#example-2","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":3}]},"filePathRelative":"cookbook/motion-triggered-light.md"}');export{k as comp,i as data}; diff --git a/assets/motion-triggered-light_01-_ryc2wuv.png b/assets/motion-triggered-light_01-_ryc2wuv.png new file mode 100644 index 0000000000..9554782e34 Binary files /dev/null and b/assets/motion-triggered-light_01-_ryc2wuv.png differ diff --git a/assets/motion-triggered-light_02-Cnf1c8VK.png b/assets/motion-triggered-light_02-Cnf1c8VK.png new file mode 100644 index 0000000000..41979f8d8e Binary files /dev/null and b/assets/motion-triggered-light_02-Cnf1c8VK.png differ diff --git a/assets/mustache-templates.html-DdYaquw5.js b/assets/mustache-templates.html-DdYaquw5.js new file mode 100644 index 0000000000..6b46f71f12 --- /dev/null +++ b/assets/mustache-templates.html-DdYaquw5.js @@ -0,0 +1 @@ +import{_ as t,c as a,e as o,o as c}from"./app-CefLgoES.js";const s={};function i(n,e){return c(),a("div",null,e[0]||(e[0]=[o('

    Mustache Templates

    When using templates, the top level refers to a property of the message object. For example, msg.payload would be accessed as {{payload}}.

    You can also access flow, global, and states contexts with the following syntax:

    • flow context: {{flow.foobar}}
    • global context: {{global.something}}
    • states context: Use {{entity.domain.entity_id}} to get the state, or drill further down with {{entity.light.kitchen.attributes.friendly_name}}.

    Note:

    • {{entity.light.kitchen}} and {{entity.light.kitchen.state}} are equivalent.

    By default, Mustache will replace certain characters with their HTML escape codes. To prevent this, use triple braces: {{{payload}}}.

    Warning

    Mustache templates are ideal for handling strings. However, if you need to insert a JSON object, consider using a JSONata expression or handling it with a function node and passing it as an input.

    ',8)]))}const d=t(s,[["render",i],["__file","mustache-templates.html.vue"]]),r=JSON.parse('{"path":"/guide/mustache-templates.html","title":"Mustache Templates","lang":"en-US","frontmatter":{},"headers":[],"git":{"updatedTime":1723801933000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"guide/mustache-templates.md"}');export{d as comp,r as data}; diff --git a/assets/number.html-B78yuMPe.js b/assets/number.html-B78yuMPe.js new file mode 100644 index 0000000000..a824424c58 --- /dev/null +++ b/assets/number.html-B78yuMPe.js @@ -0,0 +1,2 @@ +import{_ as k,c as u,e,a as s,d as t,b as a,w as c,r as o,o as i}from"./app-CefLgoES.js";const y="/node-red-contrib-home-assistant-websocket/assets/number_01-DZfG5JQO.png",g={},d={id:"mode",tabindex:"-1"},b={class:"header-anchor",href:"#mode"},m={id:"value",tabindex:"-1"},f={class:"header-anchor",href:"#value"};function v(h,n){const p=o("Badge"),r=o("InfoPanelOnly"),l=o("DocsOnly");return i(),u("div",null,[n[4]||(n[4]=e('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Number

    The Number node creates a number entity in Home Assistant that can be manipulated from within Node-RED. This entity type is typically used to represent numeric values that can be adjusted, such as a thermostat setting or a brightness level for lights.

    Configuration

    ',4)),s("h3",d,[s("a",b,[s("span",null,[n[0]||(n[0]=t("Mode ")),a(p,{text:"required"})])])]),n[5]||(n[5]=s("ul",null,[s("li",null,"Type: 'listen' | 'get' | 'set'")],-1)),n[6]||(n[6]=s("p",null,"The mode of the node",-1)),s("h3",m,[s("a",f,[s("span",null,[n[1]||(n[1]=t("Value ")),a(p,{text:"required"})])])]),n[7]||(n[7]=e('
    • Type: number

    The value of the entity should be updated to

    Inputs

    properties of msg.payload

    value

    • Type: number

    The value of the entity should be updated to

    Outputs

    Value types:

    • value: The value of the entity
    • previous value: The previous value of the entity
    • config: The config properties of the node

    Examples

    ',11)),a(r,null,{default:c(()=>n[2]||(n[2]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/number.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),a(l,null,{default:c(()=>n[3]||(n[3]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cb8c6a0579380b1e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"4"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeToHomeAssistant"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfilter"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number.test_number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfiltertype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"exact"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputinitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haltifstate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_only_on_state_change"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"eventData"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"228"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"304"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a0978f86513bbea9"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a0978f86513bbea9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"event state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.old_state.state & \\" : \\" & payload.new_state.state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"478"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"304"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c7b45a2c6c7215d6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4ddebbdb83b1cef1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"142"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"256"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"085546d04890ecec"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"085546d04890ecec"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"344"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"256"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"35fb409f4909de0e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"146"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"61922b820eb9fd05"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"61922b820eb9fd05"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4ddebbdb83b1cef1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$floor($random() * 1000) + 1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"314"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2021574156db4cfc"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6efeac97ac50f168"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"146"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"160"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2dd5c6c8df7810e4"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dd5c6c8df7810e4"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"number.test_number"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"value\\": $floor($random() * 1000) + 1}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"354"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"160"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2021574156db4cfc"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"474"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"25481fa7cf1f5404"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"142"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"208"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"3ac7d1c0fbbabd14"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3ac7d1c0fbbabd14"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4ddebbdb83b1cef1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$floor($random() * 1000) + 1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"310"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"208"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"697b6ee286987b0d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"697b6ee286987b0d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"531844fd6e8e6b59"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"470"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"208"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4ddebbdb83b1cef1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"number"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test number"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"device_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data_size"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"unit_of_measurement"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GiB"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"min_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"max_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"step_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"box"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),t(` +`),s("span",{class:"line"})])])],-1)])),_:1})])}const T=k(g,[["render",v],["__file","number.html.vue"]]),_=JSON.parse('{"path":"/node/number.html","title":"Number","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Mode","slug":"mode","link":"#mode","children":[]},{"level":3,"title":"Value","slug":"value","link":"#value","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"value","slug":"value-1","link":"#value-1","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/number.md"}');export{T as comp,_ as data}; diff --git a/assets/number_01-DZfG5JQO.png b/assets/number_01-DZfG5JQO.png new file mode 100644 index 0000000000..6368fd7c9b Binary files /dev/null and b/assets/number_01-DZfG5JQO.png differ diff --git a/assets/play-jellyfin-show-using-sentence-node.html-CsvMb0ZJ.js b/assets/play-jellyfin-show-using-sentence-node.html-CsvMb0ZJ.js new file mode 100644 index 0000000000..da1e11aac3 --- /dev/null +++ b/assets/play-jellyfin-show-using-sentence-node.html-CsvMb0ZJ.js @@ -0,0 +1 @@ +import{_ as n,a}from"./play-jellyfin-show-using-sentence-node_03-B3fhig1f.js";import{_ as t,c as p,e as o,o as e}from"./app-CefLgoES.js";const u="/node-red-contrib-home-assistant-websocket/assets/play-jellyfin-show-using-sentence-node_02-Ceucdp-D.png",c="/node-red-contrib-home-assistant-websocket/assets/play-jellyfin-show-using-sentence-node_04-DR4W4k_K.png",r={};function l(k,s){return e(),p("div",null,s[0]||(s[0]=[o('

    Play a Jellyfin Show Using the Sentence Node

    This example demonstrates how to use the Sentence node with Home Assistant's conversation integration to play a show from Jellyfin. The flow utilizes dynamic responses to respond with the selected episode.

    You can trigger the flow with commands like:

    • "Play a random MASH episode"
    • "Play MASH episode"
    • "Play MASH season six, episode twelve"
    • "Play MASH episode 100"

    Flow screenshot

    Flow screenshot

    Flow Configuration

    The flow leverages these nodes:

    Flow screenshot

    [{"id":"13b4618a99045b71","type":"ha-sentence","z":"d728cb91f51ff055","name":"random MASH episode","server":"2dad33ee.42bf5c","version":2,"inputs":0,"outputs":1,"exposeAsEntityConfig":"","mode":"trigger","sentences":["play [a] [random] mash (episode|show)"],"response":"","responseType":"str","triggerResponse":"Something went wrong","triggerResponseType":"dynamic","responseTimeout":"2000","outputProperties":[{"property":"seriesId","propertyType":"msg","value":"3b264a3b9e602ddc9c9a00a343dd5ce2","valueType":"str"},{"property":"deviceId","propertyType":"msg","value":"c76c8695549b5bedfc21f48b0664b8329ed2ebde","valueType":"str"}],"x":124,"y":144,"wires":[["45d8457d15bfa505"]]},{"id":"41a351cf86e6a70e","type":"random-item","z":"d728cb91f51ff055","name":"","input":"mash_episodes","inputType":"flow","output":"payload","outputType":"msg","number":1,"x":502,"y":144,"wires":[["7de8f9a16179ad63"]]},{"id":"04f10897f711e88c","type":"change","z":"d728cb91f51ff055","name":"set item id","rules":[{"t":"set","p":"_itemId","pt":"msg","to":"payload.id","tot":"msg","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":144,"wires":[["a29f9d7e6a746a9e"]]},{"id":"a29f9d7e6a746a9e","type":"openApi-red","z":"d728cb91f51ff055","name":"","configUrlNode":"9435086ff9117a76","apiTag":"Session","keepAuth":true,"operationData":{"id":"GetSessions","hasOperationId":true,"path":"/Sessions","method":"get"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{"controllableByUserId query":{"name":"controllableByUserId","type":"jsonata","value":"$env(\\"userId\\")","in":"query"},"deviceId query":{"name":"deviceId","isActive":true,"type":"msg","value":"deviceId","in":"query"},"activeWithinSeconds query":{"name":"activeWithinSeconds","in":"query"}},"requestContentType":"application/json","responseContentType":"application/json","outputs":3,"responseOutputLabels":[{"code":"200","text":"List of sessions returned."},{"code":"401","text":"Unauthorized"},{"code":"403","text":"Forbidden"}],"responseAsPayload":false,"debugMode":"","headers":[],"_version":"2.1.0","x":1010,"y":144,"wires":[["13987ef9a8e0286f"],[],[]]},{"id":"13987ef9a8e0286f","type":"openApi-red","z":"d728cb91f51ff055","name":"","configUrlNode":"9435086ff9117a76","apiTag":"Session","keepAuth":true,"operationData":{"id":"Play","hasOperationId":true,"path":"/Sessions/{sessionId}/Playing","method":"post"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{"itemIds query":{"name":"itemIds","isActive":true,"required":true,"type":"msg","value":"_itemId","in":"query"},"playCommand query":{"name":"playCommand","isActive":true,"required":true,"type":"select","value":"PlayNow","in":"query"},"sessionId path":{"name":"sessionId","isActive":true,"required":true,"type":"msg","value":"payload.0.Id","in":"path"},"startPositionTicks query":{"name":"startPositionTicks","in":"query"},"mediaSourceId query":{"name":"mediaSourceId","in":"query"},"audioStreamIndex query":{"name":"audioStreamIndex","in":"query"},"subtitleStreamIndex query":{"name":"subtitleStreamIndex","in":"query"},"startIndex query":{"name":"startIndex","in":"query"}},"requestContentType":"application/json","responseContentType":"","outputs":3,"responseOutputLabels":[{"code":"204","text":"Instruction sent to session."},{"code":"401","text":"Unauthorized"},{"code":"403","text":"Forbidden"}],"responseAsPayload":false,"debugMode":false,"headers":[],"_version":"2.1.0","x":1146,"y":144,"wires":[["e47af5331f32c92d"],[],[]]},{"id":"b907d1659b1fb6cc","type":"openApi-red","z":"d728cb91f51ff055","name":"","configUrlNode":"9435086ff9117a76","apiTag":"Session","keepAuth":true,"operationData":{"id":"GetSessions","hasOperationId":true,"path":"/Sessions","method":"get"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{"controllableByUserId query":{"name":"controllableByUserId","type":"jsonata","value":"$env(\\"userId\\")","in":"query"},"deviceId query":{"name":"deviceId","type":"msg","value":"deviceId","in":"query"},"activeWithinSeconds query":{"name":"activeWithinSeconds","in":"query"}},"requestContentType":"application/json","responseContentType":"application/json","outputs":3,"responseOutputLabels":[{"code":"200","text":"List of sessions returned."},{"code":"401","text":"Unauthorized"},{"code":"403","text":"Forbidden"}],"responseAsPayload":false,"debugMode":"","headers":[],"_version":"2.1.0","x":302,"y":354,"wires":[["21244d4a0ab99de7"],[],[]]},{"id":"47b0ace1ee8cc84e","type":"inject","z":"d728cb91f51ff055","name":"Find device ID","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":115,"y":351,"wires":[["b907d1659b1fb6cc"]]},{"id":"21244d4a0ab99de7","type":"debug","z":"d728cb91f51ff055","name":"devices","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload {DeviceName: $.{\\"client\\": Client, \\"deviceId\\": DeviceId}}","targetType":"jsonata","statusVal":"","statusType":"auto","x":468,"y":354,"wires":[]},{"id":"e47af5331f32c92d","type":"ha-sentence","z":"d728cb91f51ff055","name":"send response back to HA","server":"2dad33ee.42bf5c","version":2,"inputs":1,"outputs":1,"exposeAsEntityConfig":"","mode":"response","sentences":["play [a] random mash episode"],"response":"_response","responseType":"msg","triggerResponse":"Something went wrong","triggerResponseType":"dynamic","responseTimeout":1000,"outputProperties":[],"x":1050,"y":192,"wires":[[]]},{"id":"7de8f9a16179ad63","type":"template","z":"d728cb91f51ff055","name":"format response","field":"_response","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Playing MASH {{payload.seasonName}} Episode {{payload.episodeNumber}}, {{{payload.episodeName}}}","output":"str","x":680,"y":144,"wires":[["04f10897f711e88c"]]},{"id":"d050c8425ac14d8b","type":"openApi-red","z":"d728cb91f51ff055","name":"","configUrlNode":"9435086ff9117a76","apiTag":"Search","keepAuth":true,"operationData":{"id":"GetSearchHints","hasOperationId":true,"path":"/Search/Hints","method":"get"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{"searchTerm query":{"name":"searchTerm","isActive":true,"required":true,"type":"str","value":"M*A*S*H","in":"query"},"startIndex query":{"name":"startIndex","in":"query"},"limit query":{"name":"limit","in":"query"},"userId query":{"name":"userId","in":"query"},"includeItemTypes query":{"name":"includeItemTypes","in":"query"},"excludeItemTypes query":{"name":"excludeItemTypes","in":"query"},"mediaTypes query":{"name":"mediaTypes","in":"query"},"parentId query":{"name":"parentId","in":"query"},"isMovie query":{"name":"isMovie","in":"query"},"isSeries query":{"name":"isSeries","in":"query"},"isNews query":{"name":"isNews","in":"query"},"isKids query":{"name":"isKids","in":"query"},"isSports query":{"name":"isSports","in":"query"},"includePeople query":{"name":"includePeople","in":"query"},"includeMedia query":{"name":"includeMedia","in":"query"},"includeGenres query":{"name":"includeGenres","in":"query"},"includeStudios query":{"name":"includeStudios","in":"query"},"includeArtists query":{"name":"includeArtists","in":"query"}},"requestContentType":"application/json","responseContentType":"application/json","outputs":3,"responseOutputLabels":[{"code":"200","text":"Search hint returned."},{"code":"401","text":"Unauthorized"},{"code":"403","text":"Forbidden"}],"responseAsPayload":false,"debugMode":"","headers":[],"_version":"2.1.0","x":308,"y":451,"wires":[["63e5998dd3c9dba0"],[],[]]},{"id":"87d85ce4c11270d6","type":"inject","z":"d728cb91f51ff055","name":"Find series ID","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":111,"y":448,"wires":[["d050c8425ac14d8b"]]},{"id":"63e5998dd3c9dba0","type":"debug","z":"d728cb91f51ff055","name":"results","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.SearchHints {Name: $.{\\"seriesId\\": Id, \\"series\\": Series, \\"year\\": ProductionYear, \\"type\\": Type}}","targetType":"jsonata","statusVal":"","statusType":"auto","x":466,"y":451,"wires":[]},{"id":"e286325a4e63d372","type":"openApi-red","z":"d728cb91f51ff055","name":"get series episodes","configUrlNode":"9435086ff9117a76","apiTag":"Items","keepAuth":true,"operationData":{"id":"GetItems","hasOperationId":true,"path":"/Items","method":"get"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{"userId query":{"name":"userId","isActive":true,"type":"jsonata","value":"$env(\\"userId\\")","in":"query"},"maxOfficialRating query":{"name":"maxOfficialRating","in":"query"},"hasThemeSong query":{"name":"hasThemeSong","in":"query"},"hasThemeVideo query":{"name":"hasThemeVideo","in":"query"},"hasSubtitles query":{"name":"hasSubtitles","in":"query"},"hasSpecialFeature query":{"name":"hasSpecialFeature","in":"query"},"hasTrailer query":{"name":"hasTrailer","in":"query"},"adjacentTo query":{"name":"adjacentTo","in":"query"},"parentIndexNumber query":{"name":"parentIndexNumber","in":"query"},"hasParentalRating query":{"name":"hasParentalRating","in":"query"},"isHd query":{"name":"isHd","in":"query"},"is4K query":{"name":"is4K","in":"query"},"locationTypes query":{"name":"locationTypes","in":"query"},"excludeLocationTypes query":{"name":"excludeLocationTypes","in":"query"},"isMissing query":{"name":"isMissing","in":"query"},"isUnaired query":{"name":"isUnaired","in":"query"},"minCommunityRating query":{"name":"minCommunityRating","in":"query"},"minCriticRating query":{"name":"minCriticRating","in":"query"},"minPremiereDate query":{"name":"minPremiereDate","in":"query"},"minDateLastSaved query":{"name":"minDateLastSaved","in":"query"},"minDateLastSavedForUser query":{"name":"minDateLastSavedForUser","in":"query"},"maxPremiereDate query":{"name":"maxPremiereDate","in":"query"},"hasOverview query":{"name":"hasOverview","in":"query"},"hasImdbId query":{"name":"hasImdbId","in":"query"},"hasTmdbId query":{"name":"hasTmdbId","in":"query"},"hasTvdbId query":{"name":"hasTvdbId","in":"query"},"isMovie query":{"name":"isMovie","type":"bool","value":"true","in":"query"},"isSeries query":{"name":"isSeries","in":"query"},"isNews query":{"name":"isNews","in":"query"},"isKids query":{"name":"isKids","in":"query"},"isSports query":{"name":"isSports","in":"query"},"excludeItemIds query":{"name":"excludeItemIds","in":"query"},"startIndex query":{"name":"startIndex","in":"query"},"limit query":{"name":"limit","type":"num","value":"1","in":"query"},"recursive query":{"name":"recursive","isActive":true,"type":"bool","value":"true","in":"query"},"searchTerm query":{"name":"searchTerm","in":"query"},"sortOrder query":{"name":"sortOrder","type":"str","collapsed":false,"value":"Descending","in":"query"},"parentId query":{"name":"parentId","isActive":true,"type":"msg","value":"seriesId","in":"query"},"fields query":{"name":"fields","in":"query"},"excludeItemTypes query":{"name":"excludeItemTypes","in":"query"},"includeItemTypes query":{"name":"includeItemTypes","isActive":true,"type":"str","value":"Episode","in":"query"},"filters query":{"name":"filters","in":"query"},"isFavorite query":{"name":"isFavorite","in":"query"},"mediaTypes query":{"name":"mediaTypes","in":"query"},"imageTypes query":{"name":"imageTypes","in":"query"},"sortBy query":{"name":"sortBy","type":"str","value":"DatePlayed","in":"query"},"isPlayed query":{"name":"isPlayed","in":"query"},"genres query":{"name":"genres","in":"query"},"officialRatings query":{"name":"officialRatings","in":"query"},"tags query":{"name":"tags","in":"query"},"years query":{"name":"years","in":"query"},"enableUserData query":{"name":"enableUserData","in":"query"},"imageTypeLimit query":{"name":"imageTypeLimit","in":"query"},"enableImageTypes query":{"name":"enableImageTypes","in":"query"},"person query":{"name":"person","in":"query"},"personIds query":{"name":"personIds","in":"query"},"personTypes query":{"name":"personTypes","in":"query"},"studios query":{"name":"studios","in":"query"},"artists query":{"name":"artists","in":"query"},"excludeArtistIds query":{"name":"excludeArtistIds","in":"query"},"artistIds query":{"name":"artistIds","in":"query"},"albumArtistIds query":{"name":"albumArtistIds","in":"query"},"contributingArtistIds query":{"name":"contributingArtistIds","in":"query"},"albums query":{"name":"albums","in":"query"},"albumIds query":{"name":"albumIds","in":"query"},"ids query":{"name":"ids","in":"query"},"videoTypes query":{"name":"videoTypes","in":"query"},"minOfficialRating query":{"name":"minOfficialRating","in":"query"},"isLocked query":{"name":"isLocked","in":"query"},"isPlaceHolder query":{"name":"isPlaceHolder","in":"query"},"hasOfficialRating query":{"name":"hasOfficialRating","in":"query"},"collapseBoxSetItems query":{"name":"collapseBoxSetItems","in":"query"},"minWidth query":{"name":"minWidth","in":"query"},"minHeight query":{"name":"minHeight","in":"query"},"maxWidth query":{"name":"maxWidth","in":"query"},"maxHeight query":{"name":"maxHeight","in":"query"},"is3D query":{"name":"is3D","in":"query"},"seriesStatus query":{"name":"seriesStatus","in":"query"},"nameStartsWithOrGreater query":{"name":"nameStartsWithOrGreater","in":"query"},"nameStartsWith query":{"name":"nameStartsWith","in":"query"},"nameLessThan query":{"name":"nameLessThan","in":"query"},"studioIds query":{"name":"studioIds","in":"query"},"genreIds query":{"name":"genreIds","in":"query"},"enableTotalRecordCount query":{"name":"enableTotalRecordCount","in":"query"},"enableImages query":{"name":"enableImages","in":"query"}},"requestContentType":"application/json","responseContentType":"application/json","outputs":3,"responseOutputLabels":[{"code":"200","text":"Success"},{"code":"401","text":"Unauthorized"},{"code":"403","text":"Forbidden"}],"responseAsPayload":false,"debugMode":false,"headers":[],"_version":"2.1.0","x":546,"y":290,"wires":[["57dccb79c1e6b527"],[],[]]},{"id":"57dccb79c1e6b527","type":"function","z":"d728cb91f51ff055","name":"store episodes in flow context","func":"const episodes = flow.get(\\"mash_episodes\\") ?? [];\\n// only keep the data we need\\nmsg.payload.Items.forEach((e) => {\\n    episodes.push({\\n        id: e.Id,\\n        episodeNumber: e.IndexNumber,\\n        seasonName: e.SeasonName,\\n        episodeName: e.Name,\\n    })   \\n});\\nflow.set(\\"mash_episodes\\", episodes);\\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":794,"y":290,"wires":[["b195cd17f0d831f6"]]},{"id":"b195cd17f0d831f6","type":"link out","z":"d728cb91f51ff055","name":"","mode":"return","links":[],"x":973,"y":290,"wires":[]},{"id":"956492fb58071a3f","type":"link in","z":"d728cb91f51ff055","name":"get episodes","links":[],"x":94,"y":290,"wires":[["ae47bac31c4abf22"]],"l":true},{"id":"45d8457d15bfa505","type":"link call","z":"d728cb91f51ff055","name":"get episodes","links":["956492fb58071a3f"],"linkType":"static","timeout":"30","x":330,"y":144,"wires":[["41a351cf86e6a70e"]]},{"id":"cf88a7b5365c7c0f","type":"ha-sentence","z":"d728cb91f51ff055","name":"play MASH episode","server":"2dad33ee.42bf5c","version":2,"inputs":0,"outputs":1,"exposeAsEntityConfig":"","mode":"trigger","sentences":["play mash season {season} episode {episode}","play mash episode {episode}"],"response":"","responseType":"str","triggerResponse":"Something went wrong","triggerResponseType":"dynamic","responseTimeout":"2000","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"},{"property":"deviceId","propertyType":"msg","value":"c76c8695549b5bedfc21f48b0664b8329ed2ebde","valueType":"str"},{"property":"seriesId","propertyType":"msg","value":"3b264a3b9e602ddc9c9a00a343dd5ce2","valueType":"str"}],"x":114,"y":192,"wires":[["3936fa1204b55b3f"]]},{"id":"ae47bac31c4abf22","type":"switch","z":"d728cb91f51ff055","name":"have episode list?","property":"mash_episodes","propertyType":"flow","rules":[{"t":"empty"},{"t":"null"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":326,"y":290,"wires":[["e286325a4e63d372"],["e286325a4e63d372"],["b195cd17f0d831f6"]]},{"id":"a87cff07f2f77174","type":"function","z":"d728cb91f51ff055","name":"find episode","func":"const episodes = flow.get(\\"mash_episodes\\") ?? [];\\nconst episode = convertStringToNumber(msg.payload.entities.episode.value);\\nconst season = convertStringToNumber(msg.payload.entities.season?.value);\\n\\nif (season) {\\n    msg.payload = episodes.find(e => e.episodeNumber === episode && e.seasonName === `Season ${season}`);\\n} else { // if season is empty find show by number is aired in series\\n    msg.payload = findNthShowAired(episodes, episode);\\n}\\n\\n// episode not found\\nif (!msg.payload) {\\n    msg._response = `No episode found for MASH ${season ? `Season ${season}` : ''} Episode ${episode}`;\\n    return [null, msg];\\n}\\nreturn msg;\\n\\nfunction findNthShowAired(episodes, nthShow) {\\n    if (nthShow <= 0 || nthShow > episodes.length) {\\n        return null; // Invalid input or out of range\\n    }\\n\\n    // Sort episodes by season and episode number to ensure correct airing order\\n    const sortedEpisodes = episodes.sort((a, b) => {\\n        const seasonA = Number(a.seasonName.replace('Season ', ''));\\n        const seasonB = Number(b.seasonName.replace('Season ', ''));\\n\\n        if (seasonA === seasonB) {\\n            return a.episodeNumber - b.episodeNumber;\\n        } else {\\n            return seasonA - seasonB;\\n        }\\n    });\\n\\n    return sortedEpisodes[nthShow - 1]; // nthShow is 1-based, array is 0-based\\n}\\n\\nfunction convertStringToNumber(input) {\\n    if (input === undefined) return;\\n    \\n    const numberWords = {\\n        'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, \\n        'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9, \\n        'ten': 10, 'eleven': 11, 'twelve': 12, 'thirteen': 13, \\n        'fourteen': 14, 'fifteen': 15, 'sixteen': 16, 'seventeen': 17, \\n        'eighteen': 18, 'nineteen': 19, 'twenty': 20\\n    };\\n\\n    // Check if input is already a numeric string\\n    if (!isNaN(input)) {\\n        return Number(input);\\n    }\\n\\n    // Check if the input is a number word\\n    const lowerInput = input.toLowerCase().trim();\\n    if (lowerInput in numberWords) {\\n        return numberWords[lowerInput];\\n    }\\n}","outputs":2,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":502,"y":192,"wires":[["7de8f9a16179ad63"],["e47af5331f32c92d"]]},{"id":"3936fa1204b55b3f","type":"link call","z":"d728cb91f51ff055","name":"get episodes","links":["956492fb58071a3f"],"linkType":"static","timeout":"30","x":330,"y":192,"wires":[["a87cff07f2f77174"]]},{"id":"31e71416c0d8fcd4","type":"comment","z":"d728cb91f51ff055","name":"The deviceId and seriesId will need to be changed in the output properties of the sentence node","info":"","x":354,"y":96,"wires":[]},{"id":"dcc480460a475cf8","type":"openApi-red","z":"d728cb91f51ff055","name":"","configUrlNode":"9435086ff9117a76","apiTag":"User","keepAuth":true,"operationData":{"id":"GetPublicUsers","hasOperationId":true,"path":"/Users/Public","method":"get"},"outputStyle":"each response","errorHandling":"throw exception","internalErrors":{"text":"","source":""},"parameters":{},"requestContentType":"application/json","responseContentType":"application/json","outputs":1,"responseOutputLabels":[{"code":"200","text":"Public users returned."}],"responseAsPayload":false,"debugMode":"","headers":[],"_version":"2.1.0","x":312,"y":513,"wires":[["7bfc313b1590bc35"]]},{"id":"3225bc86df87feba","type":"inject","z":"d728cb91f51ff055","name":"Find user ID","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":513,"wires":[["dcc480460a475cf8"]]},{"id":"7bfc313b1590bc35","type":"debug","z":"d728cb91f51ff055","name":"results","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload {Name: Id}","targetType":"jsonata","statusVal":"","statusType":"auto","x":470,"y":513,"wires":[]},{"id":"db16886a9eee2c17","type":"comment","z":"d728cb91f51ff055","name":"The user ID will need to be changed in the \\"get series episodes\\"","info":"","x":686,"y":240,"wires":[]},{"id":"35ebe5b08b627b76","type":"comment","z":"d728cb91f51ff055","name":"Edit searchTerm","info":"","x":308,"y":400,"wires":[]}]\n

    Setup Instructions

    The flow includes nodes to retrieve the necessary data from Jellyfin. Follow these steps to set it up:

    1. Install the required nodes.
    2. Import the provided flow into Node-RED.
    3. Configure the openapi node:
      • Use the Jellyfin OpenAPI URL: https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json.
      • Enter your Jellyfin server details.
      • Add your API key in the custom header under X-MediaBrowser-Token.
    4. Adjust the Sentence node to recognize your desired show's name and the season/episode format.
    5. In the "get series episodes" node, update the userId field with your Jellyfin user ID.
    6. Deploy the flow.

    Flow screenshot

    Extended Usage

    This flow can be expanded to include additional functionality, such as:

    • Customizing which devices the show is played on.
    • Playing a random episode from a specific show.
    • Playing a random episode from a specific season.
    • Playing the next unwatched episode from a show.
    • Playing the next episode from a show.
    • Playing a random episode from a specific genre.
    ',18)]))}const y=t(r,[["render",l],["__file","play-jellyfin-show-using-sentence-node.html.vue"]]),g=JSON.parse('{"path":"/cookbook/play-jellyfin-show-using-sentence-node.html","title":"Play a Jellyfin Show Using the Sentence Node","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Flow Configuration","slug":"flow-configuration","link":"#flow-configuration","children":[{"level":3,"title":"Setup Instructions","slug":"setup-instructions","link":"#setup-instructions","children":[]}]},{"level":2,"title":"Extended Usage","slug":"extended-usage","link":"#extended-usage","children":[]}],"git":{"updatedTime":1726729912000,"contributors":[{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/play-jellyfin-show-using-sentence-node.md"}');export{y as comp,g as data}; diff --git a/assets/play-jellyfin-show-using-sentence-node_01-Ct2V9oo0.png b/assets/play-jellyfin-show-using-sentence-node_01-Ct2V9oo0.png new file mode 100644 index 0000000000..0ad6261c1f Binary files /dev/null and b/assets/play-jellyfin-show-using-sentence-node_01-Ct2V9oo0.png differ diff --git a/assets/play-jellyfin-show-using-sentence-node_02-Ceucdp-D.png b/assets/play-jellyfin-show-using-sentence-node_02-Ceucdp-D.png new file mode 100644 index 0000000000..0e3286fc60 Binary files /dev/null and b/assets/play-jellyfin-show-using-sentence-node_02-Ceucdp-D.png differ diff --git a/assets/play-jellyfin-show-using-sentence-node_03-4f7Uw0vn.png b/assets/play-jellyfin-show-using-sentence-node_03-4f7Uw0vn.png new file mode 100644 index 0000000000..0e71fb4a14 Binary files /dev/null and b/assets/play-jellyfin-show-using-sentence-node_03-4f7Uw0vn.png differ diff --git a/assets/play-jellyfin-show-using-sentence-node_03-B3fhig1f.js b/assets/play-jellyfin-show-using-sentence-node_03-B3fhig1f.js new file mode 100644 index 0000000000..01da8be459 --- /dev/null +++ b/assets/play-jellyfin-show-using-sentence-node_03-B3fhig1f.js @@ -0,0 +1 @@ +const s="/node-red-contrib-home-assistant-websocket/assets/play-jellyfin-show-using-sentence-node_01-Ct2V9oo0.png",e="/node-red-contrib-home-assistant-websocket/assets/play-jellyfin-show-using-sentence-node_03-4f7Uw0vn.png";export{s as _,e as a}; diff --git a/assets/play-jellyfin-show-using-sentence-node_04-DR4W4k_K.png b/assets/play-jellyfin-show-using-sentence-node_04-DR4W4k_K.png new file mode 100644 index 0000000000..59d014d806 Binary files /dev/null and b/assets/play-jellyfin-show-using-sentence-node_04-DR4W4k_K.png differ diff --git a/assets/poll-state.html-DyOdcTV_.js b/assets/poll-state.html-DyOdcTV_.js new file mode 100644 index 0000000000..98ef6f5be8 --- /dev/null +++ b/assets/poll-state.html-DyOdcTV_.js @@ -0,0 +1 @@ +import{_ as d,c as r,a as t,d as a,b as n,e as i,w as h,r as l,o as p}from"./app-CefLgoES.js";const u={},c={id:"entity-id",tabindex:"-1"},f={class:"header-anchor",href:"#entity-id"};function g(m,e){const s=l("Badge"),o=l("RouteLink");return p(),r("div",null,[e[2]||(e[2]=t("h1",{id:"poll-state",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#poll-state"},[t("span",null,"Poll State")])],-1)),e[3]||(e[3]=t("p",null,"The Poll State node outputs the state of an entity at regular intervals. It can also be configured to trigger at startup and whenever the entity changes state, if desired. This node is useful for regularly checking the status of an entity, ensuring your automations stay up to date with the latest information.",-1)),e[4]||(e[4]=t("h2",{id:"configuration",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configuration"},[t("span",null,"Configuration")])],-1)),t("h3",c,[t("a",f,[t("span",null,[e[0]||(e[0]=a("Entity ID ")),n(s,{text:"required"})])])]),e[5]||(e[5]=i('

    The entity id of the entity to poll for.

    Update Interval

    • Type: number

    The amount of time between checking/sending updates.

    If State

    • Type: string

    If the conditional statement is evaluated as true send the message to the first output otherwise send it to the second output. If blank there will only be one output.

    Also see:

    ',8)),t("ul",null,[t("li",null,[n(o,{to:"/guide/conditionals.html"},{default:h(()=>e[1]||(e[1]=[a("Conditionals")])),_:1})])]),e[6]||(e[6]=i('

    State Type

    • Type: string

    Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state

    Output Initially

    • Type: boolean

    Output once on startup/deploy then on each interval

    Expose to Home Assistant

    • Type: boolean

    Creates a switch within Home Assistant to enable/disable this node. This feature requires Node-RED custom integration to be installed in Home Assistant

    Outputs

    topic

    • Type: string

    entity_id of changed entity

    payload

    • Type: object

    The last known state of the entity

    data.timeSinceChanged

    • Type: string

    Human readable format string of time since last updated, example "1 hour ago"

    data.timeSinceChangedMs

    • Type: number

    Number of milliseconds since last changed

    References

    ',24))])}const b=d(u,[["render",g],["__file","poll-state.html.vue"]]),v=JSON.parse('{"path":"/node/poll-state.html","title":"Poll State","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity ID","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"Update Interval","slug":"update-interval","link":"#update-interval","children":[]},{"level":3,"title":"If State","slug":"if-state","link":"#if-state","children":[]},{"level":3,"title":"State Type","slug":"state-type","link":"#state-type","children":[]},{"level":3,"title":"Output Initially","slug":"output-initially","link":"#output-initially","children":[]},{"level":3,"title":"Expose to Home Assistant","slug":"expose-to-home-assistant","link":"#expose-to-home-assistant","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"topic","slug":"topic","link":"#topic","children":[]},{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]},{"level":3,"title":"data.timeSinceChanged","slug":"data-timesincechanged","link":"#data-timesincechanged","children":[]},{"level":3,"title":"data.timeSinceChangedMs","slug":"data-timesincechangedms","link":"#data-timesincechangedms","children":[]}]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5}]},"filePathRelative":"node/poll-state.md"}');export{b as comp,v as data}; diff --git a/assets/render-template.html-BLNecktW.js b/assets/render-template.html-BLNecktW.js new file mode 100644 index 0000000000..7a5a4d8b0c --- /dev/null +++ b/assets/render-template.html-BLNecktW.js @@ -0,0 +1 @@ +import{_ as t,c as a,e as l,o as n}from"./app-CefLgoES.js";const s={};function r(i,e){return n(),a("div",null,e[0]||(e[0]=[l('

    Render Template

    The Render Template node allows you to render templates based on input data. Templates in Home Assistant are powerful tools for dynamically generating text or values based on the state of entities or other variables. This node sends the template to Home Assistant for rendering and outputs the result.

    NOTE:

    The node will output any Home Assistant API errors for catching with the 'catch-all' node

    Configuration

    template

    • Type: string

    Jinja template to be rendered, discarded if msg.template is provided via input msg

    Template Location

    Customizable location to output original template

    Results

    Customizable location to output rendered template

    Inputs

    template

    • Type: string

    Jinja template to be rendered

    Outputs

    template

    • Type: string

    The original template sent to Home Assistant for rendering

    payload

    • Type: string

    The rendered template

    References

    ',24)]))}const p=t(s,[["render",r],["__file","render-template.html.vue"]]),d=JSON.parse('{"path":"/node/render-template.html","title":"Render Template","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"template","slug":"template","link":"#template","children":[]},{"level":3,"title":"Template Location","slug":"template-location","link":"#template-location","children":[]},{"level":3,"title":"Results","slug":"results","link":"#results","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"template","slug":"template-1","link":"#template-1","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"template","slug":"template-2","link":"#template-2","children":[]},{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]}]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/render-template.md"}');export{p as comp,d as data}; diff --git a/assets/saving-and-restoring-states.html-IPQZ0Zh-.js b/assets/saving-and-restoring-states.html-IPQZ0Zh-.js new file mode 100644 index 0000000000..c8f3f0dd8c --- /dev/null +++ b/assets/saving-and-restoring-states.html-IPQZ0Zh-.js @@ -0,0 +1,3 @@ +import{_ as t,c as p,e as o,a as n,b as e,w as u,r as c,o as r,d as l}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/saving-and-restoring-states_04-RzhwF69v.png",q="/node-red-contrib-home-assistant-websocket/assets/saving-and-restoring-states_01-C9piafaU.png",i="/node-red-contrib-home-assistant-websocket/assets/saving-and-restoring-states_02-D1d1KEfC.png",y="/node-red-contrib-home-assistant-websocket/assets/saving-and-restoring-states_03-BUjd6VDW.png",g={};function d(m,s){const a=c("RouteLink");return r(),p("div",null,[s[2]||(s[2]=o('

    Saving and Restoring States

    Using Home Assistant scene creation

    Home Assistant added the ability to create scenes on the fly. This has reduced the work needed to be done in Node-RED to be able to restore entities to a previous state.

    screenshot

    [{"id":"44c8f86e.a64488","type":"trigger-state","z":"ffbd7f06.4a014","name":"Front Door Opened","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.front_door","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"nqs49205fvp","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"open"},{"id":"b6o1iwadls4","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"closed"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":202,"y":1056,"wires":[["af046290.fdf2b"],[]]},{"id":"af046290.fdf2b","type":"api-call-service","z":"ffbd7f06.4a014","name":"Snapshot Entities","version":1,"debugenabled":false,"service_domain":"scene","service":"create","entityId":"","data":"{\\"scene_id\\":\\"before\\",\\"snapshot_entities\\":[\\"light.wled_master_bedroom_tv\\"]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":410,"y":1056,"wires":[["7af76536.dfa6cc"]]},{"id":"7af76536.dfa6cc","type":"api-call-service","z":"ffbd7f06.4a014","name":"Change entities","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.wled_master_bedroom_tv","data":"{\\"rgb_color\\":[255,0,0],\\"brightness\\":128}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":608,"y":1056,"wires":[["c6f24589.9beb48"]]},{"id":"c6f24589.9beb48","type":"delay","z":"ffbd7f06.4a014","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":780,"y":1056,"wires":[["f762690.97b1198"]]},{"id":"f762690.97b1198","type":"api-call-service","z":"ffbd7f06.4a014","name":"Restore Entities State","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.before","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":964,"y":1056,"wires":[[]]}]
    +

    Here are several examples using the get-entities node to get the states of several entities and then how to restore the entity states.

    Using the get entities node

    screenshot

    [{"id":"953f4576.faa588","type":"ha-get-entities","z":"6cb9e978.bf4588","server":"8d00ebbc.99a928","name":"Get States","rules":[{"property":"entity_id","logic":"is","value":"^(light|switch|climate)\\\\.+","valueType":"re"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":294,"y":80,"wires":[["2dab5a86.e54686"]]},{"id":"821d957.d510168","type":"inject","z":"6cb9e978.bf4588","name":"Store states","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":118,"y":80,"wires":[["953f4576.faa588"]]},{"id":"5bc878cb.d80f08","type":"comment","z":"6cb9e978.bf4588","name":"How I would do store states","info":"","x":152,"y":32,"wires":[]},{"id":"2dab5a86.e54686","type":"function","z":"6cb9e978.bf4588","name":"transform data","func":"const entities = msg.payload.map((e) => {\\n    const domain = e.entity_id.split('.')[0];\\n    const payload = {};\\n\\n    switch(domain) {\\n        case 'switch':\\n        case 'light':\\n            payload.domain = domain;\\n            payload.service = `turn_${e.state}`;\\n            payload.data = { entity_id: e.entity_id };    \\n            break;\\n        case 'climate':\\n            payload.domain = 'climate';\\n            payload.service = `set_temperature`;\\n            payload.data = {\\n                entity_id: e.entity_id,\\n                temperature: e.attributes.temperature,\\n                target_temp_low: e.attributes.min_temp,\\n                target_temp_high: e.attributes.max_temp,\\n                operation_mode: e.attributes.operation_mode\\n            };\\n            break;\\n    }\\n    return payload;\\n});\\n// Save the states\\nflow.set('savedStates', entities);\\n\\n// create a blank message object with out new payload\\nmsg = { payload: entities };\\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":80,"wires":[["ceaf42e4.e245d"]]},{"id":"ceaf42e4.e245d","type":"debug","z":"6cb9e978.bf4588","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":646,"y":80,"wires":[]}]\n

    screenshot

    [{"id":"f14f56e1.4d9a28","type":"inject","z":"6cb9e978.bf4588","name":"Store states","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":118,"y":256,"wires":[["3790fc30.12b354","18d6f55.537770b","94a3c52.9fa9738"]]},{"id":"18d6f55.537770b","type":"ha-get-entities","z":"6cb9e978.bf4588","server":"8d00ebbc.99a928","name":"Get Switches","rules":[{"property":"entity_id","logic":"starts_with","value":"switch","valueType":"str"},{"property":"state","logic":"includes","value":"on,off","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":290,"y":256,"wires":[["19e85c0e.f4d1d4"]]},{"id":"94a3c52.9fa9738","type":"ha-get-entities","z":"6cb9e978.bf4588","server":"8d00ebbc.99a928","name":"Get Lights","rules":[{"property":"entity_id","logic":"starts_with","value":"light","valueType":"str"},{"property":"state","logic":"includes","value":"on,off","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":290,"y":208,"wires":[["19e85c0e.f4d1d4"]]},{"id":"297ff244.47ca4e","type":"comment","z":"6cb9e978.bf4588","name":"Easier to follow version","info":"","x":132,"y":160,"wires":[]},{"id":"3790fc30.12b354","type":"ha-get-entities","z":"6cb9e978.bf4588","server":"8d00ebbc.99a928","name":"Get Climate","rules":[{"property":"entity_id","logic":"starts_with","value":"climate","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":290,"y":304,"wires":[["36705576.17a42a"]]},{"id":"19e85c0e.f4d1d4","type":"function","z":"6cb9e978.bf4588","name":"transform data","func":"const payload = {};\\npayload.domain = msg.payload.entity_id.split('.')[0];\\npayload.service = `turn_${msg.payload.state}`;\\npayload.data = { entity_id: msg.payload.entity_id };\\n\\n// create a blank message object with out new payload\\nmsg = { payload: payload };\\nreturn msg;","outputs":1,"noerr":0,"x":476,"y":256,"wires":[["2b7e0299.1ce7ae"]]},{"id":"36705576.17a42a","type":"function","z":"6cb9e978.bf4588","name":"transform data","func":"const payloads = [];\\nconst payload = {};\\npayload.domain = 'climate';\\npayload.service = `set_temperature`;\\npayload.data = {\\n    entity_id: msg.payload.entity_id,\\n    temperature: msg.payload.attributes.temperature,\\n    target_temp_low: msg.payload.attributes.min_temp,\\n    target_temp_high: msg.payload.attributes.max_temp,\\n    operation_mode: msg.payload.attributes.operation_mode\\n};\\n\\n// create a blank message object with out new payload\\nmsg = { payload: payload };\\nreturn msg;","outputs":1,"noerr":0,"x":476,"y":304,"wires":[["2b7e0299.1ce7ae"]]},{"id":"e254a879.41d408","type":"comment","z":"6cb9e978.bf4588","name":"function nodes could be replaced with a change nodes","info":"","x":596,"y":208,"wires":[]},{"id":"2b7e0299.1ce7ae","type":"join","z":"6cb9e978.bf4588","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\\\n","joinerType":"str","accumulate":false,"timeout":"5","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":654,"y":256,"wires":[["b3db19bf.61d8e8"]]},{"id":"472ff71c.c342c8","type":"debug","z":"6cb9e978.bf4588","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1026,"y":256,"wires":[]},{"id":"b3db19bf.61d8e8","type":"change","z":"6cb9e978.bf4588","name":"","rules":[{"t":"set","p":"savedStates","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":832,"y":256,"wires":[["472ff71c.c342c8"]]}]\n

    screenshot

    [{"id":"ab90e938.1eff18","type":"inject","z":"3c84cc55.8f02f4","name":"Restore states","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":294,"y":656,"wires":[["a5a0930.ed3ae7"]]},{"id":"a5a0930.ed3ae7","type":"change","z":"3c84cc55.8f02f4","name":"Get Saved States","rules":[{"t":"set","p":"payload","pt":"msg","to":"savedStates","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":656,"wires":[["6247c7cf.5cb858"]]},{"id":"8f420c5d.82373","type":"debug","z":"3c84cc55.8f02f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":998,"y":656,"wires":[]},{"id":"6247c7cf.5cb858","type":"split","z":"3c84cc55.8f02f4","name":"","splt":"\\\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":658,"y":656,"wires":[["719b7b39.cbf0e4"]]},{"id":"719b7b39.cbf0e4","type":"api-call-service","z":"3c84cc55.8f02f4","name":"Restore State","version":"1","debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":816,"y":656,"wires":[["8f420c5d.82373"]]}]
    +

    As you can see in the above examples the switch and light domains are just saving and restoring the state, on/off. But what if some users wanted to also save and restore the brightness level or not. The climate domain is saving and restoring more than just the state.

    Also see:

    `,15)),n("ul",null,[s[1]||(s[1]=n("li",null,[n("a",{href:"https://www.home-assistant.io/integrations/scene/#creating-scenes-on-the-fly",target:"_blank",rel:"noopener noreferrer"},"Scenes in Home Assistant docs")],-1)),n("li",null,[e(a,{to:"/node/get-entities.html"},{default:u(()=>s[0]||(s[0]=[l("get-entities node")])),_:1})])])])}const f=t(g,[["render",d],["__file","saving-and-restoring-states.html.vue"]]),_=JSON.parse('{"path":"/cookbook/saving-and-restoring-states.html","title":"Saving and Restoring States","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Using Home Assistant scene creation","slug":"using-home-assistant-scene-creation","link":"#using-home-assistant-scene-creation","children":[]},{"level":2,"title":"Using the get entities node","slug":"using-the-get-entities-node","link":"#using-the-get-entities-node","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5}]},"filePathRelative":"cookbook/saving-and-restoring-states.md"}');export{f as comp,_ as data}; diff --git a/assets/saving-and-restoring-states_01-C9piafaU.png b/assets/saving-and-restoring-states_01-C9piafaU.png new file mode 100644 index 0000000000..5d9c6369d6 Binary files /dev/null and b/assets/saving-and-restoring-states_01-C9piafaU.png differ diff --git a/assets/saving-and-restoring-states_02-D1d1KEfC.png b/assets/saving-and-restoring-states_02-D1d1KEfC.png new file mode 100644 index 0000000000..0764a95344 Binary files /dev/null and b/assets/saving-and-restoring-states_02-D1d1KEfC.png differ diff --git a/assets/saving-and-restoring-states_03-BUjd6VDW.png b/assets/saving-and-restoring-states_03-BUjd6VDW.png new file mode 100644 index 0000000000..e1f0b89436 Binary files /dev/null and b/assets/saving-and-restoring-states_03-BUjd6VDW.png differ diff --git a/assets/saving-and-restoring-states_04-RzhwF69v.png b/assets/saving-and-restoring-states_04-RzhwF69v.png new file mode 100644 index 0000000000..4648020836 Binary files /dev/null and b/assets/saving-and-restoring-states_04-RzhwF69v.png differ diff --git a/assets/select.html-lQV-KKW4.js b/assets/select.html-lQV-KKW4.js new file mode 100644 index 0000000000..ba43fc4f0a --- /dev/null +++ b/assets/select.html-lQV-KKW4.js @@ -0,0 +1,2 @@ +import{_ as k,c as u,e,a as s,d as t,b as a,w as c,r as o,o as i}from"./app-CefLgoES.js";const y="/node-red-contrib-home-assistant-websocket/assets/select_01-CmUrvZyA.png",g={},d={id:"mode",tabindex:"-1"},b={class:"header-anchor",href:"#mode"},m={id:"value",tabindex:"-1"},f={class:"header-anchor",href:"#value"};function v(h,n){const p=o("Badge"),r=o("InfoPanelOnly"),l=o("DocsOnly");return i(),u("div",null,[n[4]||(n[4]=e('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Select

    The Select node creates a select entity in Home Assistant that can be manipulated from Node-RED. This type of entity typically represents a dropdown menu or a list of options from which the user can choose, and it can be used to control or adjust settings within your automations.

    Configuration

    ',4)),s("h3",d,[s("a",b,[s("span",null,[n[0]||(n[0]=t("Mode ")),a(p,{text:"required"})])])]),n[5]||(n[5]=s("ul",null,[s("li",null,"Type: 'listen' | 'get' | 'set'")],-1)),n[6]||(n[6]=s("p",null,"The mode of the node",-1)),s("h3",m,[s("a",f,[s("span",null,[n[1]||(n[1]=t("value ")),a(p,{text:"required"})])])]),n[7]||(n[7]=e('
    • Type: string

    A string to the set current value of the select entity

    Inputs

    properties of msg.payload

    Value

    • Type: string

    The string of the text entity should be updated to

    Outputs

    Value types:

    • value: The text string of the entity
    • previous value: The previous text string of the entity
    • config: The config properties of the node

    Examples

    ',11)),a(r,null,{default:c(()=>n[2]||(n[2]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/select.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),a(l,null,{default:c(()=>n[3]||(n[3]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4321a3f756b4e04b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"94"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"61e5b7c1daa37965"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a8c7a4ebf79bc26a"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"416"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"61e5b7c1daa37965"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select in"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue& \\" : \\" & payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"388"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1c519ae737aa6361"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"invalid option"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"invalid option!!!!"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"134"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"416"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a8c7a4ebf79bc26a"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e0feb133879bf8aa"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"320"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"3c6ef2defe605b5e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3c6ef2defe605b5e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select_next"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"select.test_select"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"330"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"320"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dee53ca19e7262f9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"4"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeToHomeAssistant"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfilter"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select.test_select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfiltertype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"exact"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputinitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haltifstate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_only_on_state_change"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"eventData"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"174"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b592f430a286d9d3"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b592f430a286d9d3"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"event state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data.old_state.state & \\" : \\" & payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"398"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"8425ced98c4ef688"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"542"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"368"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"7668a7159575359b"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ece11ecf7eeedf69"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"368"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2944cc4f94c015fa"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7668a7159575359b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select out"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue& \\" : \\" & payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"684"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"368"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2944cc4f94c015fa"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-current-state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random option"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entity_id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select.test_select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"( \\t $c := $entity().state;\\t $a := function($acc, $val){$c = $val ? $acc : $append($acc, $val)};\\t $r := $shuffle($entity().attributes.options);\\t$reduce($r, $a, [])[0]\\t)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entity_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"320"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"368"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"8425ced98c4ef688"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1ebc7b227317b6c0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-update-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"320"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"560"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"8ea8951f4193e413"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1,2,3"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"options\\": [\\"1\\",\\"2\\",\\"3\\"]}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"110"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"560"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"1ebc7b227317b6c0"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2b4b5b649e5a03b5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random strings"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"(\\t $charSet := [\\t \\"a\\",\\t \\"b\\",\\t \\"c\\",\\t \\"d\\",\\t \\"e\\",\\t \\"f\\",\\t \\"g\\",\\t \\"h\\",\\t \\"i\\",\\t \\"j\\",\\t \\"k\\",\\t \\"l\\",\\t \\"m\\",\\t \\"n\\",\\t \\"o\\",\\t \\"p\\",\\t \\"q\\",\\t \\"r\\",\\t \\"s\\",\\t \\"t\\",\\t \\"u\\",\\t \\"v\\",\\t \\"w\\",\\t \\"x\\",\\t \\"y\\",\\t \\"z\\",\\t \\"A\\",\\t \\"B\\",\\t \\"C\\",\\t \\"D\\",\\t \\"E\\",\\t \\"F\\",\\t \\"G\\",\\t \\"H\\",\\t \\"I\\",\\t \\"J\\",\\t \\"K\\",\\t \\"L\\",\\t \\"M\\",\\t \\"N\\",\\t \\"O\\",\\t \\"P\\",\\t \\"Q\\",\\t \\"R\\",\\t \\"S\\",\\t \\"T\\",\\t \\"U\\",\\t \\"V\\",\\t \\"W\\",\\t \\"X\\",\\t \\"Y\\",\\t \\"Z\\",\\t \\"0\\",\\t \\"1\\",\\t \\"2\\",\\t \\"3\\",\\t \\"4\\",\\t \\"5\\",\\t \\"6\\",\\t \\"7\\",\\t \\"8\\",\\t \\"9\\",\\t \\"!\\",\\t \\"-\\"\\t]; \\t $randomChar := function(){\\t (\\t $randomCharChosen := $floor($random()* $count($charSet));\\t $charSet[$randomCharChosen]; \\t )\\t };\\t \\t\\t{\\t \\"options\\": [\\t $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\\t $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\\t $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\\t $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\\t $reduce([0..10],function($v,$i){( $v & $randomChar();)})\\t ]\\t}\\t)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"140"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"608"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"1ebc7b227317b6c0"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a5d80ae6c463f4b8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamically set options"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"148"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"512"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a0d398b3cdb34f01"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"464"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a7d33552113d6890"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"486e85c613ec63f5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"464"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a0d398b3cdb34f01"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a7d33552113d6890"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489afaacb01df108"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"432"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"464"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"be77e3a6884158eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test select"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"options"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"def"'),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"abc"'),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"132"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),t(` +`),s("span",{class:"line"})])])],-1)])),_:1})])}const x=k(g,[["render",v],["__file","select.html.vue"]]),$=JSON.parse('{"path":"/node/select.html","title":"Select","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Mode","slug":"mode","link":"#mode","children":[]},{"level":3,"title":"value","slug":"value","link":"#value","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"Value","slug":"value-1","link":"#value-1","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/select.md"}');export{x as comp,$ as data}; diff --git a/assets/select_01-CmUrvZyA.png b/assets/select_01-CmUrvZyA.png new file mode 100644 index 0000000000..b9c16a2148 Binary files /dev/null and b/assets/select_01-CmUrvZyA.png differ diff --git a/assets/sensor.html-DO1GtXG9.js b/assets/sensor.html-DO1GtXG9.js new file mode 100644 index 0000000000..3c7390cf24 --- /dev/null +++ b/assets/sensor.html-DO1GtXG9.js @@ -0,0 +1,13 @@ +import{_ as e,c as u,e as c,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/jsonata_5_1-DmQtZ7mW.png",i={};function q(g,s){const a=r("RouteLink");return l(),u("div",null,[s[2]||(s[2]=c('

    Sensor

    Using the WebSocket nodes provides many ways to read events and entity states from Home Assistant into Node-RED. Sending data the other way requires the use of the Entity nodes.

    There are several, but they all work in much the same way, and this example will use the Sensor node to create an entity sensor in Home Asisstant, and then to update the sensor state value as well as add an attribute value.

    screenshot

    Here is an example, showing how to use JSONata to set state value, and attribute value settings for an entity-sensor node.

    [{"id":"c14460fdc14a24a0","type":"group","z":"1cc7d2e94a4815fe","name":"Sensor node - set state and attribute values","style":{"label":true,"color":"#000000"},"nodes":["ba71e67aa0d06f02","4c7a952705afe4a0","e06208fe5410cfb5","23dfef724e706db3","a6d8e76c9ca8af97","fbbda709b5a50be7"],"x":214,"y":219,"w":912,"h":222},{"id":"ba71e67aa0d06f02","type":"inject","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"Manual Trigger","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":260,"wires":[["4c7a952705afe4a0"]]},{"id":"4c7a952705afe4a0","type":"ha-sensor","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"How many lights are on","entityConfig":"02814df043c7111b","version":0,"state":"$entities().*[state = \\"on\\" and entity_id ~> /^light|^switch/] ~> $count()","stateType":"jsonata","attributes":[{"property":"lights_table","value":"$entities().*[state = \\"on\\" and entity_id ~> /^light|^switch/].{\\"name\\": attributes.friendly_name, \\"lastChange\\": last_changed}","valueType":"jsonata"},{"property":"time","value":"","valueType":"date"}],"inputOverride":"allow","outputProperties":[],"x":610,"y":260,"wires":[[]],"server":""},{"id":"e06208fe5410cfb5","type":"server-state-changed","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"","server":"","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.lights_on_count","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"table","propertyType":"msg","value":"$entity().attributes.lights_table","valueType":"jsonata"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"changes","propertyType":"msg","value":"(\\t    $old:=$prevEntity().attributes.lights_table;\\t    $new:=$entity().attributes.lights_table;\\t    {\\"on\\": $new[$not(name in $old.name)],\\t    \\"off\\": $old[$not(name in $new.name)]}\\t)","valueType":"jsonata"}],"x":630,"y":340,"wires":[["23dfef724e706db3","a6d8e76c9ca8af97","fbbda709b5a50be7"]]},{"id":"23dfef724e706db3","type":"debug","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"Count of lights on","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":990,"y":280,"wires":[]},{"id":"a6d8e76c9ca8af97","type":"debug","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"Array table","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"table","targetType":"msg","statusVal":"payload","statusType":"auto","x":970,"y":340,"wires":[]},{"id":"fbbda709b5a50be7","type":"debug","z":"1cc7d2e94a4815fe","g":"c14460fdc14a24a0","name":"Changes","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"changes","targetType":"msg","statusVal":"changes","statusType":"auto","x":960,"y":400,"wires":[]},{"id":"02814df043c7111b","type":"ha-entity-config","server":"","deviceConfig":"","name":"SC LS On Count","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"LS On Count"},{"property":"icon","value":""},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false}]
    +

    Setting the sensor state value

    Example: Provide a sensor with the count of lights that are on.

    Once a new entity has been registered with Home Assistant, the entity state value can be updated by passing a message with the new value. Commonly msg.payload is used, however it is possible to use a JSONata expression to generate the new state value.

    $entities().*[state = "on" and entity_id ~> /^light|^switch/] ~> $count()
    +

    Here the $entities() function is used to return all entities, and select those that have "light" or "switch" in the 'entity id', and have an "on" state. This will return an array of entities, which can be counted to obtain the total number of switches or lights that are on.

    Setting an attribute value

    Example: Provide a list of the lights that are on.

    The entity state value can only be a JSON primitive value, such as a number or string, and objects and arrays can only be passed using the entity attributes.

    $entities().*[state = "on" and entity_id ~> /^light|^switch/].{
    +    "name": attributes.friendly_name,
    +    "lastChange": last_changed}
    +

    The JSONata expression here first returns a similar array of lights and switches, but from this then builds an array of objects. Each object contains the friendly name and last changed timestamp for each light or switch. This array is set into an attribute value of the sensor entity.

    Responding to state changes using JSONata

    Example: Since I last looked, which lights have been turned on, or off?

    In addition to the node above, the example also includes an Event: state node which responds to state changes in the above sensor update.

    (
    +    $old:=$prevEntity().attributes.lights_table;
    +    $new:=$entity().attributes.lights_table;
    +    {"on": $new[$not(name in $old.name)],
    +     "off": $old[$not(name in $new.name)]
    +    }
    +)
    +

    In an Event node, the $entity() function returns the current or new entity details, and the $prevEntity() function the previous or old entity details. The JSONata here picks out the sensor attribute and compares the array of lights & switches from before and after the state change. From this, an object with an array list of lights or switches that have been turned on, and those turned off, is provided.

    Note: In this example the Sensor node is updated on demand. The state value of the associated Home Assistant entity, which is a count of the number of lights or switches that are on, will only be updated when the Sensor node is triggered. The Events: state node is responding to changes in the sensor node state value, which will only happen when the sensor node is updated, and not when a light or switch is turned on or off.

    Also see:

    `,23)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const d=e(i,[["render",q],["__file","sensor.html.vue"]]),h=JSON.parse('{"path":"/cookbook/jsonata/sensor.html","title":"Sensor","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Setting the sensor state value","slug":"setting-the-sensor-state-value","link":"#setting-the-sensor-state-value","children":[]},{"level":3,"title":"Setting an attribute value","slug":"setting-an-attribute-value","link":"#setting-an-attribute-value","children":[]},{"level":3,"title":"Responding to state changes using JSONata","slug":"responding-to-state-changes-using-jsonata","link":"#responding-to-state-changes-using-jsonata","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/sensor.md"}');export{d as comp,h as data}; diff --git a/assets/sensor.html-DWyr03gG.js b/assets/sensor.html-DWyr03gG.js new file mode 100644 index 0000000000..48952a2b1a --- /dev/null +++ b/assets/sensor.html-DWyr03gG.js @@ -0,0 +1 @@ +import{_ as n,c as i,e as a,a as t,d as o,b as r,o as l,r as d}from"./app-CefLgoES.js";const u={},c={id:"state",tabindex:"-1"},h={class:"header-anchor",href:"#state"};function p(b,e){const s=d("Badge");return l(),i("div",null,[e[1]||(e[1]=a('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Sensor

    The Sensor node creates a sensor entity within Home Assistant that is controlled from Node-RED. Sensors are entities that report data from various sources, such as temperature, humidity, or motion detection. This node allows you to create and manage such sensors directly from your Node-RED flows.

    Configuration

    ',4)),t("h3",c,[t("a",h,[t("span",null,[e[0]||(e[0]=o("State ")),r(s,{text:"required"})])])]),e[2]||(e[2]=a('
    • Type: string | number | boolean

    The state the entity should be updated to

    To set the Home Assistant state to Unknown, send a state with a js expression null.

    Attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    Input Override

    • Type: string
    • Values: accept | merge | block

    Determine how input values will be handled. When merge is selected the message object values will override the configuration values.

    Resend state and attributes

    • Type: boolean

    When creating the entity in Home Assistant this will also send the last updated state and attributes then node sent to Home Assistant

    Inputs

    properties of msg.payload

    state

    • Type: string | number | boolean

    The state the entity should be updated to

    attributes

    • Type: Object

    Key/Value pair of attributes to update. The key should be a string and the value can be a [string | number | boolean | object]

    ',20))])}const g=n(u,[["render",p],["__file","sensor.html.vue"]]),f=JSON.parse('{"path":"/node/sensor.html","title":"Sensor","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"State","slug":"state","link":"#state","children":[]},{"level":3,"title":"Attributes","slug":"attributes","link":"#attributes","children":[]},{"level":3,"title":"Input Override","slug":"input-override","link":"#input-override","children":[]},{"level":3,"title":"Resend state and attributes","slug":"resend-state-and-attributes","link":"#resend-state-and-attributes","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"state","slug":"state-1","link":"#state-1","children":[]},{"level":3,"title":"attributes","slug":"attributes-1","link":"#attributes-1","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":7},{"name":"Mikko Tervala","email":"miksu103@gmail.com","commits":1}]},"filePathRelative":"node/sensor.md"}');export{g as comp,f as data}; diff --git a/assets/sentence.html-hzBKu6RK.js b/assets/sentence.html-hzBKu6RK.js new file mode 100644 index 0000000000..156ea04034 --- /dev/null +++ b/assets/sentence.html-hzBKu6RK.js @@ -0,0 +1,8 @@ +import{_ as l,a as k}from"./play-jellyfin-show-using-sentence-node_03-B3fhig1f.js";import{_ as u,c as i,e as y,b as t,w as o,r as p,o as g,a as s,d as a}from"./app-CefLgoES.js";const d="/node-red-contrib-home-assistant-websocket/assets/sentence_01-v9OGWJZ4.png",m="/node-red-contrib-home-assistant-websocket/assets/sentence_dynamic_example_01-CwHPqedV.png",b="/node-red-contrib-home-assistant-websocket/assets/sentence_dynamic_example_02-CdEErjFm.png",f={};function h(q,n){const e=p("InfoPanelOnly"),c=p("RouteLink"),r=p("DocsOnly");return g(),i("div",null,[n[21]||(n[21]=y(`

    Sentence

    The Sentence node is triggered when the Home Assistant Assist feature matches a sentence from a voice assistant using the default conversation agent. This node enables voice control integrations, allowing specific voice commands to trigger automations within Node-RED.

    Sentences support basic template syntax. Refer to the Home Assistant documentation for more details.

    Warning

    This node requires the Custom Integration to be installed in Home Assistant.

    Configuration Options

    Mode

    • Type: string
    • Options:
      • trigger
      • response

    Defines the node’s function.
    If set to trigger, the node activates when a sentence is matched.
    If set to response, the node sends a dynamic response back to Home Assistant.

    Sentences

    • Type: string

    A list of sentences to match. Supports basic template syntax. For more details, see the Home Assistant documentation.

    Response Type

    • Type: string
    • Options:
      • dynamic
      • fixed

    Specifies the type of response sent to Home Assistant:

    • Fixed: The same response is sent for all matched sentences.
    • Dynamic: The response is determined by the node set to response mode.

    Response

    • Type: string

    The message sent to Home Assistant when a sentence is matched. This option is used only if the Response Type is set to fixed.

    Fallback Response

    • Type: string

    The message sent to Home Assistant when a timeout occurs. This is used when the Response Type is set to dynamic.

    Response Timeout

    • Type: number

    Specifies the time in milliseconds to wait for a response before sending the Fallback Response. This option is used only when the Response Type is set to dynamic.

    Expose As

    • Type: string

    Select an entity to create a switch in Home Assistant. Turning the switch on or off will enable or disable this node in Node-RED.

    Inputs

    All properties must be provided in msg.payload.

    Example input:

    {
    +  "response": "The light is now on"
    +}
    +

    Response

    • Type: string

    The response sent to Home Assistant when a sentence is matched. This is used only when the Response Type is set to dynamic.

    Outputs

    Value types:

    • trigger id: The sentence that triggered the flow.
    • config: The node's configuration properties.

    Examples

    `,38)),t(e,null,{default:o(()=>n[0]||(n[0]=[s("p",null,[a("For detailed usage examples, see the "),s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/sentence.html#examples",target:"_blank",rel:"noopener noreferrer"},"Examples"),a(" section.")],-1)])),_:1}),t(r,null,{default:o(()=>[n[4]||(n[4]=s("h3",{id:"basic-usage",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#basic-usage"},[s("span",null,"Basic Usage")])],-1)),n[5]||(n[5]=s("p",null,[s("img",{src:d,alt:"screenshot"})],-1)),n[6]||(n[6]=s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2f10cb78ab2f486f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"full"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"418"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5c563c29d19f4aab"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5d205f70b1e41e9f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},`"[it's ]party time"`),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"happy (new year|birthday)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"hello world"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fixed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sentences"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sentences"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"config"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"212"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2f10cb78ab2f486f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"process sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"7"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation.process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'" {\\"text\\": payload}\\t"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"458"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1088"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0bd711e6ab321cf9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"happy new year"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"236"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1088"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7b19f1bcd79bf7ea"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"happy birthday"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1040"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fdec3314ea56130d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"party time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"220"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"992"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"92aa9c7e046ebba3"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},`"it's party time"`),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"234"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"944"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4c1ecc1396d9eddf"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hello world"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"224"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"896"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4868b36e0e57db4f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),a(` +`),s("span",{class:"line"})])])],-1)),n[7]||(n[7]=s("h3",{id:"dynamic-response-examples",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#dynamic-response-examples"},[s("span",null,"Dynamic Response Examples")])],-1)),n[8]||(n[8]=s("h4",{id:"example-1-count-lights-on-and-off",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-1-count-lights-on-and-off"},[s("span",null,"Example 1: Count Lights On and Off")])],-1)),n[9]||(n[9]=s("p",null,"This example shows how to use the Sentence node to provide a dynamic response based on the number of lights that are on or off in the house. It also turns on any lights that were off.",-1)),n[10]||(n[10]=s("p",null,[s("img",{src:m,alt:"screenshot"})],-1)),n[11]||(n[11]=s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5b44e487c5795df9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lights off count"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_object"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"starts_with"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light."'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_object"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"off"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"array"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lightsOff"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"512"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"99c90d5fd17832c9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"7c588d1510201532"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"99c90d5fd17832c9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-get-entities"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lights on count"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_object"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"starts_with"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light."'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"condition"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_object"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"logic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"count"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputEmptyResults"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocationType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputLocation"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lightsOnCount"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputResultsCount"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"704"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"f6e701c97c731979"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"09cb88520209e712"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"332"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1088"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"0b2ef68df13c5b94"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0b2ef68df13c5b94"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"7"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation.process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"text\\": \\"let there be light\\"}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"results"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"532"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1088"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"edfa883350eca925"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"edfa883350eca925"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"output"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.response.speech.plain.speech"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"886"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1088"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b389cf7e343fc938"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"7"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light.turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"turn_on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1090"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1184"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"28191039a0c43c00"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"build entity list"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"pt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{ \\"target\\": { \\"entity_id\\": lightsOff.entity_id}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tot"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"from"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reg"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"910"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1184"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b389cf7e343fc938"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"794a0664ef0e9ab0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"let there be light"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dad33ee.42bf5c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"let there be light"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponse"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"328"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"5b44e487c5795df9"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f6e701c97c731979"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dad33ee.42bf5c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lightsOnCount & \\" lights were already on turning on \\" & $count(lightsOffCount) & \\" lights that were off\\"\\t"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponse"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fixed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"892"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1136"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7c588d1510201532"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c89d915bdff0f798"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"any lights off?"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"lightsOff.length"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"gt"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"v"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"checkall"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repair"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"706"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1184"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"28191039a0c43c00"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),a(` +`),s("span",{class:"line"})])])],-1)),n[12]||(n[12]=s("h4",{id:"example-2-check-garage-sensor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-2-check-garage-sensor"},[s("span",null,"Example 2: Check Garage Sensor")])],-1)),n[13]||(n[13]=s("p",null,"This example checks the status of a binary sensor to determine whether the car is in the garage. If the car is present, a response is sent confirming its location. If the car is not present, the response states that the car is not in the garage.",-1)),n[14]||(n[14]=s("p",null,[s("img",{src:b,alt:"screenshot"})],-1)),n[15]||(n[15]=s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d140cd86c26cbbe5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"204"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"960"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"c18458aa0fda5201"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c18458aa0fda5201"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is the car in the garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"7"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation.process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"floorId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"labelId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"text\\": \\"is the car in the garage\\"}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"results"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"conversation"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"process"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"462"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"960"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"080f0fda9ce2ebc9"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"080f0fda9ce2ebc9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"output"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.response.speech.plain.speech"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"674"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"960"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"aac0b36dca0c47b4"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is the car in the garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5d205f70b1e41e9f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"is the car in the garage"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Something took to long"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"triggerId"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"220"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1008"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"6a2a0e27afac616e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dd86795094ba553"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5d205f70b1e41e9f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fixed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"940"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1008"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6a2a0e27afac616e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-current-state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"on"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entity_id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"binary_sensor.car_in_garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"blockInputOverrides"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entity_location"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"override_data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"522"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1008"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa724a7fe743faaa"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"30171db069e062f0"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa724a7fe743faaa"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"yes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"pt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"response\\": \\"Yes the car is in the garage\\"}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tot"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"from"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reg"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"770"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1008"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2dd86795094ba553"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30171db069e062f0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"no"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"pt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"response\\": \\"No the car is not in the garage\\"}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tot"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"json"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"from"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reg"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"772"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1056"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2dd86795094ba553"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b4d9680db1056a02"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set car in garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"224"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1056"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"0c940aece619684d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0c940aece619684d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-binary-sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c9ce588e6f25ce5d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"stateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"attributes"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputOverride"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"allow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"496"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1056"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"763df26767e56a92"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"01b6599a0739a237"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"remove car from garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"false"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"254"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1104"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"0c940aece619684d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c9ce588e6f25ce5d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5d205f70b1e41e9f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"car in garage"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"binary_sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"car in garage"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"device_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),a(` +`),s("span",{class:"line"})])])],-1)),n[16]||(n[16]=s("h4",{id:"example-3-play-a-jellyfin-show",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-3-play-a-jellyfin-show"},[s("span",null,"Example 3: Play a Jellyfin Show")])],-1)),n[17]||(n[17]=s("p",null,"This example demonstrates how to use the Sentence node with Home Assistant's conversation integration to play a show from Jellyfin. The flow utilizes dynamic responses to respond with the selected episode.",-1)),s("p",null,[n[2]||(n[2]=a("Full details can be found in the ")),t(c,{to:"/cookbook/play-jellyfin-show-using-sentence-node.html"},{default:o(()=>n[1]||(n[1]=[a("Cookbook")])),_:1}),n[3]||(n[3]=a("."))]),n[18]||(n[18]=s("p",null,[s("img",{src:l,alt:"screenshot"})],-1)),n[19]||(n[19]=s("p",null,[s("img",{src:k,alt:"screenshot"})],-1)),n[20]||(n[20]=s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"13b4618a99045b71"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random MASH episode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dad33ee.42bf5c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"play [a] [random] mash (episode|show)"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponse"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Something went wrong"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2000"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"seriesId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3b264a3b9e602ddc9c9a00a343dd5ce2"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c76c8695549b5bedfc21f48b0664b8329ed2ebde"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"124"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"45d8457d15bfa505"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"41a351cf86e6a70e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random-item"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"input"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mash_episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"flow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"number"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"502"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"7de8f9a16179ad63"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"04f10897f711e88c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set item id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"_itemId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"pt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tot"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dc"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"action"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"from"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"to"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"reg"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"850"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a29f9d7e6a746a9e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a29f9d7e6a746a9e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Session"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GetSessions"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Sessions"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"controllableByUserId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"controllableByUserId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$env(\\"userId\\")"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"activeWithinSeconds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"activeWithinSeconds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"200"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"List of sessions returned."'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"401"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Unauthorized"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"403"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Forbidden"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1010"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"13987ef9a8e0286f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"13987ef9a8e0286f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Session"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Play"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Sessions/{sessionId}/Playing"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"post"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"itemIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"itemIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"required"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"_itemId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"playCommand query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"playCommand"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"required"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"select"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"PlayNow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sessionId path"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sessionId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"required"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.0.Id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"path"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"startPositionTicks query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"startPositionTicks"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mediaSourceId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mediaSourceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"audioStreamIndex query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"audioStreamIndex"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"subtitleStreamIndex query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"subtitleStreamIndex"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"startIndex query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"startIndex"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"204"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Instruction sent to session."'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"401"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Unauthorized"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"403"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Forbidden"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1146"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e47af5331f32c92d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b907d1659b1fb6cc"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Session"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GetSessions"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Sessions"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"controllableByUserId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"controllableByUserId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$env(\\"userId\\")"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"activeWithinSeconds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"activeWithinSeconds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"200"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"List of sessions returned."'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"401"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Unauthorized"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"403"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Forbidden"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"302"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"354"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"21244d4a0ab99de7"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"47b0ace1ee8cc84e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Find device ID"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"115"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"351"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b907d1659b1fb6cc"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"21244d4a0ab99de7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"devices"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload {DeviceName: $.{\\"client\\": Client, \\"deviceId\\": DeviceId}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"468"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"354"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e47af5331f32c92d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"send response back to HA"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dad33ee.42bf5c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"play [a] random mash episode"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"_response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponse"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Something went wrong"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1000"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1050"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7de8f9a16179ad63"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"template"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"format response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"field"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"_response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"fieldType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"format"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"handlebars"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"syntax"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mustache"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"template"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Playing MASH {{payload.seasonName}} Episode {{payload.episodeNumber}}, {{{payload.episodeName}}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"680"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"04f10897f711e88c"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d050c8425ac14d8b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Search"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GetSearchHints"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Search/Hints"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"searchTerm query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"searchTerm"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"required"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"M*A*S*H"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"startIndex query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"startIndex"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"limit query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"limit"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"userId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"userId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeItemTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeItemTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"excludeItemTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"excludeItemTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mediaTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mediaTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parentId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"parentId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isMovie query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isMovie"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isSeries query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isSeries"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isNews query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isNews"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isKids query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isKids"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isSports query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isSports"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includePeople query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includePeople"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeMedia query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeMedia"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeGenres query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeGenres"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeStudios query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeStudios"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeArtists query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeArtists"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"200"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Search hint returned."'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"401"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Unauthorized"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"403"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Forbidden"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"308"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"451"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"63e5998dd3c9dba0"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"87d85ce4c11270d6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Find series ID"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"111"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"448"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"d050c8425ac14d8b"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"63e5998dd3c9dba0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"results"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.SearchHints {Name: $.{\\"seriesId\\": Id, \\"series\\": Series, \\"year\\": ProductionYear, \\"type\\": Type}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"466"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"451"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e286325a4e63d372"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get series episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Items"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GetItems"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Items"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"userId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"userId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$env(\\"userId\\")"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"maxOfficialRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"maxOfficialRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasThemeSong query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasThemeSong"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasThemeVideo query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasThemeVideo"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasSubtitles query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasSubtitles"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasSpecialFeature query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasSpecialFeature"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasTrailer query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasTrailer"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"adjacentTo query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"adjacentTo"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parentIndexNumber query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"parentIndexNumber"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasParentalRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasParentalRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isHd query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isHd"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"is4K query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is4K"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"locationTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"locationTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"excludeLocationTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"excludeLocationTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isMissing query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isMissing"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isUnaired query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isUnaired"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minCommunityRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minCommunityRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minCriticRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minCriticRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minPremiereDate query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minPremiereDate"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minDateLastSaved query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minDateLastSaved"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minDateLastSavedForUser query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minDateLastSavedForUser"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"maxPremiereDate query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"maxPremiereDate"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOverview query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasOverview"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasImdbId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasImdbId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasTmdbId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasTmdbId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasTvdbId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasTvdbId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isMovie query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isMovie"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isSeries query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isSeries"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isNews query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isNews"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isKids query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isKids"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isSports query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isSports"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"excludeItemIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"excludeItemIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"startIndex query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"startIndex"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"limit query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"limit"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"recursive query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"recursive"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"searchTerm query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"searchTerm"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sortOrder query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sortOrder"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"collapsed"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Descending"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parentId query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"parentId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"seriesId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"fields query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fields"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"excludeItemTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"excludeItemTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"includeItemTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"includeItemTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isActive"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Episode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"filters query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"filters"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isFavorite query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isFavorite"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mediaTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mediaTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"imageTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"imageTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sortBy query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sortBy"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"DatePlayed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isPlayed query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isPlayed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"genres query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"genres"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"officialRatings query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"officialRatings"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tags query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"tags"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"years query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"years"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableUserData query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enableUserData"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"imageTypeLimit query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"imageTypeLimit"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableImageTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enableImageTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"person query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"person"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"personIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"personIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"personTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"personTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"studios query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"studios"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"artists query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"artists"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"excludeArtistIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"excludeArtistIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"artistIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"artistIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"albumArtistIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"albumArtistIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"contributingArtistIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"contributingArtistIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"albums query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"albums"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"albumIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"albumIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ids query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ids"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"videoTypes query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"videoTypes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minOfficialRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minOfficialRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isLocked query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isLocked"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"isPlaceHolder query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"isPlaceHolder"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOfficialRating query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"hasOfficialRating"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"collapseBoxSetItems query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"collapseBoxSetItems"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minWidth query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minWidth"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"minHeight query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minHeight"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"maxWidth query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"maxWidth"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"maxHeight query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"maxHeight"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"is3D query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is3D"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"seriesStatus query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"seriesStatus"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"nameStartsWithOrGreater query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"nameStartsWithOrGreater"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"nameStartsWith query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"nameStartsWith"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"nameLessThan query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"nameLessThan"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"studioIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"studioIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"genreIds query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"genreIds"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableTotalRecordCount query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enableTotalRecordCount"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableImages query"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enableImages"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"in"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"query"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"200"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Success"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"401"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Unauthorized"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"403"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Forbidden"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"546"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"57dccb79c1e6b527"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"57dccb79c1e6b527"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"store episodes in flow context"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"const episodes = flow.get(\\"mash_episodes\\") ?? [];\\n// only keep the data we need\\nmsg.payload.Items.forEach((e) => {\\n episodes.push({\\n id: e.Id,\\n episodeNumber: e.IndexNumber,\\n seasonName: e.SeasonName,\\n episodeName: e.Name,\\n }) \\n});\\nflow.set(\\"mash_episodes\\", episodes);\\nreturn msg;"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"794"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b195cd17f0d831f6"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b195cd17f0d831f6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link out"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"return"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"973"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"956492fb58071a3f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link in"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"94"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"ae47bac31c4abf22"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"l"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"45d8457d15bfa505"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"956492fb58071a3f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"330"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"144"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"41a351cf86e6a70e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cf88a7b5365c7c0f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sentence"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"play MASH episode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2dad33ee.42bf5c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeAsEntityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"sentences"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"play mash season {season} episode {episode}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token string"},'"play mash episode {episode}"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"response"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponse"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Something went wrong"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"triggerResponseType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dynamic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseTimeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2000"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"results"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"deviceId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c76c8695549b5bedfc21f48b0664b8329ed2ebde"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"seriesId"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3b264a3b9e602ddc9c9a00a343dd5ce2"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"3936fa1204b55b3f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ae47bac31c4abf22"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"have episode list?"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mash_episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"flow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"rules"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"empty"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"null"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"t"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"else"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"checkall"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repair"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"3"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"326"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e286325a4e63d372"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e286325a4e63d372"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b195cd17f0d831f6"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a87cff07f2f77174"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"find episode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},"\"const episodes = flow.get(\\\"mash_episodes\\\") ?? [];\\nconst episode = convertStringToNumber(msg.payload.entities.episode.value);\\nconst season = convertStringToNumber(msg.payload.entities.season?.value);\\n\\nif (season) {\\n msg.payload = episodes.find(e => e.episodeNumber === episode && e.seasonName === `Season ${season}`);\\n} else { // if season is empty find show by number is aired in series\\n msg.payload = findNthShowAired(episodes, episode);\\n}\\n\\n// episode not found\\nif (!msg.payload) {\\n msg._response = `No episode found for MASH ${season ? `Season ${season}` : ''} Episode ${episode}`;\\n return [null, msg];\\n}\\nreturn msg;\\n\\nfunction findNthShowAired(episodes, nthShow) {\\n if (nthShow <= 0 || nthShow > episodes.length) {\\n return null; // Invalid input or out of range\\n }\\n\\n // Sort episodes by season and episode number to ensure correct airing order\\n const sortedEpisodes = episodes.sort((a, b) => {\\n const seasonA = Number(a.seasonName.replace('Season ', ''));\\n const seasonB = Number(b.seasonName.replace('Season ', ''));\\n\\n if (seasonA === seasonB) {\\n return a.episodeNumber - b.episodeNumber;\\n } else {\\n return seasonA - seasonB;\\n }\\n });\\n\\n return sortedEpisodes[nthShow - 1]; // nthShow is 1-based, array is 0-based\\n}\\n\\nfunction convertStringToNumber(input) {\\n if (input === undefined) return;\\n \\n const numberWords = {\\n 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, \\n 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9, \\n 'ten': 10, 'eleven': 11, 'twelve': 12, 'thirteen': 13, \\n 'fourteen': 14, 'fifteen': 15, 'sixteen': 16, 'seventeen': 17, \\n 'eighteen': 18, 'nineteen': 19, 'twenty': 20\\n };\\n\\n // Check if input is already a numeric string\\n if (!isNaN(input)) {\\n return Number(input);\\n }\\n\\n // Check if the input is a number word\\n const lowerInput = input.toLowerCase().trim();\\n if (lowerInput in numberWords) {\\n return numberWords[lowerInput];\\n }\\n}\""),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"502"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"7de8f9a16179ad63"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e47af5331f32c92d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3936fa1204b55b3f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get episodes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"956492fb58071a3f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"330"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a87cff07f2f77174"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"31e71416c0d8fcd4"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"The deviceId and seriesId will need to be changed in the output properties of the sentence node"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"354"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"96"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dcc480460a475cf8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"openApi-red"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"configUrlNode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9435086ff9117a76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"apiTag"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"User"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"keepAuth"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"operationData"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"GetPublicUsers"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hasOperationId"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"path"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"/Users/Public"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"method"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputStyle"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"each response"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"errorHandling"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"throw exception"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"internalErrors"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"source"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"parameters"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"{"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"requestContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseContentType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"application/json"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseOutputLabels"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"code"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"200"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"text"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Public users returned."'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"responseAsPayload"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugMode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"headers"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"_version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2.1.0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"312"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"513"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"7bfc313b1590bc35"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"3225bc86df87feba"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Find user ID"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"513"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"dcc480460a475cf8"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7bfc313b1590bc35"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"results"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload {Name: Id}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"470"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"513"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"db16886a9eee2c17"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"The user ID will need to be changed in the \\"get series episodes\\""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"686"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"35ebe5b08b627b76"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d728cb91f51ff055"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Edit searchTerm"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"308"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"400"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),a(` +`),s("span",{class:"line"})])])],-1))]),_:1})])}const x=u(f,[["render",h],["__file","sentence.html.vue"]]),w=JSON.parse('{"path":"/node/sentence.html","title":"Sentence","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration Options","slug":"configuration-options","link":"#configuration-options","children":[{"level":3,"title":"Mode","slug":"mode","link":"#mode","children":[]},{"level":3,"title":"Sentences","slug":"sentences","link":"#sentences","children":[]},{"level":3,"title":"Response Type","slug":"response-type","link":"#response-type","children":[]},{"level":3,"title":"Response","slug":"response","link":"#response","children":[]},{"level":3,"title":"Fallback Response","slug":"fallback-response","link":"#fallback-response","children":[]},{"level":3,"title":"Response Timeout","slug":"response-timeout","link":"#response-timeout","children":[]},{"level":3,"title":"Expose As","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"Response","slug":"response-1","link":"#response-1","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[{"level":3,"title":"Basic Usage","slug":"basic-usage","link":"#basic-usage","children":[]},{"level":3,"title":"Dynamic Response Examples","slug":"dynamic-response-examples","link":"#dynamic-response-examples","children":[]}]}],"git":{"updatedTime":1726728365000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":3},{"name":"jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"node/sentence.md"}');export{x as comp,w as data}; diff --git a/assets/sentence_01-v9OGWJZ4.png b/assets/sentence_01-v9OGWJZ4.png new file mode 100644 index 0000000000..d25670cf05 Binary files /dev/null and b/assets/sentence_01-v9OGWJZ4.png differ diff --git a/assets/sentence_dynamic_example_01-CwHPqedV.png b/assets/sentence_dynamic_example_01-CwHPqedV.png new file mode 100644 index 0000000000..b592f9e705 Binary files /dev/null and b/assets/sentence_dynamic_example_01-CwHPqedV.png differ diff --git a/assets/sentence_dynamic_example_02-CdEErjFm.png b/assets/sentence_dynamic_example_02-CdEErjFm.png new file mode 100644 index 0000000000..32006c26b5 Binary files /dev/null and b/assets/sentence_dynamic_example_02-CdEErjFm.png differ diff --git a/assets/starting-flow-after-home-assistant-restart.html-CSlrAA6l.js b/assets/starting-flow-after-home-assistant-restart.html-CSlrAA6l.js new file mode 100644 index 0000000000..3ab46a4c6f --- /dev/null +++ b/assets/starting-flow-after-home-assistant-restart.html-CSlrAA6l.js @@ -0,0 +1,15 @@ +import{_ as n,c as a,e as t,o as p}from"./app-CefLgoES.js";const o="/node-red-contrib-home-assistant-websocket/assets/starting-flow-after-home-assistant-restart_01-BIAF8zjW.png",e="/node-red-contrib-home-assistant-websocket/assets/starting-flow-after-home-assistant-restart_02-BFoj2Y9h.png",u={};function c(r,s){return p(),a("div",null,s[0]||(s[0]=[t('

    Starting a flow after a Home Assistant restart

    Use a Home Assistant automation to set an input boolean to on then from Node-RED check if that input boolean is on after a successful connection or at any time it changes to on.

    screenshot

    [{"id":"fb5296f3c4de2a23","type":"subflow","name":"Create HA Helpers","info":"","category":"HA Actions","in":[{"x":84,"y":96,"wires":[{"id":"fc18bdbb57e2fd63"}]}],"out":[],"env":[{"name":"serverName","type":"str","value":"Home Assistant","ui":{"label":{"en-US":"HA Server Name"},"type":"input","opts":{"types":["str"]}}},{"name":"helpers","type":"json","value":"[]","ui":{"label":{"en-US":"Helpers"},"type":"input","opts":{"types":["json"]}}}],"meta":{},"color":"#46B1EF","status":{"x":246,"y":48,"wires":[{"id":"ea6dc8ad6d9ece17","port":0}]}},{"id":"fc18bdbb57e2fd63","type":"function","z":"fb5296f3c4de2a23","name":"process helpers","func":"const serverName = toCamelCase(env.get('serverName'));\\nconst haServer = global.get(\\"homeassistant\\")[serverName];\\nif(!haServer) {\\n    node.error(\\"Invalid HA server name\\");\\n    return;\\n}\\nconst states = haServer.states;\\nconst helpers = env.get(\\"helpers\\");\\n\\nhelpers.forEach(h => {\\n    const entityId = `${h.type}.${h.id}`;\\n    if(!states[entityId]) {\\n        const {id, type, ...data} = h;\\n        const apiData = {\\n            entity: h,\\n            payload: { \\n                data \\n            }\\n        };\\n        apiData.payload.data.type = `${type}/create`;\\n    \\n        node.send(apiData);\\n        node.status({text: `Creating ${entityId}`});\\n    }\\n});\\n\\nnode.done();\\n\\nfunction toCamelCase(str) {\\n    return str.replace(/(?:^\\\\w|[A-Z]|\\\\b\\\\w|\\\\s+)/g, (match, index) => {\\n        if (+match === 0) return '';\\n        return index === 0 ? match.toLowerCase() : match.toUpperCase();\\n    });\\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":224,"y":96,"wires":[["2b8e82c6d93d38e5"]]},{"id":"2b8e82c6d93d38e5","type":"ha-api","z":"fb5296f3c4de2a23","name":"create helper","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"","dataType":"json","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":390,"y":96,"wires":[["767624d22ee0c819"]]},{"id":"372232586f5e138f","type":"ha-api","z":"fb5296f3c4de2a23","name":"rename helper entity id","server":"","version":1,"debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\t   \\"type\\":\\"config/entity_registry/update\\",\\t   \\"entity_id\\": entity.type & \\".\\" & payload.id,\\t   \\"new_entity_id\\": entity.type & \\".\\" & entity.id\\t}","dataType":"jsonata","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":788,"y":96,"wires":[[]]},{"id":"767624d22ee0c819","type":"switch","z":"fb5296f3c4de2a23","name":"need to rename?","property":"payload.id","propertyType":"msg","rules":[{"t":"neq","v":"entity.id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":570,"y":96,"wires":[["372232586f5e138f","815fe31e9d239e53"]]},{"id":"ea6dc8ad6d9ece17","type":"status","z":"fb5296f3c4de2a23","name":"","scope":["fc18bdbb57e2fd63","815fe31e9d239e53"],"x":124,"y":48,"wires":[[]]},{"id":"815fe31e9d239e53","type":"function","z":"fb5296f3c4de2a23","name":"rename status","func":"const oldEntityId = `${msg.entity.type}.${msg.payload.id}`;\\nconst newEntityId = `${msg.entity.type}.${msg.entity.id}`;\\n\\nnode.status({text: `Renaming ${oldEntityId} to ${newEntityId}`});","outputs":1,"noerr":0,"initialize":"","finalize":"","x":768,"y":144,"wires":[[]]},{"id":"4a91394f75614da1","type":"server-events","z":"8e0ea5b84a1a9a3a","name":"","server":"","version":1,"event_type":"home_assistant_client","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"}],"x":200,"y":320,"wires":[["95e9d47ed2be5007"]]},{"id":"95e9d47ed2be5007","type":"switch","z":"8e0ea5b84a1a9a3a","name":"running?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"running","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":412,"y":320,"wires":[["4b7a32290de02cf7"]]},{"id":"648dd9ac108befdc","type":"api-call-service","z":"8e0ea5b84a1a9a3a","name":"","server":"","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.home_assistant_restarted","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":808,"y":320,"wires":[["3754cbf709193071"]]},{"id":"4b7a32290de02cf7","type":"api-current-state","z":"8e0ea5b84a1a9a3a","name":"has restarted?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.home_assistant_restarted","state_type":"str","blockInputOverrides":false,"outputProperties":[],"x":576,"y":320,"wires":[["648dd9ac108befdc"],[]]},{"id":"f89ae68a99bb4e65","type":"server-state-changed","z":"8e0ea5b84a1a9a3a","name":"restarted?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.home_assistant_restarted","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":588,"y":368,"wires":[["648dd9ac108befdc"],[]]},{"id":"b5993f580d9eb5b8","type":"comment","z":"8e0ea5b84a1a9a3a","name":"Home Assistant Restarted","info":"","x":190,"y":224,"wires":[]},{"id":"3754cbf709193071","type":"link out","z":"8e0ea5b84a1a9a3a","name":"Home Assistant Restarted","links":["c67631f89e6451f4"],"x":1070,"y":320,"wires":[],"l":true},{"id":"c67631f89e6451f4","type":"link in","z":"8e0ea5b84a1a9a3a","name":"Home Assistant Restarted","links":["3754cbf709193071"],"x":190,"y":416,"wires":[["33ccbe3fca679b80"]],"l":true},{"id":"33ccbe3fca679b80","type":"debug","z":"8e0ea5b84a1a9a3a","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":412,"y":416,"wires":[]},{"id":"bcfea616e335904d","type":"inject","z":"8e0ea5b84a1a9a3a","name":"Click to create","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":166,"y":272,"wires":[["447721875af4431a","5a92fd8241edd308"]]},{"id":"447721875af4431a","type":"ha-api","z":"8e0ea5b84a1a9a3a","name":"HA automation","server":"","version":1,"debugenabled":false,"protocol":"http","method":"post","path":"/api/config/automation/config/nrrestartnotification","data":"{\\t   \\"alias\\": \\"Home Assistant Restart\\",\\t   \\"description\\": \\"\\",\\t   \\"trigger\\": [\\t       {\\t           \\"platform\\": \\"homeassistant\\",\\t           \\"event\\": \\"start\\"       \\t       }    \\t   ],\\t   \\"condition\\": [],\\t   \\"action\\": [\\t       {\\t           \\"service\\": \\"input_boolean.turn_on\\",\\t           \\"data\\": {\\t               \\"entity_id\\": \\"input_boolean.home_assistant_restarted\\"       \\t            }\\t       }    \\t   ],\\t   \\"mode\\": \\"single\\" \\t}","dataType":"jsonata","responseType":"json","outputProperties":[],"x":432,"y":224,"wires":[[]]},{"id":"5a92fd8241edd308","type":"subflow:fb5296f3c4de2a23","z":"8e0ea5b84a1a9a3a","name":"","env":[{"name":"helpers","value":"[{\\"id\\":\\"home_assistant_restarted\\",\\"type\\":\\"input_boolean\\",\\"name\\":\\"Home Assistant Restarted\\",\\"icon\\":\\"mdi:restart-alert\\"}]","type":"json"}],"x":442,"y":272,"wires":[]}]\n

    Tips

    The input boolean and automation can be created directly from Node-RED using the inject node found in the exported flow.

    Create an input boolean using the Helpers menu (Configuration -> Helpers)

    screenshot

    input_boolean:
    +  home_assistant_restarted:
    +    name: Home Assistant Restarted
    +

    Create the Home Assistant automation

    alias: Home Assistant Restart
    +description: ""
    +trigger:
    +  - platform: homeassistant
    +    event: start
    +condition: []
    +action:
    +  - service: input_boolean.turn_on
    +    data: {}
    +    entity_id: input_boolean.home_assistant_restarted
    +mode: single
    +
    `,10)]))}const k=n(u,[["render",c],["__file","starting-flow-after-home-assistant-restart.html.vue"]]),i=JSON.parse('{"path":"/cookbook/starting-flow-after-home-assistant-restart.html","title":"Starting a flow after a Home Assistant restart","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Create an input boolean using the Helpers menu (Configuration -> Helpers)","slug":"create-an-input-boolean-using-the-helpers-menu-configuration-helpers","link":"#create-an-input-boolean-using-the-helpers-menu-configuration-helpers","children":[]},{"level":2,"title":"Create the Home Assistant automation","slug":"create-the-home-assistant-automation","link":"#create-the-home-assistant-automation","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":3}]},"filePathRelative":"cookbook/starting-flow-after-home-assistant-restart.md"}');export{k as comp,i as data}; diff --git a/assets/starting-flow-after-home-assistant-restart_01-BIAF8zjW.png b/assets/starting-flow-after-home-assistant-restart_01-BIAF8zjW.png new file mode 100644 index 0000000000..7cd95122e6 Binary files /dev/null and b/assets/starting-flow-after-home-assistant-restart_01-BIAF8zjW.png differ diff --git a/assets/starting-flow-after-home-assistant-restart_02-BFoj2Y9h.png b/assets/starting-flow-after-home-assistant-restart_02-BFoj2Y9h.png new file mode 100644 index 0000000000..fe2a0ae109 Binary files /dev/null and b/assets/starting-flow-after-home-assistant-restart_02-BFoj2Y9h.png differ diff --git a/assets/style-C4hsAa6E.css b/assets/style-C4hsAa6E.css new file mode 100644 index 0000000000..b32f94e37f --- /dev/null +++ b/assets/style-C4hsAa6E.css @@ -0,0 +1 @@ +.vp-back-to-top-button{position:fixed!important;inset-inline-end:1rem;bottom:4rem;z-index:100;width:48px;height:48px;padding:12px;border-width:0;border-radius:50%;background:var(--back-to-top-c-bg);color:var(--back-to-top-c-accent-bg);box-shadow:2px 2px 10px 4px var(--back-to-top-c-shadow);cursor:pointer}@media (max-width: 959px){.vp-back-to-top-button{transform:scale(.8);transform-origin:100% 100%}}@media print{.vp-back-to-top-button{display:none}}.vp-back-to-top-button:hover{color:var(--back-to-top-c-accent-hover)}.vp-back-to-top-button .back-to-top-icon{overflow:hidden;width:24px;height:24px;margin:0 auto;background:var(--back-to-top-c-icon);-webkit-mask-image:var(--back-to-top-icon);mask-image:var(--back-to-top-icon);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:cover;mask-size:cover}.vp-scroll-progress{position:absolute;right:-2px;bottom:-2px;width:52px;height:52px}.vp-scroll-progress svg{width:100%;height:100%}.vp-scroll-progress circle{opacity:.9;transform:rotate(-90deg);transform-origin:50% 50%}.back-to-top-enter-active,.back-to-top-leave-active{transition:opacity .3s}.back-to-top-enter-from,.back-to-top-leave-to{opacity:0}:root{--back-to-top-z-index: 5;--back-to-top-icon: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='4'%20d='M24.008%2014.1V42M12%2026l12-12l12%2012M12%206h24'%20/%3e%3c/svg%3e");--back-to-top-c-bg: var(--vp-c-bg);--back-to-top-c-accent-bg: var(--vp-c-accent-bg);--back-to-top-c-accent-hover: var(--vp-c-accent-hover);--back-to-top-c-shadow: var(--vp-c-shadow);--back-to-top-c-icon: currentcolor}.hint-container{position:relative;border-color:var(--hint-c-accent);background:var(--hint-c-soft);transition:background var(--vp-t-color),border-color var(--vp-t-color),color var(--vp-t-color)}@media print{.hint-container{page-break-inside:avoid}}.hint-container>.hint-container-title{color:var(--hint-c-title)}.hint-container :not(pre)>code{background:var(--hint-c-soft)}.hint-container .hint-container-title{position:relative;margin-block:.75em;font-weight:600;line-height:1.25}.hint-container.important,.hint-container.info,.hint-container.note,.hint-container.tip,.hint-container.warning,.hint-container.caution{margin:.85rem 0;padding:.25rem 1rem;border-inline-start-width:.3rem;border-inline-start-style:solid;border-radius:.5rem;color:inherit}@media (max-width: 419px){.hint-container.important,.hint-container.info,.hint-container.note,.hint-container.tip,.hint-container.warning,.hint-container.caution{margin-inline:-.75rem}}.hint-container.important .hint-container-title,.hint-container.info .hint-container-title,.hint-container.note .hint-container-title,.hint-container.tip .hint-container-title,.hint-container.warning .hint-container-title,.hint-container.caution .hint-container-title{padding-inline-start:1.75rem}@media print{.hint-container.important .hint-container-title,.hint-container.info .hint-container-title,.hint-container.note .hint-container-title,.hint-container.tip .hint-container-title,.hint-container.warning .hint-container-title,.hint-container.caution .hint-container-title{padding-inline-start:0}}.hint-container.important .hint-container-title:before,.hint-container.info .hint-container-title:before,.hint-container.note .hint-container-title:before,.hint-container.tip .hint-container-title:before,.hint-container.warning .hint-container-title:before,.hint-container.caution .hint-container-title:before{content:" ";position:absolute;inset-inline-start:0;top:calc(50% - .6125em);width:1.25em;height:1.25em;font-size:1.25em}@media print{.hint-container.important .hint-container-title:before,.hint-container.info .hint-container-title:before,.hint-container.note .hint-container-title:before,.hint-container.tip .hint-container-title:before,.hint-container.warning .hint-container-title:before,.hint-container.caution .hint-container-title:before{display:none}}.hint-container.important p,.hint-container.info p,.hint-container.note p,.hint-container.tip p,.hint-container.warning p,.hint-container.caution p{line-height:1.5}.hint-container.important a,.hint-container.info a,.hint-container.note a,.hint-container.tip a,.hint-container.warning a,.hint-container.caution a{color:var(--vp-c-accent)}.hint-container.important{--hint-c-accent: var(--important-c-accent);--hint-c-title: var(--important-c-text);--hint-c-soft: var(--important-c-soft)}.hint-container.important>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M512 981.333a84.992 84.992 0 0 1-84.907-84.906h169.814A84.992 84.992 0 0 1 512 981.333zm384-128H128v-42.666l85.333-85.334v-256A298.325 298.325 0 0 1 448 177.92V128a64 64 0 0 1 128 0v49.92a298.325 298.325 0 0 1 234.667 291.413v256L896 810.667v42.666zm-426.667-256v85.334h85.334v-85.334h-85.334zm0-256V512h85.334V341.333h-85.334z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M512 981.333a84.992 84.992 0 0 1-84.907-84.906h169.814A84.992 84.992 0 0 1 512 981.333zm384-128H128v-42.666l85.333-85.334v-256A298.325 298.325 0 0 1 448 177.92V128a64 64 0 0 1 128 0v49.92a298.325 298.325 0 0 1 234.667 291.413v256L896 810.667v42.666zm-426.667-256v85.334h85.334v-85.334h-85.334zm0-256V512h85.334V341.333h-85.334z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.info{--hint-c-accent: var(--info-c-accent);--hint-c-title: var(--info-c-text);--hint-c-soft: var(--info-c-soft)}.hint-container.info>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.note{--hint-c-accent: var(--note-c-accent);--hint-c-title: var(--note-c-text);--hint-c-soft: var(--note-c-soft)}.hint-container.note>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.tip{--hint-c-accent: var(--tip-c-accent);--hint-c-title: var(--tip-c-text);--hint-c-soft: var(--tip-c-soft)}.hint-container.tip>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.941 18c-.297-1.273-1.637-2.314-2.187-3a8 8 0 1 1 12.49.002c-.55.685-1.888 1.726-2.185 2.998H7.94zM16 20v1a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-1h8zm-3-9.995V6l-4.5 6.005H11v4l4.5-6H13z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.941 18c-.297-1.273-1.637-2.314-2.187-3a8 8 0 1 1 12.49.002c-.55.685-1.888 1.726-2.185 2.998H7.94zM16 20v1a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-1h8zm-3-9.995V6l-4.5 6.005H11v4l4.5-6H13z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.warning{--hint-c-accent: var(--warning-c-accent);--hint-c-title: var(--warning-c-text);--hint-c-soft: var(--warning-c-soft)}.hint-container.warning>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M576.286 752.57v-95.425q0-7.031-4.771-11.802t-11.3-4.772h-96.43q-6.528 0-11.3 4.772t-4.77 11.802v95.424q0 7.031 4.77 11.803t11.3 4.77h96.43q6.528 0 11.3-4.77t4.77-11.803zm-1.005-187.836 9.04-230.524q0-6.027-5.022-9.543-6.529-5.524-12.053-5.524H456.754q-5.524 0-12.053 5.524-5.022 3.516-5.022 10.547l8.538 229.52q0 5.023 5.022 8.287t12.053 3.265h92.913q7.032 0 11.803-3.265t5.273-8.287zM568.25 95.65l385.714 707.142q17.578 31.641-1.004 63.282-8.538 14.564-23.354 23.102t-31.892 8.538H126.286q-17.076 0-31.892-8.538T71.04 866.074q-18.582-31.641-1.004-63.282L455.75 95.65q8.538-15.57 23.605-24.61T512 62t32.645 9.04 23.605 24.61z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M576.286 752.57v-95.425q0-7.031-4.771-11.802t-11.3-4.772h-96.43q-6.528 0-11.3 4.772t-4.77 11.802v95.424q0 7.031 4.77 11.803t11.3 4.77h96.43q6.528 0 11.3-4.77t4.77-11.803zm-1.005-187.836 9.04-230.524q0-6.027-5.022-9.543-6.529-5.524-12.053-5.524H456.754q-5.524 0-12.053 5.524-5.022 3.516-5.022 10.547l8.538 229.52q0 5.023 5.022 8.287t12.053 3.265h92.913q7.032 0 11.803-3.265t5.273-8.287zM568.25 95.65l385.714 707.142q17.578 31.641-1.004 63.282-8.538 14.564-23.354 23.102t-31.892 8.538H126.286q-17.076 0-31.892-8.538T71.04 866.074q-18.582-31.641-1.004-63.282L455.75 95.65q8.538-15.57 23.605-24.61T512 62t32.645 9.04 23.605 24.61z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.caution{--hint-c-accent: var(--caution-c-accent);--hint-c-title: var(--caution-c-text);--hint-c-soft: var(--caution-c-soft)}.hint-container.caution>.hint-container-title:before{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c5.523 0 10 4.477 10 10v3.764a2 2 0 0 1-1.106 1.789L18 19v1a3 3 0 0 1-2.824 2.995L14.95 23a2.5 2.5 0 0 0 .044-.33L15 22.5V22a2 2 0 0 0-1.85-1.995L13 20h-2a2 2 0 0 0-1.995 1.85L9 22v.5c0 .171.017.339.05.5H9a3 3 0 0 1-3-3v-1l-2.894-1.447A2 2 0 0 1 2 15.763V12C2 6.477 6.477 2 12 2zm-4 9a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c5.523 0 10 4.477 10 10v3.764a2 2 0 0 1-1.106 1.789L18 19v1a3 3 0 0 1-2.824 2.995L14.95 23a2.5 2.5 0 0 0 .044-.33L15 22.5V22a2 2 0 0 0-1.85-1.995L13 20h-2a2 2 0 0 0-1.995 1.85L9 22v.5c0 .171.017.339.05.5H9a3 3 0 0 1-3-3v-1l-2.894-1.447A2 2 0 0 1 2 15.763V12C2 6.477 6.477 2 12 2zm-4 9a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hint-container.details{position:relative;display:block;margin:1rem 0;padding:1.5rem;border-radius:.5rem;background:var(--detail-c-bg);transition:background var(--vp-t-transform),color var(--vp-t-transform)}@media (max-width: 419px){.hint-container.details{margin-inline:-.75rem}}.hint-container.details h4{margin-top:0}.hint-container.details figure:last-child,.hint-container.details p:last-child{margin-bottom:0;padding-bottom:0}.hint-container.details a{color:var(--vp-c-accent)}.hint-container.details :not(pre)>code{background:var(--detail-c-soft)}.hint-container.details summary{position:relative;margin:-1.5rem;padding-block:1.5rem;padding-inline:4rem 1.5rem;list-style:none;cursor:pointer}.hint-container.details summary::-webkit-details-marker{display:none}.hint-container.details summary::marker{color:#0000;font-size:0}.hint-container.details summary:before,.hint-container.details summary:after{content:" ";position:absolute;inset-inline-start:1.5rem;top:calc(50% - .75rem);width:1.5rem;height:1.5rem;font-size:1.5rem}.hint-container.details summary:before{border-radius:50%;background:var(--detail-c-icon);transition:background var(--vp-t-color),transform var(--vp-t-transform)}.hint-container.details summary:after{background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;line-height:normal;transition:transform var(--vp-t-transform);transform:rotate(90deg)}.hint-container.details[open]>summary{margin-bottom:.5em}.hint-container.details[open]>summary:after{transform:rotate(180deg)}:root{--important-c-accent: var(--vp-c-purple-bg);--important-c-text: var(--vp-c-purple-text);--important-c-soft: var(--vp-c-purple-soft);--info-c-accent: var(--vp-c-blue-bg);--info-c-text: var(--vp-c-blue-text);--info-c-soft: var(--vp-c-blue-soft);--note-c-accent: var(--vp-c-grey-bg);--note-c-text: var(--vp-c-grey-text);--note-c-soft: var(--vp-c-grey-soft);--tip-c-accent: var(--vp-c-green-bg);--tip-c-text: var(--vp-c-green-text);--tip-c-soft: var(--vp-c-green-soft);--warning-c-accent: var(--vp-c-yellow-bg);--warning-c-text: var(--vp-c-yellow-text);--warning-c-soft: var(--vp-c-yellow-soft);--caution-c-accent: var(--vp-c-red-bg);--caution-c-text: var(--vp-c-red-text);--caution-c-soft: var(--vp-c-red-soft);--detail-c-bg: var(--vp-c-control);--detail-c-icon: var(--vp-c-border);--detail-c-soft: var(--vp-c-grey-soft)}:root{--medium-zoom-z-index: 100;--medium-zoom-c-bg: var(--vp-c-bg-elv, #fff);--medium-zoom-opacity: 1}.medium-zoom-overlay{z-index:var(--medium-zoom-z-index);background-color:var(--medium-zoom-c-bg)!important}.medium-zoom-overlay~img{z-index:calc(var(--medium-zoom-z-index) + 1)}.medium-zoom--opened .medium-zoom-overlay{opacity:var(--medium-zoom-opacity)}:root{--nprogress-c: var(--vp-c-accent);--nprogress-z-index: 1031}#nprogress{pointer-events:none}#nprogress .bar{position:fixed;top:0;left:0;z-index:var(--nprogress-z-index);width:100%;height:2px;background:var(--nprogress-c)}.vp-code-tabs-nav{overflow-x:auto;margin:.75rem 0 -.75rem;padding:0;border-radius:6px 6px 0 0;background:var(--code-tabs-c-bg);list-style:none;white-space:nowrap;transition:background var(--vp-t-color)}@media print{.vp-code-tabs-nav{display:none}}@media (max-width: 419px){.vp-code-tabs-nav{margin-inline:-1.5rem;border-radius:0}}.vp-code-tab-nav{position:relative;min-width:3rem;margin:0;padding:6px 12px;border-width:0;border-radius:6px 6px 0 0;background:#0000;color:var(--code-tabs-c-text);font-weight:600;font-size:.875em;line-height:1.4;cursor:pointer;transition:background var(--vp-t-color),color var(--vp-t-color)}.vp-code-tab-nav:hover{background:var(--code-tabs-c-hover)}.vp-code-tab-nav:before,.vp-code-tab-nav:after{content:" ";position:absolute;bottom:0;z-index:1;width:6px;height:6px}.vp-code-tab-nav:before{right:100%}.vp-code-tab-nav:after{left:100%}.vp-code-tab-nav.active{background:var(--code-c-bg)}.vp-code-tab-nav.active:before{background:radial-gradient(12px at left top,transparent 50%,var(--code-c-bg) 50%)}.vp-code-tab-nav.active:after{background:radial-gradient(12px at right top,transparent 50%,var(--code-c-bg) 50%)}.vp-code-tab-nav:first-child:before{display:none}[dir=rtl] .vp-code-tab-nav:first-child:before{display:block}[dir=rtl] .vp-code-tab-nav:first-child:after{display:none}.vp-code-tab{display:none}@media print{.vp-code-tab{display:block}}.vp-code-tab.active{display:block}.vp-code-tab div[class*=language-]{border-top-left-radius:0;border-top-right-radius:0}@media (max-width: 419px){.vp-code-tab div[class*=language-]{margin:.75rem -1.5rem;border-radius:0}}.vp-code-tab div[class*=language-].line-numbers-mode:after{border-top-left-radius:0}.vp-code-tab div[class*=language-] pre{border-top-left-radius:0;border-top-right-radius:0}@media (max-width: 419px){.vp-code-tab div[class*=language-] pre{border-radius:0}}@media print{.vp-code-tab div[class*=language-] code{white-space:pre-wrap}}.vp-code-tab-title{display:none;font-weight:500}@media print{.vp-code-tab-title{display:block}}.vp-tabs{margin:1.5rem 0;border:1px solid var(--vp-c-border);border-radius:8px}@media (max-width: 419px){[vp-content]>.vp-tabs{margin-inline:-1.5rem;border:none;border-bottom:1px solid var(--vp-c-border);border-radius:0}}.vp-tabs-nav{overflow-x:auto;margin:0;padding:0;border-radius:.5rem .5rem 0 0;background:var(--tab-c-bg-nav);list-style:none;white-space:nowrap;transition:background var(--vp-t-color)}@media print{.vp-tabs-nav{display:none}}@media (max-width: 419px){.vp-tabs-nav{border-radius:0}}.vp-tab-nav{position:relative;min-width:4rem;margin:0;padding:.5em 1em;border:none;border-radius:.5rem .5rem 0 0;background:#0000;color:var(--tab-c-nav);font-weight:600;font-size:.875em;line-height:1.75;cursor:pointer;transition:background var(--vp-t-color),color var(--vp-t-color)}.vp-tab-nav:hover{background:var(--tab-c-bg-nav-hover)}.vp-tab-nav:before,.vp-tab-nav:after{content:" ";position:absolute;bottom:0;z-index:1;width:8px;height:8px}.vp-tab-nav:before{right:100%}.vp-tab-nav:after{left:100%}.vp-tab-nav.active{background:var(--tab-c-bg)}.vp-tab-nav.active:before{background:radial-gradient(16px at left top,transparent 50%,var(--tab-c-bg) 50%)}.vp-tab-nav.active:after{background:radial-gradient(16px at right top,transparent 50%,var(--tab-c-bg) 50%)}.vp-tab-nav:first-child:before{display:none}.vp-tab{display:none;padding:1rem .75rem;border-radius:0 0 .5rem .5rem;background:var(--tab-c-bg);transition:background var(--vp-t-color)}@media print{.vp-tab{display:block;padding:.5rem}}.vp-tab.active{display:block}.vp-tab:nth-child(n+2) .vp-tab-title{border-top:none}.vp-tab-title{display:none;padding:.25rem 0;border-top:1px solid var(--vp-c-border);font-weight:500}@media print{.vp-tab-title{display:block}}:root{--code-tabs-c-text: var(--code-c-text);--code-tabs-c-bg: var(--code-c-highlight-bg);--code-tabs-c-hover: var(--code-c-bg);--tab-c-bg: var(--vp-c-bg);--tab-c-nav: var(--vp-c-text);--tab-c-bg-nav: var(--vp-c-grey-bg);--tab-c-bg-nav-hover: var(--vp-c-control-hover)}.vp-badge{display:inline-block;vertical-align:top;height:18px;padding:0 6px;border-radius:3px;background:var(--vp-c-accent-soft);color:var(--vp-c-accent);font-size:14px;line-height:18px;transition:background var(--vp-t-color),color var(--vp-t-color)}.vp-badge+.vp-badge{margin-inline-start:5px}.vp-badge.tip{background:var(--badge-c-tip-bg);color:var(--badge-c-tip-text)}.vp-badge.warning{background:var(--badge-c-warning-bg);color:var(--badge-c-warning-text)}.vp-badge.danger{background:var(--badge-c-danger-bg);color:var(--badge-c-danger-text)}.vp-badge.important{background:var(--badge-c-important-bg);color:var(--badge-c-important-text)}.vp-badge.info{background:var(--badge-c-info-bg);color:var(--badge-c-info-text)}.vp-badge.note{background:var(--badge-c-note-bg);color:var(--badge-c-note-text)}.vp-features{display:flex;flex-wrap:wrap;place-content:stretch space-between;align-items:flex-start;margin-top:2.5rem;padding:1.2rem 0;border-top:1px solid var(--vp-c-gutter);transition:border-color var(--vp-t-color)}@media (max-width: 719px){.vp-features{flex-direction:column}}.vp-feature{flex-grow:1;flex-basis:30%;max-width:30%}@media (max-width: 719px){.vp-feature{max-width:100%;padding:0 2.5rem}}.vp-feature h2{padding-bottom:0;border-bottom:none;font-weight:500;font-size:1.4rem}@media (max-width: 419px){.vp-feature h2{font-size:1.25rem}}.vp-feature p{color:var(--vp-c-text-mute)}.vp-footer{padding:2.5rem;border-top:1px solid var(--vp-c-border);color:var(--vp-c-text-mute);text-align:center;transition:border-color var(--vp-t-color)}.vp-hero{text-align:center}.vp-hero-image{display:block;max-width:100%;max-height:280px;margin:3rem auto 1.5rem}@media (max-width: 419px){.vp-hero-image{max-height:210px;margin:2rem auto 1.2rem}}#main-title{font-size:3rem}@media (max-width: 419px){#main-title{font-size:2rem}}#main-title,.vp-hero-description,.vp-hero-actions{margin:1.8rem auto}@media (max-width: 419px){#main-title,.vp-hero-description,.vp-hero-actions{margin:1.2rem auto}}.vp-hero-actions{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}.vp-hero-description{max-width:35rem;color:var(--vp-c-text-mute);font-size:1.6rem;line-height:1.3}@media (max-width: 419px){.vp-hero-description{font-size:1.2rem}}.vp-hero-action-button{display:inline-block;box-sizing:border-box;padding:.8rem 1.6rem;border:2px solid var(--vp-c-accent-bg);border-radius:4px;background-color:var(--vp-c-bg);color:var(--vp-c-accent);font-size:1.2rem;transition:background-color border-color color var(--vp-t-color)}@media (max-width: 419px){.vp-hero-action-button{padding:.6rem 1.2rem;font-size:1rem}}.vp-hero-action-button:hover{color:var(--vp-c-accent-text)}.vp-hero-action-button.primary{background-color:var(--vp-c-accent-bg);color:var(--vp-c-accent-text)}.vp-hero-action-button.primary:hover{border-color:var(--vp-c-accent-hover);background-color:var(--vp-c-accent-hover)}.vp-home{display:block;max-width:var(--homepage-width);margin:0 auto;padding:var(--navbar-height) 2rem 0}@media (max-width: 419px){.vp-home{padding-right:1.5rem;padding-left:1.5rem}}.vp-home .theme-default-content{margin:0;padding:0}.vp-site-logo{vertical-align:top;height:var(--navbar-line-height);margin-right:var(--navbar-padding-v)}.vp-site-name{position:relative;color:var(--vp-c-text);font-weight:600;font-size:1.3rem}@media screen and (max-width: 719px){.vp-site-name{display:block;overflow:hidden;width:calc(100vw - 11rem);text-overflow:ellipsis;white-space:nowrap}}.vp-dropdown-enter-from,.vp-dropdown-leave-to{height:0!important}.vp-navbar-dropdown-wrapper{cursor:pointer}.vp-navbar-dropdown-wrapper:not(.mobile){height:1.8rem}.vp-navbar-dropdown-wrapper:not(.mobile):hover .vp-navbar-dropdown,.vp-navbar-dropdown-wrapper:not(.mobile).open .vp-navbar-dropdown{display:block!important}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown{overflow:hidden;transition:height .1s ease-out;padding-top:.5rem}.vp-navbar-dropdown-wrapper:not(.mobile) .vp-navbar-dropdown{position:absolute;top:100%;right:0;display:none;overflow-y:auto;box-sizing:border-box;height:auto!important;max-height:calc(100vh - 2.7rem);margin:0;padding:.6rem 0;border:1px solid var(--vp-c-gutter);border-radius:.5rem;background-color:var(--vp-c-bg-elv);text-align:left;white-space:nowrap}.vp-navbar-dropdown-title{display:block;padding:inherit;border:none;background:transparent;color:var(--vp-c-text);font-weight:500;font-size:.9rem;font-family:inherit;line-height:1.4rem;cursor:inherit}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown-title{display:none}.vp-navbar-dropdown-title:hover{border-color:transparent}.vp-navbar-dropdown-title-mobile{display:none;padding:inherit;border:none;background:transparent;color:var(--vp-c-text);font-weight:600;font-size:inherit;font-family:inherit;line-height:1.4rem;cursor:inherit}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown-title-mobile{display:block}.vp-navbar-dropdown-title-mobile:hover{color:var(--vp-c-accent)}.vp-navbar-dropdown-item{color:inherit;line-height:1.7rem}.vp-navbar-dropdown-item a{position:relative;display:block;margin-bottom:0;padding:0 1.5rem 0 1.25rem;border-bottom:none;font-weight:400;line-height:1.7rem}.vp-navbar-dropdown-item a:hover,.vp-navbar-dropdown-item a.route-link-active{color:var(--vp-c-accent)}.vp-navbar-dropdown-item a.route-link-active:after{content:"";position:absolute;top:calc(50% - 2px);left:9px;width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;border-left:5px solid var(--vp-c-accent)}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown-item>a{font-size:15px;line-height:2rem}.vp-navbar-dropdown-subtitle{margin:.45rem 0 0;padding:1rem 0 .45rem;border-top:1px solid var(--vp-c-gutter);font-size:.9rem}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown-subtitle{margin-top:0;padding-top:0;padding-bottom:0;border-top:0;font-size:15px;line-height:2rem}.vp-navbar-dropdown-item:first-child .vp-navbar-dropdown-subtitle{margin-top:0;padding-top:0;border-top:0}.vp-navbar-dropdown-subtitle>span{padding:0 1.5rem 0 1.25rem}.vp-navbar-dropdown-subtitle>a{font-weight:inherit}.vp-navbar-dropdown-subtitle>a.route-link-active:after{display:none}.vp-navbar-dropdown-subitem-wrapper{padding:0;list-style:none}.vp-navbar-dropdown-subitem{font-size:.9em}.vp-navbar-dropdown-wrapper.mobile .vp-navbar-dropdown-subitem{padding-left:1rem;font-size:14px}.vp-navbar-items{display:inline-block}@media print{.vp-navbar-items{display:none}}.vp-navbar-items a{display:inline-block;color:inherit;line-height:1.4rem}.vp-navbar-items a:hover,.vp-navbar-items a.route-link-active{color:var(--vp-c-text)}.vp-navbar-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:var(--navbar-line-height)}@media (max-width: 719px){.vp-navbar-item{margin-left:0}}.vp-navbar-item:first-child{margin-left:0}.vp-navbar-item a:hover,.vp-navbar-item a.route-link-active{color:var(--vp-c-accent)}.vp-navbar-item>a:hover,.vp-navbar-item>a.route-link-active{margin-bottom:-2px;border-bottom:2px solid var(--vp-c-accent)}@media (max-width: 719px){.vp-navbar-item>a:hover,.vp-navbar-item>a.route-link-active{margin-bottom:0;border-bottom:none}}.vp-toggle-color-mode-button{display:flex;margin:auto;margin-left:1rem;border:0;background:none;color:var(--vp-c-text);opacity:.8;cursor:pointer}@media print{.vp-toggle-color-mode-button{display:none}}.vp-toggle-color-mode-button:hover{opacity:1}.vp-toggle-color-mode-button .light-icon,.vp-toggle-color-mode-button .dark-icon{width:1.25rem;height:1.25rem}.vp-toggle-sidebar-button{position:absolute;top:.6rem;left:1rem;display:none;padding:.6rem;cursor:pointer}@media screen and (max-width: 719px){.vp-toggle-sidebar-button{display:block}}.vp-toggle-sidebar-button .icon{display:flex;flex-direction:column;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:inherit}.vp-toggle-sidebar-button .icon span{display:inline-block;width:100%;height:2px;border-radius:2px;background-color:var(--vp-c-text);transition:transform var(--vp-t-transform)}.vp-toggle-sidebar-button .icon span:nth-child(2){margin:6px 0}.vp-theme-container.sidebar-open .vp-toggle-sidebar-button .icon span:nth-child(1){transform:rotate(45deg) translate3d(5.5px,5.5px,0)}.vp-theme-container.sidebar-open .vp-toggle-sidebar-button .icon span:nth-child(2){transform:scale3d(0,1,1)}.vp-theme-container.sidebar-open .vp-toggle-sidebar-button .icon span:nth-child(3){transform:rotate(-45deg) translate3d(6px,-6px,0)}.vp-theme-container.sidebar-open .vp-toggle-sidebar-button .icon span:nth-child(1),.vp-theme-container.sidebar-open .vp-toggle-sidebar-button .icon span:nth-child(3){transform-origin:center}.vp-navbar{--navbar-line-height: calc( var(--navbar-height) - 2 * var(--navbar-padding-v) );position:fixed;top:0;right:0;left:0;z-index:20;box-sizing:border-box;height:var(--navbar-height);padding:var(--navbar-padding-v) var(--navbar-padding-h);border-bottom:1px solid var(--vp-c-border);background-color:var(--vp-navbar-c-bg);line-height:var(--navbar-line-height);transition:background-color var(--vp-t-color),border-color var(--vp-t-color)}@media screen and (max-width: 719px){.vp-navbar{padding-left:4rem}}.vp-navbar-items-wrapper{position:absolute;top:var(--navbar-padding-v);right:var(--navbar-padding-h);display:flex;box-sizing:border-box;height:var(--navbar-line-height);padding-left:var(--navbar-padding-h);font-size:.9rem;white-space:nowrap}.vp-page-meta{max-width:var(--content-width);margin:0 auto;padding:.75rem 2.5rem;display:flex;flex-wrap:wrap;justify-content:space-between;overflow:auto}@media (max-width: 959px){.vp-page-meta{padding:2rem}}@media (max-width: 419px){.vp-page-meta{padding:1.5rem}}@media print{.vp-page-meta{margin:0!important;padding-right:0!important;padding-left:0!important}}@media (max-width: 719px){.vp-page-meta{display:block}}.vp-page-meta .vp-meta-item{flex-grow:1}.vp-page-meta .vp-meta-item .vp-meta-label{font-weight:500}.vp-page-meta .vp-meta-item .vp-meta-label:not(a){color:var(--vp-c-text-mute)}.vp-page-meta .vp-meta-item .vp-meta-info{color:var(--vp-c-text-mute);font-weight:400}.vp-page-meta .git-info{text-align:end}.vp-page-meta .edit-link{margin-top:.25rem;margin-right:.5rem;margin-bottom:.25rem;font-size:14px}@media print{.vp-page-meta .edit-link{display:none}}.vp-page-meta .edit-link .edit-icon{position:relative;bottom:-.125em;width:1em;height:1em;margin-right:.25em}.vp-page-meta .last-updated,.vp-page-meta .contributors{margin-top:.25rem;margin-bottom:.25rem;font-size:14px}@media (max-width: 719px){.vp-page-meta .last-updated,.vp-page-meta .contributors{font-size:13px;text-align:start}}.vp-page-nav{display:flex;flex-wrap:wrap;max-width:var(--content-width, 740px);min-height:2rem;margin-top:0;margin-right:auto;margin-left:auto;padding:1rem 2rem 0;border-top:1px solid var(--vp-c-gutter);transition:border-top var(--vp-t-color)}@media (max-width: 959px){.vp-page-nav{padding-right:1rem;padding-left:1rem}}@media print{.vp-page-nav{display:none}}.vp-page-nav .route-link{display:inline-block;flex-grow:1;margin:.25rem;padding:.25rem .5rem;border:1px solid var(--vp-c-gutter);border-radius:.25rem}.vp-page-nav .route-link:hover{background:var(--vp-c-control)}.vp-page-nav .route-link .hint{color:var(--vp-c-text-mute);font-size:.875rem;line-height:2}.vp-page-nav .prev{text-align:start}.vp-page-nav .next{text-align:end}.vp-page{display:block;padding-top:var(--navbar-height);padding-bottom:2rem;padding-left:var(--sidebar-width)}@media (max-width: 959px){.vp-page{padding-left:var(--sidebar-width-mobile)}}@media (max-width: 719px){.vp-page{padding-left:0}}.vp-page .theme-default-content{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:0}@media (max-width: 959px){.vp-page .theme-default-content{padding:2rem}}@media (max-width: 419px){.vp-page .theme-default-content{padding:1.5rem}}.vp-sidebar-item{border-left:.25rem solid transparent;color:var(--vp-c-text);cursor:default}.vp-sidebar-item:focus-visible{outline-width:1px;outline-offset:-1px}.vp-sidebar-item.vp-sidebar-heading{box-sizing:border-box;width:100%;margin:0;padding:.35rem 1.5rem .35rem 1.25rem;font-weight:700;font-size:1.1em;transition:color .15s ease}.vp-sidebar-item.vp-sidebar-heading+.vp-sidebar-children{overflow:hidden;transition:height .1s ease-out;margin-bottom:.75rem}.vp-sidebar-item.collapsible{cursor:pointer}.vp-sidebar-item:not(.vp-sidebar-heading){display:inline-block;box-sizing:border-box;width:100%;margin:0;padding:.35rem 1rem .35rem 2rem;font-weight:400;font-size:1em;line-height:1.4}.vp-sidebar-item:not(.vp-sidebar-heading)+.vp-sidebar-children{padding-left:1rem;font-size:.95em}.vp-sidebar-children .vp-sidebar-children .vp-sidebar-item:not(.vp-sidebar-heading){padding:.25rem 1rem .25rem 1.75rem}.vp-sidebar-children .vp-sidebar-children .vp-sidebar-item:not(.vp-sidebar-heading).active{border-left-color:transparent;font-weight:500}a.vp-sidebar-heading+.vp-sidebar-children .vp-sidebar-item:not(.vp-sidebar-heading).active{border-left-color:transparent}.vp-sidebar-item.active:not(p.vp-sidebar-heading){border-left-color:var(--vp-c-accent);color:var(--vp-c-accent);font-weight:600}a.vp-sidebar-item{cursor:pointer}a.vp-sidebar-item:hover{color:var(--vp-c-accent)}.vp-sidebar-items{margin:0;padding:1.5rem 0;list-style-type:none}@media (max-width: 719px){.vp-sidebar-items{padding:1rem 0}}.vp-sidebar-items ul{margin:0;padding:0;list-style-type:none}.vp-sidebar-items a{display:inline-block}.vp-sidebar{position:fixed;top:var(--navbar-height);bottom:0;left:0;z-index:10;overflow-y:auto;box-sizing:border-box;width:var(--sidebar-width);margin:0;border-right:1px solid var(--vp-c-border);background-color:var(--vp-sidebar-c-bg);font-size:16px;transition:transform var(--vp-t-transform),background-color var(--vp-t-color),border-color var(--vp-t-color);scrollbar-color:var(--vp-c-accent-bg) var(--vp-c-gutter);scrollbar-width:thin}@media (max-width: 959px){.vp-sidebar{width:var(--sidebar-width-mobile);font-size:15px}}@media (max-width: 719px){.vp-sidebar{top:0;padding-top:var(--navbar-height);transform:translate(-100%)}}.vp-sidebar::-webkit-scrollbar{width:7px}.vp-sidebar::-webkit-scrollbar-track{background-color:var(--vp-c-gutter)}.vp-sidebar::-webkit-scrollbar-thumb{background-color:var(--vp-c-accent-bg)}.vp-sidebar .vp-navbar-items{display:none;padding:.5rem 0 .75rem;border-bottom:1px solid var(--vp-c-gutter);transition:border-color var(--vp-t-color)}@media (max-width: 719px){.vp-sidebar .vp-navbar-items{display:block}.vp-sidebar .vp-navbar-items .vp-navbar-dropdown-item a.route-link-active:after{top:calc(1rem - 2px)}}.vp-sidebar .vp-navbar-items ul{margin:0;padding:0;list-style-type:none}.vp-sidebar .vp-navbar-items a{font-weight:600}.vp-sidebar .vp-navbar-item{display:block;padding:.5rem 0 .5rem 1.5rem;font-size:1.1em;line-height:1.25rem}.vp-sidebar-mask{position:fixed;top:0;left:0;z-index:9;display:none;width:100vw;height:100vh}.vp-theme-container.no-navbar .vp-sidebar{top:0}@media (max-width: 719px){.vp-theme-container.no-navbar .vp-sidebar{padding-top:0}}.vp-theme-container.no-navbar .vp-page{padding-top:0}.vp-theme-container.no-navbar .theme-default-content h1,.vp-theme-container.no-navbar .theme-default-content h2,.vp-theme-container.no-navbar .theme-default-content h3,.vp-theme-container.no-navbar .theme-default-content h4,.vp-theme-container.no-navbar .theme-default-content h5,.vp-theme-container.no-navbar .theme-default-content h6{margin-top:1.5rem;padding-top:0}.vp-theme-container.no-sidebar .vp-sidebar{display:none}@media (max-width: 719px){.vp-theme-container.no-sidebar .vp-sidebar{display:block}}.vp-theme-container.no-sidebar .vp-page{padding-left:0}@media (max-width: 719px){.vp-theme-container.sidebar-open .vp-sidebar{transform:translate(0)}.vp-theme-container.sidebar-open .vp-sidebar-mask{display:block}}.fade-slide-y-enter-active{transition:all .2s ease}.fade-slide-y-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.fade-slide-y-enter-from,.fade-slide-y-leave-to{opacity:0;transform:translateY(10px)}.vp-theme-container[data-v-c2b5adcc]{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width: 959px){.vp-theme-container[data-v-c2b5adcc]{padding:2rem}}:root{--vp-c-white: #fff;--vp-c-black: #000;--vp-c-grey-text: #656869;--vp-c-grey-hover: #e4e4e9;--vp-c-grey-bg: #ebebef;--vp-c-grey-soft: rgb(142 150 170 / 14%);--vp-c-indigo-text: #3451b2;--vp-c-indigo-hover: #3a5ccc;--vp-c-indigo-bg: #5672cd;--vp-c-indigo-soft: rgb(100 108 255 / 14%);--vp-c-purple-text: #6f42c1;--vp-c-purple-hover: #7e4cc9;--vp-c-purple-bg: #8e5cd9;--vp-c-purple-soft: rgb(159 122 234 / 14%);--vp-c-blue-text: #2888a7;--vp-c-blue-hover: #2d98ba;--vp-c-blue-bg: #2fa1c5;--vp-c-blue-soft: rgb(27 178 229 / 14%);--vp-c-green-text: #18794e;--vp-c-green-hover: #299764;--vp-c-green-bg: #30a46c;--vp-c-green-soft: rgb(16 185 129 / 14%);--vp-c-yellow-text: #915930;--vp-c-yellow-hover: #946300;--vp-c-yellow-bg: #c28100;--vp-c-yellow-soft: rgb(234 179 8 / 14%);--vp-c-red-text: #b8272c;--vp-c-red-hover: #d5393e;--vp-c-red-bg: #e0575b;--vp-c-red-soft: rgb(244 63 94 / 14%)}[data-theme=dark]{--vp-c-white: #000;--vp-c-black: #fff;--vp-c-grey-text: #939499;--vp-c-grey-hover: #414853;--vp-c-grey-bg: #32363f;--vp-c-grey-soft: rgb(101 117 133 / 16%);--vp-c-indigo-text: #a8b1ff;--vp-c-indigo-hover: #5c73e7;--vp-c-indigo-bg: #3e63dd;--vp-c-indigo-soft: rgb(100 108 255 / 16%);--vp-c-blue-text: #c9e8f2;--vp-c-blue-hover: #a6d9ea;--vp-c-blue-bg: #2785a3;--vp-c-blue-soft: rgb(27 178 229 / 16%);--vp-c-purple-text: #c8abfa;--vp-c-purple-hover: #a879e6;--vp-c-purple-bg: #8e5cd9;--vp-c-purple-soft: rgb(159 122 234 / 16%);--vp-c-green-text: #3dd68c;--vp-c-green-hover: #30a46c;--vp-c-green-bg: #298459;--vp-c-green-soft: rgb(16 185 129 / 16%);--vp-c-yellow-text: #f9b44e;--vp-c-yellow-hover: #da8b17;--vp-c-yellow-bg: #a46a0a;--vp-c-yellow-soft: rgb(234 179 8 / 16%);--vp-c-red-text: #f66f81;--vp-c-red-hover: #f14158;--vp-c-red-bg: #b62a3c;--vp-c-red-soft: rgb(244 63 94 / 16%)}:root{color-scheme:light}[data-theme=dark]{color-scheme:dark}html,body{background:var(--vp-c-bg, #fff);accent-color:var(--vp-c-accent, #299764);transition:background-color var(--vp-t-color)}html{font-size:16px;font-display:optional;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none}@media print{html{font-size:12pt}}html[data-theme=dark]{color-scheme:dark}body{min-height:100vh;margin:0;padding:0;color:var(--vp-c-text, rgb(60, 60, 67));font-size:1rem;font-synthesis:style}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25;overflow-wrap:break-word}h1:focus-visible,h2:focus-visible,h3:focus-visible,h4:focus-visible,h5:focus-visible,h6:focus-visible{outline:none}h1{font-size:2rem}h2{padding-bottom:.3rem;border-bottom:1px solid var(--vp-c-gutter, #e2e2e3);font-size:1.65rem;transition:border-color var(--vp-t-color)}h3{font-size:1.35rem}h4{font-size:1.15rem}h5{font-size:1.05rem}h6{font-size:1rem}p,ul,ol{line-height:1.6;overflow-wrap:break-word}@media print{p,ul,ol{line-height:1.5}}ul,ol{padding-inline-start:1.2em}a{color:var(--vp-c-accent, #299764);font-weight:500;text-decoration:none;overflow-wrap:break-word}a.header-anchor{position:relative;color:inherit;text-decoration:none}a.header-anchor:hover:before{content:"¶";position:absolute;top:.4167em;left:-.75em;color:var(--vp-c-accent, #299764);font-size:.75em}a.header-anchor:focus-visible{outline:none}a.header-anchor:focus-visible:before{content:"¶";position:absolute;left:-.75em;color:var(--vp-c-accent, #299764);outline:auto}strong{font-weight:600}blockquote{margin:1rem 0;padding:.25rem 0 .25rem 1rem;border-inline-start:.2rem solid var(--vp-c-border-hard, #b8b8ba);color:var(--vp-c-text-mute, rgba(60, 60, 67, .78));font-size:1rem;overflow-wrap:break-word;transition:border-color var(--vp-t-color),color var(--vp-t-color)}blockquote>p{margin:0}hr{border:0;border-bottom:1px solid var(--vp-c-gutter, #e2e2e3);transition:border-color var(--vp-t-color)}:not(pre)>code{margin:0;padding:3px 6px;border-radius:4px;background:var(--vp-c-grey-soft, rgba(142, 150, 170, .14));font-size:.875em;overflow-wrap:break-word;transition:background-color var(--vp-t-color),color var(--vp-t-color)}p a code{color:var(--vp-c-accent, #299764);font-weight:400}table code{padding:.1rem .4rem}kbd{display:inline-block;min-width:1em;margin-inline:.125rem;padding:.25em;border:1px solid var(--vp-c-border, #c2c2c4);border-radius:.25em;box-shadow:1px 1px 4px 0 var(--vp-c-shadow, rgba(0, 0, 0, .15));line-height:1;letter-spacing:-.1em;text-align:center}table{display:block;overflow-x:auto;margin:1rem 0;border-collapse:collapse}tbody tr:nth-child(odd){background:var(--vp-c-bg-alt, #f6f8fa);transition:background-color var(--vp-t-color)}th,td{padding:.6em 1em;border:1px solid var(--vp-c-border-hard, #d1d4d7);transition:border-color var(--vp-t-color)}pre{text-align:left;direction:ltr;white-space:pre;word-spacing:normal;word-wrap:normal;word-break:normal;overflow-wrap:unset;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}@media print{pre{white-space:pre-wrap}}pre code{padding:0;border-radius:0}@page{margin:2cm;font-size:12pt;size:a4}@media print{*,:after,:before{box-shadow:none!important;text-shadow:none!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}a{color:inherit;font-weight:inherit!important;font-size:inherit!important;text-decoration:underline}a.header-anchor{text-decoration:none}abbr[title]:after{content:" (" attr(title) ")"}pre{border:1px solid #eee;white-space:pre-wrap!important}pre>code{white-space:pre-wrap!important}blockquote{border-inline-start:.2rem solid #ddd;color:inherit}blockquote,pre{orphans:5;widows:5}img,tr,canvas{page-break-inside:avoid}}@media (prefers-reduced-motion: reduce){*,:before,:after{background-attachment:initial!important;scroll-behavior:auto!important;transition-delay:0s!important;transition-duration:0s!important;animation-duration:1ms!important;animation-delay:-1ms!important;animation-iteration-count:1!important}}:root{--vp-c-accent: #299764;--vp-c-accent-bg: #3eaf7c;--vp-c-accent-hover: #4abf8a;--vp-c-accent-text: var(--vp-c-white);--vp-c-accent-soft: rgb(16 185 129 / 14%);--vp-c-bg: #fff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #fff;--vp-c-text: rgb(60 60 67);--vp-c-text-mute: rgb(60 60 67 / 78%);--vp-c-text-subtle: rgb(60 60 67 / 56%);--vp-c-gutter: #e2e2e3;--vp-c-border: #c2c2c4;--vp-c-border-hard: #b8b8ba;--vp-c-shadow: rgb(0 0 0 / 15%);--vp-c-control: rgb(142 150 170 / 10%);--vp-c-control-hover: rgb(142 150 170 / 16%);--vp-c-control-disabled: #eaeaea;--vp-navbar-c-bg: var(--vp-c-bg);--vp-sidebar-c-bg: var(--vp-c-bg);--vp-c-code-tab-title: var(--code-c-text, rgb(255 255 255 / 90%));--vp-c-code-tab-bg: var(--code-bg-color, var(--code-c-bg));--vp-c-code-tab-active: var(--vp-c-accent);--badge-c-tip-text: var(--vp-c-green-text);--badge-c-tip-bg: var(--vp-c-green-soft);--badge-c-warning-text: var(--vp-c-yellow-text);--badge-c-warning-bg: var(--vp-c-yellow-soft);--badge-c-danger-text: var(--vp-c-red-text);--badge-c-danger-bg: var(--vp-c-red-soft);--badge-c-important-text: var(--vp-c-purple-text);--badge-c-important-bg: var(--vp-c-purple-soft);--badge-c-info-text: var(--vp-c-indigo-text);--badge-c-info-bg: var(--vp-c-indigo-soft);--badge-c-note-text: var(--vp-c-grey-text);--badge-c-note-bg: var(--vp-c-grey-soft);--font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--navbar-height: 3.6rem;--navbar-padding-v: .7rem;--navbar-padding-h: 1.5rem;--sidebar-width: 20rem;--sidebar-width-mobile: calc(var(--sidebar-width) * .82);--content-width: 740px;--homepage-width: 960px;--header-offset: var(--navbar-height);--vp-t-color: .3s ease;--vp-t-transform: .3s ease;--external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z'/%3E%3C/svg%3E");--external-link-c-icon: var(--vp-c-text-mute)}[data-theme=dark]{--vp-c-accent: #3dd68c;--vp-c-accent-bg: #3aa675;--vp-c-accent-hover: #349469;--vp-c-accent-soft: rgb(16 185 129 / 16%);--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-text: rgb(235 235 245 / 86%);--vp-c-text-mute: rgb(235 235 245 / 60%);--vp-c-text-subtle: rgb(235 235 245 / 38%);--vp-c-gutter: #000;--vp-c-border: #3c3f44;--vp-c-border-hard: #45484e;--vp-c-shadow: rgb(0 0 0 / 30%);--vp-c-control: rgb(101 117 133 / 12%);--vp-c-control-hover: rgb(101 117 133 / 18%);--vp-c-control-disabled: #363636}body{font-family:var(--font-family)}code{font-family:var(--code-font-family)}.theme-default-content h1,.theme-default-content h2,.theme-default-content h3,.theme-default-content h4,.theme-default-content h5,.theme-default-content h6{margin-top:calc(.5rem - var(--header-offset));margin-bottom:0;padding-top:calc(1rem + var(--header-offset))}.theme-default-content h1:first-child,.theme-default-content h2:first-child,.theme-default-content h3:first-child,.theme-default-content h4:first-child,.theme-default-content h5:first-child,.theme-default-content h6:first-child{margin-bottom:1rem}.theme-default-content h1:first-child+p,.theme-default-content h1:first-child+pre,.theme-default-content h1:first-child+.custom-container,.theme-default-content h2:first-child+p,.theme-default-content h2:first-child+pre,.theme-default-content h2:first-child+.custom-container,.theme-default-content h3:first-child+p,.theme-default-content h3:first-child+pre,.theme-default-content h3:first-child+.custom-container,.theme-default-content h4:first-child+p,.theme-default-content h4:first-child+pre,.theme-default-content h4:first-child+.custom-container,.theme-default-content h5:first-child+p,.theme-default-content h5:first-child+pre,.theme-default-content h5:first-child+.custom-container,.theme-default-content h6:first-child+p,.theme-default-content h6:first-child+pre,.theme-default-content h6:first-child+.custom-container{margin-top:2rem}@media (max-width: 419px){.theme-default-content h1{font-size:1.9rem}}.theme-default-content a:not(.header-anchor){text-decoration:underline}.theme-default-content img{max-width:100%}div[class*=language-]{margin:.75rem 0;transition:background-color var(--vp-t-color),color var(--vp-t-color)}@media (max-width: 419px){div[class*=language-]{--code-border-radius: 0;margin:.75rem -1.5rem}}div[class*=language-] .line.diff,div[class*=language-] .line.highlighted{transition:background-color var(--vp-t-color)}.table-of-contents .vp-badge{vertical-align:middle}.arrow{display:inline-block;vertical-align:middle;width:1em;height:1em;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;line-height:normal;transition:all .3s}[data-theme=dark] .arrow{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E")}.arrow.down{transform:rotate(180deg)}.arrow.right{transform:rotate(90deg)}.arrow.left{transform:rotate(-90deg)}.vp-external-link-icon:after{content:"";display:inline-block;flex-shrink:0;width:11px;height:11px;margin-top:-1px;margin-left:4px;background:var(--external-link-c-icon);-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}.external-link-icon .external-link:after{content:"";display:inline-block;flex-shrink:0;width:11px;height:11px;margin-top:-1px;margin-left:4px;background:var(--external-link-c-icon);-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}.external-link-icon .theme-default-content a[href*="://"]:not(.no-external-link-icon):after,.external-link-icon .theme-default-content a[target=_blank]:not(.no-external-link-icon):after{content:"";display:inline-block;flex-shrink:0;width:11px;height:11px;margin-top:-1px;margin-left:4px;background:var(--external-link-c-icon);-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}@media screen and (max-width: 719px){.vp-hide-mobile{display:none}}.vp-comment{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem}@media (max-width: 959px){.vp-comment{padding:2rem}}@media (max-width: 419px){.vp-comment{padding:1.5rem}}.vp-navbar .DocSearch{transition:background-color var(--vp-t-color)}.vp-navbar .search-box{vertical-align:top;flex:0 0 auto}.vp-copy-code-button{position:absolute;top:.5em;right:.5em;z-index:5;width:2.5rem;height:2.5rem;padding:0;border-width:0;border-radius:.5rem;background:#0000;outline:none;opacity:0;cursor:pointer;transition:opacity .4s}@media print{.vp-copy-code-button{display:none}}.vp-copy-code-button:before{content:"";display:inline-block;width:1.25rem;height:1.25rem;padding:.625rem;background:currentcolor;color:var(--copy-code-c-text);font-size:1.25rem;-webkit-mask-image:var(--code-copy-icon);mask-image:var(--code-copy-icon);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:1em;mask-size:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.vp-copy-code-button:focus,.vp-copy-code-button.copied{opacity:1}.vp-copy-code-button:hover,.vp-copy-code-button.copied{background:var(--copy-code-c-hover)}.vp-copy-code-button.copied:before{-webkit-mask-image:var(--code-copied-icon);mask-image:var(--code-copied-icon)}.vp-copy-code-button.copied:after{content:attr(data-copied);position:absolute;top:0;right:calc(100% + .25rem);display:block;height:1.25rem;padding:.625rem;border-radius:.5rem;background:var(--copy-code-c-hover);color:var(--copy-code-c-text);font-weight:500;line-height:1.25rem;white-space:nowrap}.no-copy-code .vp-copy-code-button{display:none}body:not(.no-copy-code) div[class*=language-]:hover:before{display:none}body:not(.no-copy-code) div[class*=language-]:hover .vp-copy-code-button{opacity:1}:root{--code-copy-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2' /%3e%3c/svg%3e");--code-copied-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4' /%3e%3c/svg%3e");--copy-code-c-text: var(--code-c-line-number);--copy-code-c-hover: var(--code-c-highlight-bg)}:root{--code-padding-x: 1.25rem;--code-padding-y: 1rem;--code-border-radius: 6px;--code-line-height: 1.6;--code-font-size: 14px;--code-font-family: consolas, monaco, "Andale Mono", "Ubuntu Mono", monospace}div[class*=language-]{position:relative;border-radius:var(--code-border-radius);background-color:var(--code-c-bg)}div[class*=language-]:before{content:attr(data-title);position:absolute;top:.8em;right:1em;z-index:3;color:var(--code-c-text);font-size:.75rem}div[class*=language-] pre{position:relative;z-index:1;overflow-x:auto;margin:0;border-radius:var(--code-border-radius);font-size:var(--code-font-size);font-family:var(--code-font-family);line-height:var(--code-line-height)}div[class*=language-] pre code{display:block;box-sizing:border-box;width:-moz-fit-content;width:fit-content;min-width:100%;padding:var(--code-padding-y) var(--code-padding-x);background-color:#0000!important;color:var(--code-c-text);overflow-wrap:unset;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}:root{--code-c-text: #f8f8f2;--code-c-bg: #2e3440;--code-c-highlight-bg: rgb(51.6454545455, 60.5484848485, 78.3545454545);--code-c-line-number: rgba(248, 248, 242, .67)}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#636f88}.token.punctuation{color:#81a1c1}.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#81a1c1}.token.number{color:#b48ead}.token.boolean{color:#81a1c1}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a3be8c}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#81a1c1}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#88c0d0}.token.keyword{color:#81a1c1}.token.regex,.token.important{color:#ebcb8b}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}:root{--code-line-number-width: 3rem}div[class*=language-]:not(.line-numbers-mode) .line-numbers{display:none}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;top:0;left:0;width:var(--code-line-number-width);height:100%;border-right:1px solid var(--code-c-highlight-bg, var(--code-c-text));border-radius:var(--code-border-radius) 0 0 var(--code-border-radius);transition:border var(--vp-t-color)}div[class*=language-].line-numbers-mode pre{vertical-align:middle;margin-left:var(--code-line-number-width)}div[class*=language-].line-numbers-mode code{padding-left:1rem}div[class*=language-].line-numbers-mode .line-numbers{counter-reset:line-number;position:absolute;top:0;width:var(--code-line-number-width);padding-top:var(--code-padding-y);color:var(--code-c-line-number, var(--code-c-text));font-size:var(--code-font-size);line-height:var(--code-line-height);text-align:center}div[class*=language-].line-numbers-mode .line-number{position:relative;z-index:3;font-family:var(--code-font-family);-webkit-user-select:none;-moz-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-number:before{content:counter(line-number);counter-increment:line-number}div[class*=language-] .line.highlighted{display:inline-block;width:100%;margin:0 calc(-1*var(--code-padding-x));padding:0 var(--code-padding-x);background-color:var(--code-c-highlight-bg)}div[class*=language-].has-collapsed-lines.collapsed{overflow-y:hidden;height:calc(var(--vp-collapsed-lines)*var(--code-line-height)*var(--code-font-size) + var(--code-padding-y) + 28px)}div[class*=language-].has-collapsed-lines .collapsed-lines{--vp-collapsed-lines-bg: var(--code-c-bg);position:absolute;right:0;bottom:0;left:0;z-index:4;display:flex;align-items:center;justify-content:center;height:28px;background:linear-gradient(to bottom,transparent 0%,var(--vp-collapsed-lines-bg) 55%,var(--vp-collapsed-lines-bg) 100%);cursor:pointer;transition:--vp-collapsed-lines-bg var(--vp-t-color)}div[class*=language-].has-collapsed-lines .collapsed-lines:hover{--vp-collapsed-lines-bg: rgb(0 0 0 / 10%) !important}div[class*=language-].has-collapsed-lines[data-highlighter=shiki] .collapsed-lines{--vp-collapsed-lines-bg: var(--code-c-bg, var(--shiki-light-bg))}[data-theme=dark] div[class*=language-].has-collapsed-lines[data-highlighter=shiki] .collapsed-lines{--vp-collapsed-lines-bg: var(--code-c-bg, var(--shiki-dark-bg))}div[class*=language-].has-collapsed-lines .collapsed-lines:before{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='m18 12l-6 6l-6-6m12-6l-6 6l-6-6'/%3E%3C/svg%3E");--vp-collapsed-lines-rotate: 0deg;content:"";display:inline-block;width:24px;height:24px;background-color:var(--code-c-text);-webkit-mask-image:var(--icon);mask-image:var(--icon);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:20px;mask-size:20px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;animation:code-collapsed-lines 1.2s infinite alternate-reverse ease-in-out}div[class*=language-].has-collapsed-lines:not(.collapsed) code{padding-bottom:max(var(--code-padding-y),28px)}div[class*=language-].has-collapsed-lines:not(.collapsed) .collapsed-lines:hover{--vp-collapsed-lines-bg: transparent !important}div[class*=language-].has-collapsed-lines:not(.collapsed) .collapsed-lines:before{--vp-collapsed-lines-rotate: 180deg}@property --vp-collapsed-lines-bg{inherits:false;initial-value:#fff;syntax:""}@keyframes code-collapsed-lines{0%{opacity:.3;transform:translateY(-2px) rotate(var(--vp-collapsed-lines-rotate))}to{opacity:1;transform:translateY(2px) rotate(var(--vp-collapsed-lines-rotate))}}:root{--search-bg-color: #fff;--search-accent-color: #3eaf7c;--search-text-color: #2c3e50;--search-border-color: #eaecef;--search-item-text-color: #5d81a5;--search-item-focus-bg-color: #f3f4f5;--search-input-width: 8rem;--search-result-width: 20rem}.search-box{position:relative;display:inline-block;margin-left:1rem}@media print{.search-box{display:none}}.search-box input{display:inline-block;width:var(--search-input-width);height:2rem;padding:0 .5rem 0 2rem;border:1px solid var(--search-border-color);border-radius:2rem;background:var(--search-bg-color) url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='13'%3e%3cg%20stroke-width='2'%20stroke='%23aaa'%20fill='none'%3e%3cpath%20d='M11.29%2011.71l-4-4'/%3e%3ccircle%20cx='5'%20cy='5'%20r='4'/%3e%3c/g%3e%3c/svg%3e") .6rem .5rem no-repeat;background-size:1rem;color:var(--search-text-color);outline:none;font-size:.9rem;line-height:2rem;cursor:text;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:all ease .3s}@media (max-width: 719px){.search-box input{position:relative;width:0;border-color:transparent;cursor:pointer}}.search-box input:focus{border-color:var(--search-accent-color);cursor:auto}@media (max-width: 719px){.search-box input:focus{left:0;width:10rem;cursor:text}}@media (max-width: 419px){.search-box input:focus{width:8rem}}.search-box .suggestions{position:absolute;top:2rem;right:0;width:var(--search-result-width);padding:.4rem;border:1px solid var(--search-border-color);border-radius:6px;background:var(--search-bg-color);list-style-type:none}@media (max-width: 419px){.search-box .suggestions{right:-.5rem;width:calc(100vw - 4rem)}}.search-box .suggestion{padding:.4rem .6rem;border-radius:4px;line-height:1.4;cursor:pointer}.search-box .suggestion a{color:var(--search-item-text-color);white-space:normal}.search-box .suggestion.focus{background-color:var(--search-item-focus-bg-color)}.search-box .suggestion.focus a{color:var(--search-accent-color)}.search-box .suggestion .page-title{font-weight:600}.search-box .suggestion .page-header{margin-left:.25em;font-size:.9em}textarea[data-v-26acb438]{width:100%;height:10em;border-color:var(--vp-c-accent);border-style:solid}button[data-v-26acb438]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:16px!important;border-radius:4px;vertical-align:middle;line-height:20px;box-sizing:border-box;border:1px solid #ccc;text-align:center;cursor:pointer;padding:6px 14px;border-color:var(--vp-c-accent);color:#fff;background:var(--vp-c-accent);margin:12px 0}button[data-v-26acb438]:hover{background-color:var(--vp-c-accent-hover)}.fade-leave-active[data-v-26acb438]{transition:opacity .7s}.fade-leave-to[data-v-26acb438]{opacity:0}span.error[data-v-26acb438],span.copied[data-v-26acb438]{font-weight:600;display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:6px;color:#fff}.error[data-v-26acb438]{background-color:var(--c-danger)}.copied[data-v-26acb438]{background-color:var(--c-warning)}.popup[data-v-26acb438]{margin-left:10px} diff --git a/assets/sun-events.html-cUR6Nkho.js b/assets/sun-events.html-cUR6Nkho.js new file mode 100644 index 0000000000..5b3458e23f --- /dev/null +++ b/assets/sun-events.html-cUR6Nkho.js @@ -0,0 +1,4 @@ +import{_ as n}from"./first-automation_05-BSXfHgTV.js";import{_ as a,c as t,e as p,o}from"./app-CefLgoES.js";const e="/node-red-contrib-home-assistant-websocket/assets/sun-events_01-DNarsWH0.png",u="/node-red-contrib-home-assistant-websocket/assets/sun-events_02-BCghkTWZ.png",c={};function r(l,s){return o(),t("div",null,s[0]||(s[0]=[p('

    Turn Light On/Off with Sunset/Sunrise

    Option 1

    screenshot

    [{"id":"b74ada49.d7e408","type":"server-state-changed","z":"ffbd7f06.4a014","name":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sun.sun","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"above_horizon","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":244,"y":784,"wires":[["1f467cbb.0c3983"],["da5ff3e0.cbb2a"]]},{"id":"1f467cbb.0c3983","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":474,"y":784,"wires":[[]]},{"id":"da5ff3e0.cbb2a","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":474,"y":832,"wires":[[]]}]
    +

    Option 2

    screenshot

    [{"id":"74a64f80.d2302","type":"server-state-changed","z":"ffbd7f06.4a014","name":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sun.sun","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"above_horizon","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":404,"y":832,"wires":[["ccb2f059.1d384"],["4a84490d.9930a8"]]},{"id":"ccb2f059.1d384","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":794,"y":832,"wires":[[]]},{"id":"4a84490d.9930a8","type":"change","z":"ffbd7f06.4a014","name":"turn on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\\"service\\": \\"turn_on\\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":604,"y":880,"wires":[["ccb2f059.1d384"]]}]
    +

    Option 3

    Required Nodes

    screenshot

    [{"id":"ccb2f059.1d384","type":"api-call-service","z":"ffbd7f06.4a014","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"{{payload}}","entityId":"light.front_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":644,"y":832,"wires":[[]]},{"id":"1a6cb307.d3168d","type":"eztimer","z":"ffbd7f06.4a014","name":"","autoname":"sunset - sunrise","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"timerType":"1","startupMessage":true,"ontype":"1","ontimesun":"sunset","ontimetod":"17:00","onproperty":"payload","onvaluetype":"str","onvalue":"turn_on","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"sunrise","offtimetod":"dusk","offduration":"00:01:00","offproperty":"payload","offvaluetype":"str","offvalue":"turn_off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":288,"y":832,"wires":[["ccb2f059.1d384"]]}]
    +
    `,12)]))}const i=a(c,[["render",r],["__file","sun-events.html.vue"]]),y=JSON.parse('{"path":"/cookbook/sun-events.html","title":"Turn Light On/Off with Sunset/Sunrise","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Option 1","slug":"option-1","link":"#option-1","children":[]},{"level":2,"title":"Option 2","slug":"option-2","link":"#option-2","children":[]},{"level":2,"title":"Option 3","slug":"option-3","link":"#option-3","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":3}]},"filePathRelative":"cookbook/sun-events.md"}');export{i as comp,y as data}; diff --git a/assets/sun-events_01-DNarsWH0.png b/assets/sun-events_01-DNarsWH0.png new file mode 100644 index 0000000000..60d3afae04 Binary files /dev/null and b/assets/sun-events_01-DNarsWH0.png differ diff --git a/assets/sun-events_02-BCghkTWZ.png b/assets/sun-events_02-BCghkTWZ.png new file mode 100644 index 0000000000..0413eb19e4 Binary files /dev/null and b/assets/sun-events_02-BCghkTWZ.png differ diff --git a/assets/switch-node.html-C5J6Vd72.js b/assets/switch-node.html-C5J6Vd72.js new file mode 100644 index 0000000000..9b000907fb --- /dev/null +++ b/assets/switch-node.html-C5J6Vd72.js @@ -0,0 +1,5 @@ +import{_ as e,c as u,e as c,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_6_1-Cc8tbBMr.png",k="/node-red-contrib-home-assistant-websocket/assets/jsonata_6_2-CnhkdrfZ.png",q={};function d(g,s){const a=r("RouteLink");return l(),u("div",null,[s[2]||(s[2]=c('

    Switch node

    The Switch node and the Change node are standard Node-RED nodes that provide conditional routing (selection) and data manipulation respectively for flow messages. Many of the WebSocket nodes, when using JSONata, can provide some output property data manipulation, and a few nodes also offer simple binary output message routing. However, much more can be achieved using JSONata in Switch and Change nodes in combination with the WebSocket nodes.

    screenshot

    This example shows how to use JSONata within the standard Switch node.

    [{"id":"fcb0d3b1b8ed3478","type":"group","z":"776c027950fc8c3f","name":"Switch node - selection routing based on entity details","style":{"label":true,"color":"#000000"},"nodes":["7f01d6eef386f743","84b7ac3a7e469780","60331de530222f6f","e253c6a934a17919","76bb91be0ae4c7b4","52713f1b7157f1f0"],"x":34,"y":2159,"w":852,"h":262},{"id":"7f01d6eef386f743","type":"poll-state","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"","server":"","version":3,"exposeAsEntityConfig":"","updateInterval":"10","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":false,"outputOnChanged":true,"entityId":"switch.t1","stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputs":1,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":2240,"wires":[["84b7ac3a7e469780"]]},{"id":"84b7ac3a7e469780","type":"switch","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"","property":"$round(data.timeSinceChangedMs/60000,0)","propertyType":"jsonata","rules":[{"t":"btwn","v":"2","vt":"num","v2":"3","v2t":"num"},{"t":"gt","v":"data.state=\\"on\\" ? 4 : 1","vt":"jsonata"},{"t":"jsonata_exp","v":"data.timeSinceChangedMs < 60000","vt":"jsonata"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":350,"y":2240,"wires":[["60331de530222f6f"],["e253c6a934a17919"],["76bb91be0ae4c7b4"],["52713f1b7157f1f0"]]},{"id":"60331de530222f6f","type":"debug","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"Last changed between 2 and 3 minutes ago","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"\\"Is \\" & payload & \\" for \\" & $round(data.timeSinceChangedMs/60000, 0) & \\" minutes\\"","targetType":"jsonata","statusVal":"payload","statusType":"auto","x":670,"y":2200,"wires":[]},{"id":"e253c6a934a17919","type":"debug","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"If on > 4 mins or if off > 1 mins","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"\\"Is \\" & payload & \\" for \\" & $round(data.timeSinceChangedMs/60000, 0) & \\" minutes\\"","targetType":"jsonata","statusVal":"payload","statusType":"auto","x":630,"y":2260,"wires":[]},{"id":"76bb91be0ae4c7b4","type":"debug","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"Changed state < 1 minute ago","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"\\"Is \\" & payload & \\" for \\" & $round(data.timeSinceChangedMs/60000, 0) & \\" minutes\\"","targetType":"jsonata","statusVal":"payload","statusType":"auto","x":630,"y":2320,"wires":[]},{"id":"52713f1b7157f1f0","type":"debug","z":"776c027950fc8c3f","g":"fcb0d3b1b8ed3478","name":"Otherwise","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"\\"Is \\" & payload & \\" for \\" & $round(data.timeSinceChangedMs/60000, 0) & \\" minutes\\"","targetType":"jsonata","statusVal":"payload","statusType":"auto","x":560,"y":2380,"wires":[]}]
    +

    Using JSONata in switch routing

    A Poll State node has been set up to return the entity state of a light switch every 10 seconds. This will return the entity state ("on" or "off") as the msg.payload value. It will also return the fuller entity state details in msg.data, which includes the 'timeSinceChangedMs' field.

    JSONata for the routing property

    $round(data.timeSinceChangedMs/60000,0)
    +

    The routing rules will test against the given property. By default this would be the value held in msg.payload. Using a JSONata expression here allows for a computation on the time since changed field to convert this to minutes. Rounding is also being used, so 31 to 89 seconds would become 1 minute.

    Note that the JSONata expression has access to the full incoming message. The value required was output from the Poll State node within the output property msg.data field, and this has to be used here since the $entity() functions are not available outside of the WebSocket nodes.

    screenshot

    JSONata for the rule value

    1. In the first rule, the rule values to test against are given as literals.

    2. In the second rule, the rule test value is provided by a JSONata expression. This will return either 4, if the light state is "on", or 1 if the light state is "off".

    data.state="on" ? 4 : 1
    +

    Note that 'payload' contains the state value and could have been used rather than 'data.state'. Where the output of a WebSocket node is used later in the flow for routing or processing, care should be taken to generate the most appropriate output. For example, rather than generate the Property match value here, this JSONata expression could be used in the Poll State node to provide minutes since last changed in the output msg.payload directly.

    JSONata expression for the routing match

    1. In the third rule, the evaluation Property is not used. The test condition is the Boolean result of a JSONata expression. The routing path is taken only if the JSONata expression evaluates as true.
    data.timeSinceChangedMs < 60000
    +

    The example is simplistic, however it shows that any incoming message property can be used within the expression.

    Note that, since the $entities() function is not available in a Switch node, to obtain other entity values, JSONata can be used in the preceding Poll State node to generate an output property, for example by setting msg.time to $entities('sensor.time').state to provide 'time' as an available value for use in the Switch node.

    1. For completeness in these notes, a last rule of 'Otherwise' has been included, and the matching rules set to 'checking all rules'. This will mean that more than one of the first three rules may match at the same time, but that the last route is only taken when no other rule matches.

    JSONata expression in the Debug node

    The Debug nodes also contain JSONata as a further demonstration of how versatile and applicable this language can be.

    Also see:

    `,25)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const h=e(q,[["render",d],["__file","switch-node.html.vue"]]),m=JSON.parse('{"path":"/cookbook/jsonata/switch-node.html","title":"Switch node","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Using JSONata in switch routing","slug":"using-jsonata-in-switch-routing","link":"#using-jsonata-in-switch-routing","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/switch-node.md"}');export{h as comp,m as data}; diff --git a/assets/switch.html-Bhvk304d.js b/assets/switch.html-Bhvk304d.js new file mode 100644 index 0000000000..1aaa26918f --- /dev/null +++ b/assets/switch.html-Bhvk304d.js @@ -0,0 +1,2 @@ +import{_ as c,c as r,e as l,b as a,w as t,r as o,o as k,a as s,d as u}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/switch_usage-BysMPBbE.png",y={};function g(b,n){const p=o("InfoPanelOnly"),e=o("DocsOnly");return k(),r("div",null,[n[2]||(n[2]=l('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Switch

    The Switch node creates a switch entity within Home Assistant that can be controlled from Node-RED. This node also allows a flow to be started from a service call, making it a versatile tool for both controlling devices and triggering automations.

    Configuration

    Enable input

    Input is disabled by default. It can be enabled by checking this option.

    Output on state change

    • Type: boolean

    When the state of the switch changes it will output to the top if the switch is on or to the bottom if it is in the off position.

    Inputs

    msg.enable

    • Type: boolean

    Set to true to turn on the switch and false to turn it off. If the message has a property enable defined and set to a boolean the node will not have any output.

    Outputs

    Status Color

    • Green/Red: output from the node was due to input to the node
    • Blue: output from the node was due to the state of the node changing
    • Yellow: state of node changed but no output

    Examples

    ',17)),a(p,null,{default:t(()=>n[0]||(n[0]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/switch.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),a(e,null,{default:t(()=>n[1]||(n[1]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:i,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fab7baeb7be8c516"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"on b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"434"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1072"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"85438e0d960024f9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"nodered"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"trigger"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"switch.switch_test"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"message\\": {\\"payload\\": \\"i am the payload\\"}}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"320"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1216"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"026d576cab2ba685"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"132"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1216"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"85438e0d960024f9"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ecc4cf9f7bed0a46"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"off b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"434"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1120"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"489165f36ed911cf"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"toggle"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"switch.switch_test"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"326"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"832"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7e026638397d33b7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"toggle switch state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"150"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"832"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"489165f36ed911cf"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"aa7e8ed024dab3c8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"4"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeToHomeAssistant"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfilter"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch.switch_test"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfiltertype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"exact"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputinitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haltifstate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_only_on_state_change"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"204"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"784"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"657d91f04b24f723"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"132"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1120"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b85c010f7e098b73"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"baac3eb05828d07e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"v"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"126"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1024"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b85c010f7e098b73"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"051cdb052c6f99db"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"disable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"v"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"false"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"126"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1072"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b85c010f7e098b73"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b85c010f7e098b73"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9236992af61f2695"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableInput"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputOnStateChange"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"data"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$entity()"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"294"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1072"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fab7baeb7be8c516"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"ecc4cf9f7bed0a46"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6c90e6c00caee078"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"on a"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"434"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"928"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"b57fa2a7ad97b2eb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"off a"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"434"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"976"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"238e849949f437e6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"132"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"976"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a6736ba07743d64e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"74d43743ff8f07b3"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"v"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"true"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"118"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"880"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a6736ba07743d64e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d1d4b53d44caeb92"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"disable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"enable"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"v"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"false"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bool"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"122"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"928"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"a6736ba07743d64e"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"a6736ba07743d64e"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"2"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9236992af61f2695"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"enableInput"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputOnStateChange"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$entity().state = true ? \\"on\\" : \\"off\\""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"294"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"928"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"6c90e6c00caee078"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"b57fa2a7ad97b2eb"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1f28cd07093de4bf"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"outputs on state change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"344"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"880"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bc15274098491edc"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"does not output on state change"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"374"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1024"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7d848a75391906d1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"comment"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c84b6e0a642a4bce"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"use nodered.trigger service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"info"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"350"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1168"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9236992af61f2695"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e120e5718cc68a9a"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"_ADD_"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch test"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch test"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"device_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"switch"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),u(` +`),s("span",{class:"line"})])])],-1)])),_:1})])}const m=c(y,[["render",g],["__file","switch.html.vue"]]),h=JSON.parse('{"path":"/node/switch.html","title":"Switch","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Enable input","slug":"enable-input","link":"#enable-input","children":[]},{"level":3,"title":"Output on state change","slug":"output-on-state-change","link":"#output-on-state-change","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"msg.enable","slug":"msg-enable","link":"#msg-enable","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"node/switch.md"}');export{m as comp,h as data}; diff --git a/assets/switch_usage-BysMPBbE.png b/assets/switch_usage-BysMPBbE.png new file mode 100644 index 0000000000..cf52e14a5c Binary files /dev/null and b/assets/switch_usage-BysMPBbE.png differ diff --git a/assets/tag.html-ByJ95BCf.js b/assets/tag.html-ByJ95BCf.js new file mode 100644 index 0000000000..fca57dbe8a --- /dev/null +++ b/assets/tag.html-ByJ95BCf.js @@ -0,0 +1 @@ +import{_ as t,c as a,e as n,o as s}from"./app-CefLgoES.js";const i={};function o(d,e){return s(),a("div",null,e[0]||(e[0]=[n('

    Tag

    The Tag node outputs data when Home Assistant receives a tag scanned event for a configured tag ID. This node is useful for creating automations based on NFC tags or other scannable identifiers, allowing specific actions to be triggered when a tag is scanned.

    Configuration

    Tags

    • Type: array

    An array of tag ids to monitor for tag scanned events.

    Devices

    • Type: array

    An array of device ids to check when a configured tag is scanned.

    Expose as

    • Type: string

    When an entity is selected a switch entity will be created in Home Assistant. Turning on and off this switch will disable/enable the nodes in Node-RED.

    Outputs

    Value types:

    • event data: full event object
    • tag id: tag id of the tag that was scanned.
    • config: config properties of the node

    event object

    • Type: object
    FieldDescription
    device_idID of the device that scanned the tag
    tag_idID of the tag that was scanned
    tag_nameHome Assistant name of the tag that was scanned
    user_idHome Assistant user ID on device that scanned the tag
    ',18)]))}const l=t(i,[["render",o],["__file","tag.html.vue"]]),r=JSON.parse('{"path":"/node/tag.html","title":"Tag","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Tags","slug":"tags","link":"#tags","children":[]},{"level":3,"title":"Devices","slug":"devices","link":"#devices","children":[]},{"level":3,"title":"Expose as","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"event object","slug":"event-object","link":"#event-object","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":6}]},"filePathRelative":"node/tag.md"}');export{l as comp,r as data}; diff --git a/assets/text.html-uo1hSvmv.js b/assets/text.html-uo1hSvmv.js new file mode 100644 index 0000000000..e93169bce5 --- /dev/null +++ b/assets/text.html-uo1hSvmv.js @@ -0,0 +1,2 @@ +import{_ as k,c as u,e,a as s,d as t,b as a,w as c,r as o,o as i}from"./app-CefLgoES.js";const y="/node-red-contrib-home-assistant-websocket/assets/text_01-D7Qj4SJH.png",g={},d={id:"mode",tabindex:"-1"},b={class:"header-anchor",href:"#mode"},m={id:"text-1",tabindex:"-1"},f={class:"header-anchor",href:"#text-1"};function h(v,n){const p=o("Badge"),r=o("InfoPanelOnly"),l=o("DocsOnly");return i(),u("div",null,[n[4]||(n[4]=e('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Text

    The Text node creates a text entity within Home Assistant that can be manipulated from Node-RED. Text entities are used to store and display text values, and this node allows you to dynamically update and control these values within your automations.

    Configuration

    ',4)),s("h3",d,[s("a",b,[s("span",null,[n[0]||(n[0]=t("Mode ")),a(p,{text:"required"})])])]),n[5]||(n[5]=s("ul",null,[s("li",null,"Type: 'listen' | 'get' | 'set'")],-1)),n[6]||(n[6]=s("p",null,"The mode of the node",-1)),s("h3",m,[s("a",f,[s("span",null,[n[1]||(n[1]=t("Text ")),a(p,{text:"required"})])])]),n[7]||(n[7]=e('
    • Type: string

    The string of the entity should be updated to

    Inputs

    properties of msg.payload

    Text

    • Type: string

    The string of the text entity should be updated to

    Outputs

    Value types:

    • value: The text string of the entity
    • previous value: The previous text string of the entity
    • config: The config properties of the node

    Examples

    ',11)),a(r,null,{default:c(()=>n[2]||(n[2]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/text.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),a(l,null,{default:c(()=>n[3]||(n[3]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"dfc9e6f2b6ed5571"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"87c9fa353286db95"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"87c9fa353286db95"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random string"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg.payload = Math.random().toString(36).substring(2, 10);\\n\\nreturn msg;"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"296"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"f2a130d21700183b"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"871c3d4514b6adf5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"276"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"208"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"19ba2e97602e8052"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"541bfa3ffd06ec54"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"118"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"208"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"871c3d4514b6adf5"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f2a130d21700183b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"541bfa3ffd06ec54"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"458"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"abf17eb28388908a"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"abf17eb28388908a"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"628"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"112"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cfdda78a4cc69c43"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"4"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeToHomeAssistant"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfilter"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text.test_text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfiltertype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"exact"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputinitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haltifstate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_only_on_state_change"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entityState"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"eventData"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"184"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"256"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"ad7370fad9297783"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ad7370fad9297783"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"event state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous.old_state.state & \\" : \\" & payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"422"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"256"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2a2de323bc72c720"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"64"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"f888cc8fd9e941d4"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c29c8b6386defada"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"text.test_text"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"value\\": payload }"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"488"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"64"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f888cc8fd9e941d4"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"random string"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg.payload = Math.random().toString(36).substring(2, 10);\\n\\nreturn msg;"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"296"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"64"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"c29c8b6386defada"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"834d55ad3daf03df"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"114"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"160"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"9fba568d70b10862"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9fba568d70b10862"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"541bfa3ffd06ec54"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"458"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"160"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"c2cfe2d328d54aa3"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"c2cfe2d328d54aa3"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"22cd01e6b12bd120"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previous & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"628"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"160"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"541bfa3ffd06ec54"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test text"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"mode"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"text"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"min_length"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"max_length"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"pattern"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),t(` +`),s("span",{class:"line"})])])],-1)])),_:1})])}const T=k(g,[["render",h],["__file","text.html.vue"]]),_=JSON.parse('{"path":"/node/text.html","title":"Text","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Mode","slug":"mode","link":"#mode","children":[]},{"level":3,"title":"Text","slug":"text-1","link":"#text-1","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"Text","slug":"text-2","link":"#text-2","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/text.md"}');export{T as comp,_ as data}; diff --git a/assets/text_01-D7Qj4SJH.png b/assets/text_01-D7Qj4SJH.png new file mode 100644 index 0000000000..0bdf752dbb Binary files /dev/null and b/assets/text_01-D7Qj4SJH.png differ diff --git a/assets/time-entity.html-3VEsG7Bu.js b/assets/time-entity.html-3VEsG7Bu.js new file mode 100644 index 0000000000..d200efae18 --- /dev/null +++ b/assets/time-entity.html-3VEsG7Bu.js @@ -0,0 +1,2 @@ +import{_ as k,c as u,e,a as s,d as t,b as a,w as c,r as o,o as i}from"./app-CefLgoES.js";const y="/node-red-contrib-home-assistant-websocket/assets/time_entity_01-Brx2iLlv.png",g={},d={id:"mode",tabindex:"-1"},m={class:"header-anchor",href:"#mode"},f={id:"value",tabindex:"-1"},b={class:"header-anchor",href:"#value"};function h(v,n){const p=o("Badge"),r=o("InfoPanelOnly"),l=o("DocsOnly");return i(),u("div",null,[n[4]||(n[4]=e('

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Time

    The Time Entity node creates a time entity within Home Assistant that can be controlled from Node-RED. This entity type is used to represent time values, such as a specific time of day or a duration, and can be used to trigger automations based on time-related conditions.

    Configuration

    ',4)),s("h3",d,[s("a",m,[s("span",null,[n[0]||(n[0]=t("Mode ")),a(p,{text:"required"})])])]),n[5]||(n[5]=s("ul",null,[s("li",null,"Type: 'listen' | 'get' | 'set'")],-1)),n[6]||(n[6]=s("p",null,"The mode of the node",-1)),s("h3",f,[s("a",b,[s("span",null,[n[1]||(n[1]=t("Value ")),a(p,{text:"required"})])])]),n[7]||(n[7]=e('
    • Type: string
    • Format: HH:mm:ss | HH:mm

    The value of the entity should be updated to

    Inputs

    properties of msg.payload

    value

    • Type: string
    • Format: HH:mm:ss | HH:mm

    The value of the entity should be updated to

    Outputs

    Value types:

    • value: The value of the entity
    • previous value: The previous value of the entity
    • config: The config properties of the node

    Examples

    ',11)),a(r,null,{default:c(()=>n[2]||(n[2]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/time-entity.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),a(l,null,{default:c(()=>n[3]||(n[3]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5a3098079cfdd280"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"server-state-changed"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"4"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"exposeToHomeAssistant"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfilter"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time.time_test"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityidfiltertype"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"exact"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputinitially"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haltifstate"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"halt_if_compare"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"is"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"output_only_on_state_change"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"for"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"num"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"forUnits"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"minutes"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateNull"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignorePrevStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"eventData"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"216"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"624"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"af4b36c8422aec66"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"af4b36c8422aec66"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"event state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload.old_state.state & \\" : \\" & payload.new_state.state"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"522"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"624"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2f80e30a8dc150d8"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"508"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"576"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1a40e5a4d0f530d2"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"154"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"336"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"621d17a1e3fbb9a5"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4c727df1bc583e44"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"api-call-service"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"5"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"domain"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"service"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set_value"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"areaId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityId"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"time.time_test"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"data"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"{\\"time\\": payload}"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"dataType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mergeContext"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mustacheAltTags"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"queue"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"none"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"528"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"480"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"2a4a0d5fc9bb8d86"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue & \\" : \\" & payload "'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"636"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"336"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f3b9c9fb22295113"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"154"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"528"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"d5731b07e4893926"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"276afdfb58fe76f1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"debug"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"active"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tosidebar"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"console"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"tostatus"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"complete"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"targetType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusVal"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"statusType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"auto"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"508"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"528"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"8954ce09cca90f63"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-time-entity"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"listen time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa434795e5d1be74"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"listen"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"156"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"576"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2f80e30a8dc150d8"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d5731b07e4893926"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-time-entity"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa434795e5d1be74"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"get"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"290"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"528"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"276afdfb58fe76f1"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa09042625445217"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-time-entity"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugenabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa434795e5d1be74"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"set"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"value"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"propertyType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"msg"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"valueType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"previousValue"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"494"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"336"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"2a4a0d5fc9bb8d86"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"458c8d233a9d18af"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"155"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"288"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"74d5dc5ff4d3c0cb"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"9c23cc9f504fa4a1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link in"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"HH:MM:SS"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"156"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"7e92542f4ff33de0"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"l"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cd50b5472f373ad6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link in"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"HH:MM"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"146"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"801e1e33127e8d4c"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"l"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"true"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7e92542f4ff33de0"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"generate time HH:MM:SS"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},"\"const randomHour = Math.floor(Math.random() * 24);\\nconst randomMinute = Math.floor(Math.random() * 60);\\nconst randomSecond = Math.floor(Math.random() * 60);\\n\\nmsg.payload = `${randomHour}:${randomMinute\\n .toString()\\n .padStart(2, '0')}:${randomSecond.toString().padStart(2, '0')}`;\\n\\n\\nreturn msg;\""),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"351"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"1b78615c029b6dab"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"801e1e33127e8d4c"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"function"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"generate time HH:MM"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"func"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},"\"const randomHour = Math.floor(Math.random() * 24);\\nconst randomMinute = Math.floor(Math.random() * 60);\\n\\nmsg.payload = `${randomHour}:${randomMinute\\n .toString()\\n .padStart(2, '0')}`;\\n\\n\\nreturn msg;\""),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputs"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"noerr"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"initialize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"finalize"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"libs"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"341"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"cc16260a68095e77"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"1b78615c029b6dab"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link out"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link out 1"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"return"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"519"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"cc16260a68095e77"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link out"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link out 2"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"mode"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"return"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"519"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"74d5dc5ff4d3c0cb"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"9c23cc9f504fa4a1"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"310"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"288"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa09042625445217"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"621d17a1e3fbb9a5"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"cd50b5472f373ad6"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"300"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"336"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa09042625445217"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"decebfa96ff2b375"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"154"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"480"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"5e44eb1c1de80d82"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"34e9926f8d967e47"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"154"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"432"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"e711fd4eb0f21d6f"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e711fd4eb0f21d6f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"9c23cc9f504fa4a1"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"310"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"432"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4c727df1bc583e44"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"5e44eb1c1de80d82"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"link call"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"links"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"cd50b5472f373ad6"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"linkType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"static"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"timeout"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"30"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"300"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"480"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"4c727df1bc583e44"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"861b8a79994a76cd"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"7f704f92ee3c3f87"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"invalid"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"invalid"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"153"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"384"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa09042625445217"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa434795e5d1be74"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"65bf2a1a7e89a8d9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time test"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"time test"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"65bf2a1a7e89a8d9"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-device-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"test device"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"hwVersion"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"manufacturer"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Node-RED"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"model"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"swVersion"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),t(` +`),s("span",{class:"line"})])])],-1)])),_:1})])}const T=k(g,[["render",h],["__file","time-entity.html.vue"]]),w=JSON.parse('{"path":"/node/time-entity.html","title":"Time","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Mode","slug":"mode","link":"#mode","children":[]},{"level":3,"title":"Value","slug":"value","link":"#value","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"value","slug":"value-1","link":"#value-1","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"node/time-entity.md"}');export{T as comp,w as data}; diff --git a/assets/time.html-BptDmMJt.js b/assets/time.html-BptDmMJt.js new file mode 100644 index 0000000000..a05707d9ac --- /dev/null +++ b/assets/time.html-BptDmMJt.js @@ -0,0 +1 @@ +import{_ as t,c as i,e as a,o as l}from"./app-CefLgoES.js";const o={};function n(d,e){return l(),i("div",null,e[0]||(e[0]=[a('

    Time

    The Time node can be scheduled to trigger at a specific future date and time, based on a Home Assistant entity. This node is useful for creating time-based automations, such as triggering a notification or alarm at a specific hour.

    Configuration

    Entity Id

    • Type: string

    A Home Assistant entity to be used when scheduling the node.

    Property

    • Type: string

    Which property of the entity object to use to schedule the node.

    example properties:

    • entity_id
    • state
    • attributes.date
    • last_updated

    example values for the property:

    • 2020-12-31T02:47:54.837Z
    • 1609382842709
    • 13:40
    • 23:59:02

    Offset

    • Type: number

    A negative or positive number that will be added to the scheduled time.

    Randomize time within the offset

    • Type: boolean

    When selected the time to trigger will be random selected from the scheduled time to the +/- offset.

    Payload

    • Type: string | number | boolean | object

    The payload is fully customizable. The default will be a JSONata expression that outputs the entity state.

    Repeat Daily

    • Type: boolean

    If selected the node will only use the time portion of the date string to schedule the node and will trigger at that time each day. Otherwise, the node will only trigger once at the given day and time.

    Expose as

    • Type: string

    When an entity is selected a switch entity will be created in Home Assistant. Turning on and off this switch will disable/enable the nodes in Node-RED.

    Outputs

    topic

    • Type: string

    The entity id in the configuration.

    payload

    • Type: string | number | boolean | object

    data

    • Type: object

    The entity object of the entity in the configuration.

    ',37)]))}const r=t(o,[["render",n],["__file","time.html.vue"]]),h=JSON.parse('{"path":"/node/time.html","title":"Time","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity Id","slug":"entity-id","link":"#entity-id","children":[]},{"level":3,"title":"Property","slug":"property","link":"#property","children":[]},{"level":3,"title":"Offset","slug":"offset","link":"#offset","children":[]},{"level":3,"title":"Randomize time within the offset","slug":"randomize-time-within-the-offset","link":"#randomize-time-within-the-offset","children":[]},{"level":3,"title":"Payload","slug":"payload","link":"#payload","children":[]},{"level":3,"title":"Repeat Daily","slug":"repeat-daily","link":"#repeat-daily","children":[]},{"level":3,"title":"Expose as","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"topic","slug":"topic","link":"#topic","children":[]},{"level":3,"title":"payload","slug":"payload-1","link":"#payload-1","children":[]},{"level":3,"title":"data","slug":"data","link":"#data","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5},{"name":"t1diotac","email":"87152403+t1diotac@users.noreply.github.com","commits":1}]},"filePathRelative":"node/time.md"}');export{r as comp,h as data}; diff --git a/assets/time_entity_01-Brx2iLlv.png b/assets/time_entity_01-Brx2iLlv.png new file mode 100644 index 0000000000..67f7de0e1a Binary files /dev/null and b/assets/time_entity_01-Brx2iLlv.png differ diff --git a/assets/trigger-state.html-CY-rAJPk.js b/assets/trigger-state.html-CY-rAJPk.js new file mode 100644 index 0000000000..4ef4fbfd9e --- /dev/null +++ b/assets/trigger-state.html-CY-rAJPk.js @@ -0,0 +1,10 @@ +import{_ as p,c as d,a as t,d as n,b as a,e as s,w as c,r as o,o as r}from"./app-CefLgoES.js";const u={},h={id:"entity",tabindex:"-1"},g={class:"header-anchor",href:"#entity"};function b(f,e){const i=o("Badge"),l=o("RouteLink");return r(),d("div",null,[e[2]||(e[2]=t("h1",{id:"trigger-state",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#trigger-state"},[t("span",null,"Trigger: state")])],-1)),e[3]||(e[3]=t("p",null,"The Trigger: State node functions similarly to the State Changed Node but provides advanced functionality for common automation use cases. This node allows for more complex conditions and actions based on entity state changes, making it a powerful tool for creating detailed and nuanced automations.",-1)),e[4]||(e[4]=t("h2",{id:"configuration",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configuration"},[t("span",null,"Configuration")])],-1)),t("h3",h,[t("a",g,[t("span",null,[e[0]||(e[0]=n("Entity ")),a(i,{text:"required"})])])]),e[5]||(e[5]=s('
    • Type: string

      The entity ID is used to listen for state changes. This can be a entity ID, regex, or a substring. If a regex or substring is used, the node will listen for all entities that match.

    Example:

    • light.kitchen (entity) listens for state changes of the light.kitchen entity
    • ^light.* (regex) listens for state changes of all entities that start with light.
    • light (substring) listens for state changes of all entities that contain light in the entity ID

    State Type

    • Type: string
    • Values: string|number|boolean
    • Default: string

    Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state

    Conditions

    This node has two default outputs "allowed" and "blocked". If all the conditions are true the default message will be sent to the "allowed" output otherwise, it will be sent to the "blocked" output.

    See Also:

    ',9)),t("ul",null,[t("li",null,[a(l,{to:"/guide/conditionals.html"},{default:c(()=>e[1]||(e[1]=[n("Conditionals")])),_:1})])]),e[6]||(e[6]=s(`

    Custom Outputs

    All the above conditions need to be true for any custom outputs to be sent, having zero conditions is a valid option. Each custom output can send the default message or a custom message. Also, each one can have its constraint on whether or not to be sent.

    Output on connect

    • Type: boolean

    Output once on startup/deployment.

    Enable input

    • Type: boolean

    Enable the input to be used to send a message to the node.

    Output debug information

    • Type: boolean

    Output debug information to the debug tab.

    Expose to Home Assistant

    • Type: boolean

    Expose the node to Home Assistant.

    Input

    Input is disabled by default. It can be enabled using the Enable Input option. Input can be used to enable/disable the node or for testing.

    Enable / Disable

    • Type: string

    If the incoming payload or message is a string and equal to enable or disable then set the node accordingly. Saves over restarts.

    Output

    topic

    • Type: string

    The entity_id that triggered the node

    payload

    • Type: string

    The state as sent by home assistant

    data

    • Type: object

    The original home assistant event containing entity_id new_state and old_state properties

    Testing

    To test automation without having to manually change the state in home assistant send an input payload as an object which contains entity_id, new_state, and old_state properties. This will trigger the node as if the event came from Home Assistant.

    {
    +  "entity_id": "test_entity",
    +  "old_state": {
    +    "state": "on"
    +  },
    +  "new_state": {
    +    "state": "off"
    +  }
    +}
    +

    References

    `,34))])}const y=p(u,[["render",b],["__file","trigger-state.html.vue"]]),k=JSON.parse('{"path":"/node/trigger-state.html","title":"Trigger: state","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entity","slug":"entity","link":"#entity","children":[]},{"level":3,"title":"State Type","slug":"state-type","link":"#state-type","children":[]},{"level":3,"title":"Conditions","slug":"conditions","link":"#conditions","children":[]},{"level":3,"title":"Custom Outputs","slug":"custom-outputs","link":"#custom-outputs","children":[]},{"level":3,"title":"Output on connect","slug":"output-on-connect","link":"#output-on-connect","children":[]},{"level":3,"title":"Enable input","slug":"enable-input","link":"#enable-input","children":[]},{"level":3,"title":"Output debug information","slug":"output-debug-information","link":"#output-debug-information","children":[]},{"level":3,"title":"Expose to Home Assistant","slug":"expose-to-home-assistant","link":"#expose-to-home-assistant","children":[]}]},{"level":2,"title":"Input","slug":"input","link":"#input","children":[{"level":3,"title":"Enable / Disable","slug":"enable-disable","link":"#enable-disable","children":[]}]},{"level":2,"title":"Output","slug":"output","link":"#output","children":[{"level":3,"title":"topic","slug":"topic","link":"#topic","children":[]},{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]},{"level":3,"title":"data","slug":"data","link":"#data","children":[]}]},{"level":2,"title":"Testing","slug":"testing","link":"#testing","children":[]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":11},{"name":"Mauricio Bonani","email":"bonanitech@gmail.com","commits":1}]},"filePathRelative":"node/trigger-state.md"}');export{y as comp,k as data}; diff --git a/assets/trigger-state.html-jy6oIFcc.js b/assets/trigger-state.html-jy6oIFcc.js new file mode 100644 index 0000000000..35b5b3ec39 --- /dev/null +++ b/assets/trigger-state.html-jy6oIFcc.js @@ -0,0 +1,46 @@ +import{_ as e,c as u,e as c,a as n,b as t,w as o,r,o as l,d as p}from"./app-CefLgoES.js";const i="/node-red-contrib-home-assistant-websocket/assets/jsonata_4_1-CfZXdRrw.png",k={};function q(g,s){const a=r("RouteLink");return l(),u("div",null,[s[2]||(s[2]=c('

    Trigger: state

    The Trigger: state node is very similar to the Events: state node. It will trigger when a given entity state changes, but unlike the Events: state, the Trigger: state node has the opportunity to add conditions using UI fields to construct complex tests. This removes much of the need to manage conditional tests using JSONata.

    JSONata can be used in several places within this node. However real practical use is quite limited. Although the Trigger node has extensive conditional testing included as UI setting, it does not have access to the $entity() or $entities() function in the conditions. The example given here is rather simplistic and contrived to demonstrate that JSONata can be used, rather than focusing on a genuinue or realistic use-case.

    screenshot

    Example: Respond every five minutes during the hour before and hour after sunset.

    [{"id":"3a2face9747195a7","type":"group","z":"776c027950fc8c3f","name":"Trigger: state node - respond to state changes","style":{"label":true,"color":"#000000"},"nodes":["320b22abb5a9ea96","da88972398c7ed97","c2d9f44ffe436dcc","2144de490d4257d7","94ceadbce4b45cdf","79b056d9779ec8f1","360fe19e1e203539","247cbab5f584ea63","0509fc220ff7735e","8fc293f5015dd3d5"],"x":34,"y":1359,"w":872,"h":302},{"id":"320b22abb5a9ea96","type":"inject","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Testing","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\\t   \\"entity_id\\": \\"sensor.time_utc\\",\\t   \\"old_state\\": {\\"state\\": \\"16:49\\"},\\t   \\"new_state\\": {\\"state\\": \\"16:50\\"}\\t}","payloadType":"jsonata","x":130,"y":1400,"wires":[["da88972398c7ed97"]]},{"id":"da88972398c7ed97","type":"trigger-state","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Actions around sunset","server":"","version":4,"inputs":1,"outputs":3,"exposeAsEntityConfig":"","entityId":"sensor.time_utc","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"includes","comparatorValueDatatype":"jsonata","comparatorValue":"(\\t/* UTC sunrise & sunset to 5 mins, month average (London UK) */\\t/* Jan-Dec, Feb-Nov, Mar-Oct, Apr-Sep, May-Aug, Jun-Jly      */\\t    $times:=[[\\"07:55\\", \\"16:20\\"],\\t             [\\"07:15\\", \\"16:45\\"],\\t             [\\"06:00\\", \\"17:35\\"],\\t             [\\"05:15\\", \\"18:30\\"],\\t             [\\"04:30\\", \\"19:30\\"],\\t             [\\"04:05\\", \\"20:05\\"]];\\t\\t/* get this month (Jan=0), lookup sun-times table, return sun rise-set for this month */\\t    $mtable:=[0..11].$min([$, $abs($-11)]);\\t    $mindex:=$now('[M]').$number()-1;\\t\\t/* get sunset and build array of condition test-times around this */\\t    $sunset:=($times[$mtable[$mindex]])[1];\\t    $h:=$number($substringBefore($sunset, \\":\\"));\\t    $m:=$number($substringAfter($sunset, \\":\\"));\\t\\t/* for span period mins, generate array of times and select every nth */\\t    $span:=60;\\t    $nth:=5;\\t\\t    $t:=$h*60+$m-$span;\\t    ([$t..$t+$span*2])#$i.(\\t        $h:=$floor($/60);\\t        $m:=$%60;\\t        $i%$nth=0 ? $formatInteger($h,'99') & \\":\\" & $formatInteger($m, '99');\\t    )\\t)"}],"customOutputs":[{"messageType":"custom","messageValue":"(\\t    $sunset:=$entities('sensor.sun_next_setting').state;\\t    $togo:= ($toMillis($sunset)-$millis())/60000~>$floor();\\t    $toset:= $togo < 180 ? $togo : $togo-1440;\\t    $x:= $toset-25;\\t    $pc:= $x<0 and $x>-55 ? $min([$abs($x)*2, 100]) : null;\\t\\t    {\\"topic\\": \\"Minutes to Sunset\\",\\t     \\"payload\\": $toset,\\t     \\"time\\": $entities('sensor.time').state,\\t     \\"sunset\\": $sunset,\\t     \\"percent\\": $pc\\t    }\\t)","messageValueType":"jsonata","comparatorPropertyType":"always","comparatorPropertyValue":"","comparatorType":"is","comparatorValue":"","comparatorValueDataType":"jsonata"}],"outputInitially":false,"stateType":"str","enableInput":true,"x":300,"y":1440,"wires":[["c2d9f44ffe436dcc"],[],["2144de490d4257d7","247cbab5f584ea63"]]},{"id":"c2d9f44ffe436dcc","type":"debug","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Every 5 mins around sunset","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":580,"y":1400,"wires":[]},{"id":"2144de490d4257d7","type":"switch","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Sunset Actions","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"4","v2t":"num"},{"t":"btwn","v":"10","vt":"num","v2":"14","v2t":"num"},{"t":"btwn","v":"0","vt":"num","v2":"-30","v2t":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":4,"x":540,"y":1480,"wires":[["94ceadbce4b45cdf"],["79b056d9779ec8f1"],["360fe19e1e203539"],[]]},{"id":"94ceadbce4b45cdf","type":"debug","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"At Sunset","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":780,"y":1440,"wires":[]},{"id":"79b056d9779ec8f1","type":"debug","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Just Before","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":790,"y":1500,"wires":[]},{"id":"360fe19e1e203539","type":"debug","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Just After","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":780,"y":1560,"wires":[]},{"id":"247cbab5f584ea63","type":"change","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Brightness 0-100% over 50 min","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\\t    \\"domain\\": \\"homeassistant\\",\\t    \\"service\\": \\"turn_on\\",\\t    \\"target\\": {\\t        \\"entity_id\\": [\\"light.front_door\\", \\"switch.hall_light\\"]\\t        },\\t    \\"data\\": {\\t        \\"brightness_pct\\": percent\\t    }\\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1620,"wires":[["8fc293f5015dd3d5"]]},{"id":"0509fc220ff7735e","type":"api-call-service","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"","server":"","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":1620,"wires":[[]]},{"id":"8fc293f5015dd3d5","type":"switch","z":"776c027950fc8c3f","g":"3a2face9747195a7","name":"Not null","property":"payload.data.brightness_pct","propertyType":"msg","rules":[{"t":"nnull"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":1620,"wires":[["0509fc220ff7735e"]]}]
    +

    Sunrise and sunset times are often critical to running automations, and Home Assistant has inbuilt entities that provide the next dawn, sunrise, dusk, and sunset times. In order to be able to respond to multiple events during the period both before and after sunset, it is necessary to trigger at a more regular interval, not just on the sun-events, and then to test for required times or periods before and after sunset.

    The Trigger: state node can be set to use the sensor.time_utc entity as the subject of the node. This sensor holds UTC time as "hh:mm", and will change every minute, thus triggering a state change at regular 60 second intervals. We can add conditions to test the time against an expected period around sunset, and to generate a customised output that includes given periods or times before or after sunset. Combined with a Switch node this permits multiple tests and multiple automation events to be actioned.

    Using JSONata to set a condition value

    Here JSONata is used to generate an array of times of interest. When the trigger entity state, UTC time "hh:mm", is included in the calculated array, the condition is met and a message will be output.

    Since JSONata does not have access to the $entities() function in this particular UI field, the code here is used to generate a period of interest based on hard-coded sunrise and sunset times according to the current month. This is not ideal, but does demonstrate how JSONata can be used to easily generate and manipulate various JSON structures.

    (
    +/* UTC sunrise & sunset to 5 mins, month average (London UK) */
    +/* Jan-Dec, Feb-Nov, Mar-Oct, Apr-Sep, May-Aug, Jun-Jly      */
    +    $times:=[["07:55", "16:20"],
    +             ["07:15", "16:45"],
    +             ["06:00", "17:35"],
    +             ["05:15", "18:30"],
    +             ["04:30", "19:30"],
    +             ["04:05", "20:05"]];
    +
    +/* get this month (Jan=0), lookup sun-times table, return sun rise-set for this month */
    +    $mtable:=[0..11].$min([$, $abs($-11)]);
    +    $mindex:=$now('[M]').$number()-1;
    +
    +/* get sunset and build array of condition test-times around this */
    +    $sunset:=($times[$mtable[$mindex]])[1];
    +    $h:=$number($substringBefore($sunset, ":"));
    +    $m:=$number($substringAfter($sunset, ":"));
    +
    +/* for span period mins, generate array of times and select every nth */
    +    $span:=60;
    +    $nth:=5;
    +
    +    $t:=$h*60+$m-$span;
    +    ([$t..$t+$span*2])#$i.(
    +        $h:=$floor($/60);
    +        $m:=$%60;
    +        $i%$nth=0 ? $formatInteger($h,'99') & ":" & $formatInteger($m, '99');
    +    )
    +)
    +

    This code uses the current month to lookup a given sunset time, and then to generate an array of times either side of expected sunset, using a given span in minutes, and then picking out every five minutes only.

    The figures provided are examples, based on UTC times (DST ignored) for location London, UK and estimate an average sunrise and sunset time for each calendar month. Since sun events can move by up to one hour from start to end of a month, a span of at least 30 minutes is required to successfully include events across the entire month.

    Using JSONata to create a custom message

    The output properties on successful trigger include a default message and a default payload, which includes the basic event details for the trigger entity. It is possible to set the output as a customised payload, which replaces msg.payload with specific output, or as a customised message, which replaces the entire message with a generated object.

    (
    +    $sunset:=$entities('sensor.sun_next_setting').state;
    +    $togo:= ($toMillis($sunset)-$millis())/60000~>$floor();
    +    $toset:= $togo < 180 ? $togo : $togo-1440;
    +    $x:= $toset-25;
    +    $pc:= $x<0 and $x>-55 ? $min([$abs($x)*2, 100]) : null;
    +
    +    {"topic": "Minutes to Sunset",
    +     "payload": $toset,
    +     "time": $entities('sensor.time').state,
    +     "sunset": $sunset,
    +     "percent": $pc
    +    }
    +)
    +

    The $entities() function is available in JSONata in the output properties UI field, which means that both current time and sunset time can be obtained and compared. This allows some simple JSONata code to generate a complete message object, including msg.topic and msg.payload with the exact minutes to the next sunset correctly calculated.

    For automation, all that is required is a following Switch node set to route on a message property, for example msg.payload as minutes to next sunset between 0 and 4 (based on a five minute trigger interval) so as to be able to run an automation just as sunset is about to take place (with a five minute discrimination).

    As a further example, the JSONata output calculates a percentage value going from 0 to 100 over the period 25 minutes before to 25 minutes after sunset, with the percentage value set to 'null' outside this time. The Change node following also uses JSONata to create the entire Service Call node input settings, to turn on a group of lights in an timed-incremental fashion.

    Also see:

    `,21)),n("ul",null,[n("li",null,[t(a,{to:"/guide/jsonata/"},{default:o(()=>s[0]||(s[0]=[p("JSONata guide")])),_:1})]),n("li",null,[t(a,{to:"/guide/jsonata/jsonata-primer.html"},{default:o(()=>s[1]||(s[1]=[p("JSONata primer")])),_:1})])])])}const d=e(k,[["render",q],["__file","trigger-state.html.vue"]]),m=JSON.parse('{"path":"/cookbook/jsonata/trigger-state.html","title":"Trigger: state","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"Using JSONata to set a condition value","slug":"using-jsonata-to-set-a-condition-value","link":"#using-jsonata-to-set-a-condition-value","children":[]},{"level":3,"title":"Using JSONata to create a custom message","slug":"using-jsonata-to-create-a-custom-message","link":"#using-jsonata-to-create-a-custom-message","children":[]}],"git":{"updatedTime":1719788083000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":2}]},"filePathRelative":"cookbook/jsonata/trigger-state.md"}');export{d as comp,m as data}; diff --git a/assets/update-config.html-D7qJGits.js b/assets/update-config.html-D7qJGits.js new file mode 100644 index 0000000000..995b9cbbed --- /dev/null +++ b/assets/update-config.html-D7qJGits.js @@ -0,0 +1,8 @@ +import{_ as k,c as i,e as c,a as s,d as a,b as t,w as o,r as p,o as u}from"./app-CefLgoES.js";const y="/node-red-contrib-home-assistant-websocket/assets/update_config_use01-BXE5av9O.png",d={};function g(m,n){const e=p("RouteLink"),r=p("InfoPanelOnly"),l=p("DocsOnly");return u(),i("div",null,[n[10]||(n[10]=c('

    Update Config

    The Update Config node allows you to update the configuration of entities within Home Assistant. This node is used for dynamically adjusting the settings of entities, ensuring they stay in sync with your automation requirements.

    Configuration

    Name

    • Type: string

    A name for the node.

    Server

    • Type: string
    ',8)),s("p",null,[n[1]||(n[1]=a("The node id of a ")),t(e,{to:"/node/config-server.html"},{default:o(()=>n[0]||(n[0]=[a("Server Config")])),_:1}),n[2]||(n[2]=a(" node."))]),n[11]||(n[11]=s("h3",{id:"entity-config",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#entity-config"},[s("span",null,"Entity Config")])],-1)),n[12]||(n[12]=s("ul",null,[s("li",null,[a("Type: "),s("code",null,"string")])],-1)),s("p",null,[n[4]||(n[4]=a("The node id of an ")),t(e,{to:"/node/entity-config.html"},{default:o(()=>n[3]||(n[3]=[a("entity config")])),_:1}),n[5]||(n[5]=a(". This can be overridden by the ")),n[6]||(n[6]=s("code",null,"payload.id",-1)),n[7]||(n[7]=a(" property on the msg object."))]),n[13]||(n[13]=c(`

    Inputs

    All properties must be under msg.payload and will be ignored if not.

    Example input

    Example of the msg.payload object.

    {
    +  "id": "d9d27ac6b4ebf78f",
    +  "icon": "mdi:lightbulb",
    +  "name": "My Light",
    +  "entityPicture": "/local/images/my_light.png"
    +}
    +

    id

    • Type: string

    The node id of an entity config.

    icon

    • Type: string

    The icon to use for the entity.

    name

    • Type: string

    The friendly name to use for the entity.

    entityPicture

    • Type: string

    The entity picture to use for the entity.

    Examples

    `,18)),t(r,null,{default:o(()=>n[8]||(n[8]=[s("p",null,[s("a",{href:"https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/update-config.html#examples",target:"_blank",rel:"noopener noreferrer"},"link")],-1)])),_:1}),t(l,null,{default:o(()=>n[9]||(n[9]=[s("h4",{id:"usage-example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage-example"},[s("span",null,"Usage example")])],-1),s("p",null,[s("img",{src:y,alt:"screenshot"})],-1),s("div",{class:"language-json","data-highlighter":"prismjs","data-ext":"json","data-title":"json"},[s("pre",null,[s("code",null,[s("span",{class:"line"},[s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f74eb5b7233cf386"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"828"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"f01a6d954835e535"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"f01a6d954835e535"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"example one"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e4293de95073f8cd"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$round($random() * 100, 0)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"stateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"attributes"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputOverride"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"allow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1002"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"192"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"fa343985973ac02b"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-update-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d18ff4919779da55"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1016"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"288"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d9d27ac6b4ebf78f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"override id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},`"(\\t $icons := [\\t 'mdi:home-assistant',\\t 'mdi:home',\\t 'mdi:home-outline',\\t 'mdi:home-variant',\\t 'mdi:home-variant-outline',\\t 'mdi:home-city'\\t ];\\t $simpsons := [\\t \\"homer\\",\\t \\"marge\\",\\t \\"bart\\",\\t \\"lisa\\",\\t \\"maggie\\"\\t ];\\t $character := $shuffle($simpsons)[0];\\t {\\t \\"name\\": $character,\\t \\"id\\": \\"e4293de95073f8cd\\",\\t \\"icon\\": $shuffle($icons)[0],\\t \\"entityPicture\\": \\"/local/\\" & $character & \\".png\\"\\t }\\t)"`),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"828"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"336"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa343985973ac02b"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"4171499cb42d4c08"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"use default id"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"(\\t $simpsons := [\\"homer\\", \\"marge\\", \\"bart\\", \\"lisa\\", \\"maggie\\"];\\t {\\"name\\": $shuffle($simpsons)[0] ,\\"icon\\":\\"\\"}\\t)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"834"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"288"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"fa343985973ac02b"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"94e86f1c0b4f113d"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"example two"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d18ff4919779da55"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"state"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"$round($random() * 100, 0)"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"stateType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"jsonata"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"attributes"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"inputOverride"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"allow"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"outputProperties"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"1002"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0d31aa0621b4fe6f"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"inject"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"z"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"0cd8900387d67b70"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"props"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"payload"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"p"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"topic"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"vt"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"str"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"repeat"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"crontab"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"once"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"onceDelay"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"0.1"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"topic"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payload"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"payloadType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"date"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"x"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"828"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"y"'),s("span",{class:"token operator"},":"),s("span",{class:"token number"},"240"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"wires"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"["),s("span",{class:"token string"},'"94e86f1c0b4f113d"'),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"e4293de95073f8cd"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"example one"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Node-RED example one"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"device_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"unit_of_measurement"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"id"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"d18ff4919779da55"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"type"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"ha-entity-config"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"server"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"bf5874816710d0c7"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"deviceConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"name"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"example two"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"version"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"6"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"entityType"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"sensor"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"haConfig"'),s("span",{class:"token operator"},":"),s("span",{class:"token punctuation"},"["),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"name"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"Node-RED example one"'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"icon"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_category"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"entity_picture"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"device_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"unit_of_measurement"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"‎ "'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},","),s("span",{class:"token punctuation"},"{"),s("span",{class:"token property"},'"property"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'"state_class"'),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"value"'),s("span",{class:"token operator"},":"),s("span",{class:"token string"},'""'),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"resend"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},","),s("span",{class:"token property"},'"debugEnabled"'),s("span",{class:"token operator"},":"),s("span",{class:"token boolean"},"false"),s("span",{class:"token punctuation"},"}"),s("span",{class:"token punctuation"},"]")]),a(` +`),s("span",{class:"line"})])])],-1)])),_:1}),n[14]||(n[14]=a(" ``` "))])}const h=k(d,[["render",g],["__file","update-config.html.vue"]]),b=JSON.parse('{"path":"/node/update-config.html","title":"Update Config","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Name","slug":"name","link":"#name","children":[]},{"level":3,"title":"Server","slug":"server","link":"#server","children":[]},{"level":3,"title":"Entity Config","slug":"entity-config","link":"#entity-config","children":[]}]},{"level":2,"title":"Inputs","slug":"inputs","link":"#inputs","children":[{"level":3,"title":"Example input","slug":"example-input","link":"#example-input","children":[]},{"level":3,"title":"id","slug":"id","link":"#id","children":[]},{"level":3,"title":"icon","slug":"icon","link":"#icon","children":[]},{"level":3,"title":"name","slug":"name-1","link":"#name-1","children":[]},{"level":3,"title":"entityPicture","slug":"entitypicture","link":"#entitypicture","children":[]}]},{"level":2,"title":"Examples","slug":"examples","link":"#examples","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5}]},"filePathRelative":"node/update-config.md"}');export{h as comp,b as data}; diff --git a/assets/update_config_use01-BXE5av9O.png b/assets/update_config_use01-BXE5av9O.png new file mode 100644 index 0000000000..a8c7add039 Binary files /dev/null and b/assets/update_config_use01-BXE5av9O.png differ diff --git a/assets/using-date-and-time-entities-to-trigger-flows.html-B5ih83NL.js b/assets/using-date-and-time-entities-to-trigger-flows.html-B5ih83NL.js new file mode 100644 index 0000000000..593ef030e4 --- /dev/null +++ b/assets/using-date-and-time-entities-to-trigger-flows.html-B5ih83NL.js @@ -0,0 +1,6 @@ +import{_ as p,c as o,a as n,d as a,b as e,w as u,e as c,r,o as l}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/using-date-and-time-entities-to-trigger-flows_01-Bs8pdEv6.png",i="/node-red-contrib-home-assistant-websocket/assets/using-date-and-time-entities-to-trigger-flows_02-9ivWXXCe.png",q="/node-red-contrib-home-assistant-websocket/assets/using-date-and-time-entities-to-trigger-flows_04-DMd9Dm05.png",y="/node-red-contrib-home-assistant-websocket/assets/using-date-and-time-entities-to-trigger-flows_03-DsUrMQlD.png",g={};function d(m,s){const t=r("RouteLink");return l(),o("div",null,[s[3]||(s[3]=n("h1",{id:"using-date-and-time-entities-to-trigger-flows",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#using-date-and-time-entities-to-trigger-flows"},[n("span",null,"Using Date and Time entities to trigger flows")])],-1)),n("p",null,[s[1]||(s[1]=a("There is now a ")),e(t,{to:"/node/time.html"},{default:u(()=>s[0]||(s[0]=[a("time")])),_:1}),s[2]||(s[2]=a(" node that simplifies the example flows below into one node."))]),s[4]||(s[4]=c(`

    Using the time node

    • Home Assistant Companion app next alarm sensor

      [{"id":"f8329c.6b39dd68","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityId":"sensor.pixel_next_alarm","property":"state","offset":0,"offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":false,"payload":"$entity().state","payloadType":"jsonata","debugenabled":true,"x":262,"y":864,"wires":[["513ebdd1.58be64"]]},{"id":"513ebdd1.58be64","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":492,"y":864,"wires":[]}]
      +
    • Adding an offset and on/off switch by exposing the node the Home Assistant using the custom component.

      [{"id":"ff4c2fea.d7d15","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":"Enable next alarm"},{"property":"icon","value":""}],"entityId":"sensor.pixel_next_alarm","property":"state","offset":"$entities(\\"input_number.offset\\").state","offsetType":"jsonata","offsetUnits":"minutes","randomOffset":false,"repeatDaily":true,"payload":"$entity().state","payloadType":"jsonata","debugenabled":false,"x":216,"y":1184,"wires":[["fceff1c.3c74f1"]]},{"id":"fceff1c.3c74f1","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":444,"y":1184,"wires":[]}]
      +
    • Daily alarm using Datetime Entity

      [{"id":"68a7a591.c05a1c","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":"Alarm enabled"},{"property":"icon","value":""}],"entityId":"input_datetime.alarm","property":"state","offset":0,"offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":true,"payload":"$entity().state","payloadType":"jsonata","debugenabled":false,"x":238,"y":1488,"wires":[["96f4596a.01bed8"]]},{"id":"96f4596a.01bed8","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":444,"y":1488,"wires":[]}]
      +

    Home Assistant Companion app next alarm sensor

    Warning

    Home Assistant Companion app sets the entity's name based on its selected language. Eg. next_alarm must be changed in prossimo_allarme if the app is used in Italian (and vice versa)

    Here's a basic example of using the Home Assistant Companion app next alarm sensor.

    screenshot

    [{"id":"71576a68.4c7494","type":"server-state-changed","z":"56b1c979.b2c618","name":"Next Alarm","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pixel_next_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"x":236,"y":1456,"wires":[["17ff4332.e9872d"],["ffa8ad2e.133d4"]]},{"id":"ffa8ad2e.133d4","type":"change","z":"56b1c979.b2c618","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":386,"y":1504,"wires":[["664bcf1c.d25e8"]]},{"id":"17ff4332.e9872d","type":"function","z":"56b1c979.b2c618","name":"time difference","func":"const now = Date.now();\\nconst alarm = new Date(msg.payload);\\n\\nconst timeDifference = alarm - now;\\n\\nmsg.delay = timeDifference;\\n\\n// Reset the delay node before setting the new delay\\nreturn [[{reset: true},msg]];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":416,"y":1456,"wires":[["664bcf1c.d25e8"]]},{"id":"664bcf1c.d25e8","type":"delay","z":"56b1c979.b2c618","name":"wait until time","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":608,"y":1456,"wires":[["42742068.3eb4f"]]},{"id":"42742068.3eb4f","type":"debug","z":"56b1c979.b2c618","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":1456,"wires":[]}]
    +

    Adding an offset and on/off switch

    Using the Helpers section under Configuration in Home Assistant add an input_boolean and input_number with a min of -90 and a max of 90.

    In this example they are input_number.offset and input_boolean.next_alarm_enabled. The offset will be plus or minus minutes to the alarm. The delay node will get updated when either the alarm sensor gets updated, the input boolean gets toggled, or the offset changes.

    If the Node-RED custom component is installed in Home Assistant there is no need for the input_boolean as the event state node can be exposed to Home Assistant as the toggle switch.

    screenshot

    [{"id":"8a005b30.a70028","type":"change","z":"56b1c979.b2c618","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":1616,"wires":[["7443b388.3997bc"]]},{"id":"7443b388.3997bc","type":"delay","z":"56b1c979.b2c618","name":"wait until time","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1008,"y":1568,"wires":[["944beed4.7ca6c"]]},{"id":"944beed4.7ca6c","type":"debug","z":"56b1c979.b2c618","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1180,"y":1568,"wires":[]},{"id":"902c18e0.b83f08","type":"api-current-state","z":"56b1c979.b2c618","name":"enabled?","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.next_alarm_enabled","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":300,"y":1568,"wires":[["819e7961.c0c5b8"],["8a005b30.a70028"]]},{"id":"88557318.dcb9","type":"function","z":"56b1c979.b2c618","name":"add offset","func":"const now = Date.now();\\nconst alarm = new Date(msg.alarm);\\nconst offset = msg.offset * 60000;\\nconst timeDifference = alarm.getTime() + offset;\\nconst delay = timeDifference - now;\\n\\nif(delay < 0) {\\n    node.status({fill: 'red', text: 'Alarm in the past'});\\n    node.error(\\"Alarm in the past.\\");\\n    return {reset: true};\\n}\\n\\nnode.status({});\\nmsg.delay = delay\\n\\n// Reset the delay node before setting the new delay\\nreturn [[{reset: true},msg]];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":828,"y":1568,"wires":[["7443b388.3997bc"]]},{"id":"5f5d428e.e8ed8c","type":"api-current-state","z":"56b1c979.b2c618","name":"get offset","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.offset","state_type":"str","state_location":"offset","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":684,"y":1568,"wires":[["88557318.dcb9"]]},{"id":"6e621173.6634d","type":"server-state-changed","z":"56b1c979.b2c618","name":"Update Alarm","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.offset, input_boolean.next_alarm_enabled, sensor.pixel_next_alarm","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":1568,"wires":[["902c18e0.b83f08"]]},{"id":"819e7961.c0c5b8","type":"api-current-state","z":"56b1c979.b2c618","name":"get alarm time","version":1,"outputs":2,"halt_if":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","override_topic":true,"entity_id":"sensor.pixel_next_alarm","state_type":"str","state_location":"alarm","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":480,"y":1568,"wires":[["5f5d428e.e8ed8c"],["8a005b30.a70028"]]}]
    +

    Warning

    Delay nodes can have a max timeout of around 24.8 days greater than that and weird things will happen.

    Managing alarm from multiple phones

    If more than one phone in the house has the app installed and you want it to be triggered from any of the alarms this is the way to go and it's working perfectly even with just one phone.

    It needs the same couple of helpers for each phone and the same consideration made above for the input_boolean is still valid.

    This flow was developed and tested with a Pixel 2 XL and the companion app in Italian so you'll have to change all the references to the phone and the entities.

    screenshot

    [{"id":"c68594981cf4df93","type":"server-state-changed","z":"e1f44cc40f36d3a0","name":"Update Alarm","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"_prossimo_allarme_offset, _prossimo_allarme_enabled, _prossimo_allarme","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":1000,"wires":[["bd2261de4c7422c2"]]},{"id":"bd2261de4c7422c2","type":"function","z":"e1f44cc40f36d3a0","name":"Save values","func":"const [, phone] = msg.topic.match(/\\\\.(.+)_prossimo_allarme/);\\nconst key = `alarm['${phone}']`;\\nconst fullKey = `alarm['${phone}']['${msg.topic}']`\\nflow.set(fullKey, msg.payload);\\nconst alarmPhone = flow.get(key);\\nif (Object.keys(alarmPhone).length === 3) {\\n    const alarmRaw = alarmPhone[`sensor.${phone}_prossimo_allarme`];\\n    const enabled = alarmPhone[`input_boolean.${phone}_prossimo_allarme_enabled`] === 'on';\\n    if ( enabled && alarmRaw !== \\"unavailable\\") {\\n        const now = Date.now();\\n        const alarm = new Date(alarmRaw);\\n        const offset = alarmPhone[`input_number.${phone}_prossimo_allarme_offset`] * 60000;\\n        const timeDifference = alarm.getTime() + offset;\\n        const delay = timeDifference - now;\\n\\n        if (delay < 0) {\\n            node.status({ fill: 'red', text: 'Offset put alarm in the past' });\\n            node.warn(\\"Offset put alarm in the past.\\");\\n            return { reset: true };\\n        }\\n\\n        node.status({});\\n        msg = {\\n            topic: phone,\\n            delay,\\n            payload: alarm\\n        };\\n\\n        // Reset the delay node before setting the new delay\\n        return [[{ reset: true }, msg]];\\n    } else {\\n        return { reset: true };\\n    }\\n}\\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":1000,"wires":[["31a1b9a97061185e"]]},{"id":"31a1b9a97061185e","type":"delay","z":"e1f44cc40f36d3a0","name":"wait until time","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":520,"y":1000,"wires":[["35675e2e29e54de6"]]},{"id":"764b91777c83fd57","type":"debug","z":"e1f44cc40f36d3a0","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":320,"y":1080,"wires":[]},{"id":"35675e2e29e54de6","type":"switch","z":"e1f44cc40f36d3a0","name":"Phone","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"pixel_2_xl","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":1000,"wires":[["b2992c1a93db3836"]]},{"id":"b2992c1a93db3836","type":"link out","z":"e1f44cc40f36d3a0","name":"Pixel 2 XL","mode":"link","links":["2a280002119b6339"],"x":795,"y":1000,"wires":[]},{"id":"2a280002119b6339","type":"link in","z":"e1f44cc40f36d3a0","name":"Alarm Pixel 2 XL","links":["b2992c1a93db3836"],"x":175,"y":1080,"wires":[["764b91777c83fd57"]]}]\n

    Daily alarm using Datetime Entity

    screenshot

    [{"id":"2672831b.1236ac","type":"inject","z":"ffbd7f06.4a014","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":342,"y":1808,"wires":[["ef533324.d135d"]]},{"id":"8b6ea5bc.5f2478","type":"api-current-state","z":"ffbd7f06.4a014","name":"alarm","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_datetime.alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":628,"y":1808,"wires":[["aedf33ed.0ca28"]]},{"id":"d3ec7afe.0c2968","type":"debug","z":"ffbd7f06.4a014","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":1808,"wires":[]},{"id":"aedf33ed.0ca28","type":"function","z":"ffbd7f06.4a014","name":"now?","func":"const now = new Date();\\nconst hours = now.getHours().toString().padStart(2,'0');\\nconst minutes = now.getMinutes().toString().padStart(2,'0');\\nconst time = `${hours}:${minutes}`;\\n// Remove seconds\\nconst alarm = msg.payload.split(\\":\\").splice(0,2).join(\\":\\");\\n\\nif(time === alarm) {\\n    return msg;\\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":756,"y":1808,"wires":[["d3ec7afe.0c2968"]]},{"id":"ef533324.d135d","type":"api-current-state","z":"ffbd7f06.4a014","name":"enabled?","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.alarm_enabled","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":492,"y":1808,"wires":[["8b6ea5bc.5f2478"],[]]}]\n

    An offset can also be added as shown in the next alarm sensor example.

    ',24))])}const b=p(g,[["render",d],["__file","using-date-and-time-entities-to-trigger-flows.html.vue"]]),h=JSON.parse('{"path":"/cookbook/using-date-and-time-entities-to-trigger-flows.html","title":"Using Date and Time entities to trigger flows","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Using the time node","slug":"using-the-time-node","link":"#using-the-time-node","children":[]},{"level":2,"title":"Home Assistant Companion app next alarm sensor","slug":"home-assistant-companion-app-next-alarm-sensor","link":"#home-assistant-companion-app-next-alarm-sensor","children":[{"level":3,"title":"Adding an offset and on/off switch","slug":"adding-an-offset-and-on-off-switch","link":"#adding-an-offset-and-on-off-switch","children":[]},{"level":3,"title":"Managing alarm from multiple phones","slug":"managing-alarm-from-multiple-phones","link":"#managing-alarm-from-multiple-phones","children":[]}]},{"level":2,"title":"Daily alarm using Datetime Entity","slug":"daily-alarm-using-datetime-entity","link":"#daily-alarm-using-datetime-entity","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":5},{"name":"Federico Granata","email":"3602209+Edo78@users.noreply.github.com","commits":1},{"name":"Mauricio Bonani","email":"bonanitech@gmail.com","commits":1}]},"filePathRelative":"cookbook/using-date-and-time-entities-to-trigger-flows.md"}');export{b as comp,h as data}; diff --git a/assets/using-date-and-time-entities-to-trigger-flows_01-Bs8pdEv6.png b/assets/using-date-and-time-entities-to-trigger-flows_01-Bs8pdEv6.png new file mode 100644 index 0000000000..f65908a6d0 Binary files /dev/null and b/assets/using-date-and-time-entities-to-trigger-flows_01-Bs8pdEv6.png differ diff --git a/assets/using-date-and-time-entities-to-trigger-flows_02-9ivWXXCe.png b/assets/using-date-and-time-entities-to-trigger-flows_02-9ivWXXCe.png new file mode 100644 index 0000000000..9623eae150 Binary files /dev/null and b/assets/using-date-and-time-entities-to-trigger-flows_02-9ivWXXCe.png differ diff --git a/assets/using-date-and-time-entities-to-trigger-flows_03-DsUrMQlD.png b/assets/using-date-and-time-entities-to-trigger-flows_03-DsUrMQlD.png new file mode 100644 index 0000000000..808d2b141d Binary files /dev/null and b/assets/using-date-and-time-entities-to-trigger-flows_03-DsUrMQlD.png differ diff --git a/assets/using-date-and-time-entities-to-trigger-flows_04-DMd9Dm05.png b/assets/using-date-and-time-entities-to-trigger-flows_04-DMd9Dm05.png new file mode 100644 index 0000000000..28e835a542 Binary files /dev/null and b/assets/using-date-and-time-entities-to-trigger-flows_04-DMd9Dm05.png differ diff --git a/assets/vacation-mode.html-nf33t2Mq.js b/assets/vacation-mode.html-nf33t2Mq.js new file mode 100644 index 0000000000..a24a7b9b00 --- /dev/null +++ b/assets/vacation-mode.html-nf33t2Mq.js @@ -0,0 +1,14 @@ +import{_ as p,c as o,e as n,a,b as e,w as u,r as c,o as r,d as l}from"./app-CefLgoES.js";const k="/node-red-contrib-home-assistant-websocket/assets/vacation-mode_01-3u-aevgN.png",q="/node-red-contrib-home-assistant-websocket/assets/vacation-mode_02-lxgo11VL.png",i="/node-red-contrib-home-assistant-websocket/assets/vacation-mode_03-DVtSIIvI.png",y="/node-red-contrib-home-assistant-websocket/assets/vacation-mode_04-CQ-MFwKC.png",g={};function d(m,s){const t=c("RouteLink");return r(),o("div",null,[s[1]||(s[1]=n('

    Vacation Mode

    Four steps to adding a vacation mode to your home and having lights turn on and off at random intervals. It also automatically prompts you with a notification about turning on vacation mode if you have been gone longer than 24 hours.

    screenshot

    Full Export

    [{"id":"eb756b3f.d770f8","type":"subflow","name":"Create HA Helpers","info":"","category":"","in":[{"x":84,"y":96,"wires":[{"id":"7f1493fc.1300fc"}]}],"out":[],"env":[{"name":"serverName","type":"str","value":"Home Assistant","ui":{"label":{"en-US":"HA Server Name"},"type":"input","opts":{"types":["str"]}}},{"name":"helpers","type":"json","value":"[]","ui":{"label":{"en-US":"Helpers"},"type":"input","opts":{"types":["json"]}}}],"color":"#DDAA99","status":{"x":246,"y":48,"wires":[{"id":"a66d5d93.8a5f","port":0}]}},{"id":"7f1493fc.1300fc","type":"function","z":"eb756b3f.d770f8","name":"process helpers","func":"const serverName = toCamelCase(env.get('serverName'));\\nconst haServer = global.get(\\"homeassistant\\")[serverName];\\nif(!haServer) {\\n    node.error(\\"Invalid HA server name\\");\\n    return;\\n}\\nconst states = haServer.states;\\nconst helpers = env.get(\\"helpers\\");\\n\\nhelpers.forEach(h => {\\n    const entityId = `${h.type}.${h.id}`;\\n    if(!states[entityId]) {\\n        const {id, type, ...data} = h;\\n        const apiData = {\\n            entity: h,\\n            payload: { \\n                data \\n            }\\n        };\\n        apiData.payload.data.type = `${type}/create`;\\n    \\n        node.send(apiData);\\n        node.status({text: `Creating ${entityId}`});\\n    }\\n});\\n\\nnode.done();\\n\\nfunction toCamelCase(str) {\\n    return str.replace(/(?:^\\\\w|[A-Z]|\\\\b\\\\w|\\\\s+)/g, (match, index) => {\\n        if (+match === 0) return '';\\n        return index === 0 ? match.toLowerCase() : match.toUpperCase();\\n    });\\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":224,"y":96,"wires":[["a4a0abd9.7576d8"]]},{"id":"a4a0abd9.7576d8","type":"ha-api","z":"eb756b3f.d770f8","name":"create helper","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":390,"y":96,"wires":[["b76d0c56.d54b9"]]},{"id":"388bb5c7.47346a","type":"ha-api","z":"eb756b3f.d770f8","name":"rename helper entity id","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\t   \\"type\\":\\"config/entity_registry/update\\",\\t   \\"entity_id\\": entity.type & \\".\\" & payload.id,\\t   \\"new_entity_id\\": entity.type & \\".\\" & entity.id\\t}","dataType":"jsonata","location":"payload","locationType":"msg","responseType":"json","x":788,"y":96,"wires":[[]]},{"id":"b76d0c56.d54b9","type":"switch","z":"eb756b3f.d770f8","name":"need to rename?","property":"payload.id","propertyType":"msg","rules":[{"t":"neq","v":"entity.id","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":570,"y":96,"wires":[["388bb5c7.47346a","3e47440a.eee2cc"]]},{"id":"a66d5d93.8a5f","type":"status","z":"eb756b3f.d770f8","name":"","scope":["7f1493fc.1300fc","3e47440a.eee2cc"],"x":124,"y":48,"wires":[[]]},{"id":"3e47440a.eee2cc","type":"function","z":"eb756b3f.d770f8","name":"rename status","func":"const oldEntityId = `${msg.entity.type}.${msg.payload.id}`;\\nconst newEntityId = `${msg.entity.type}.${msg.entity.id}`;\\n\\nnode.status({text: `Renaming ${oldEntityId} to ${newEntityId}`});","outputs":1,"noerr":0,"initialize":"","finalize":"","x":768,"y":144,"wires":[[]]},{"id":"fda663f6.59a56","type":"subflow","name":"Actionable Notification","info":"[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"","in":[{"x":84,"y":80,"wires":[{"id":"e9b697a.fc03268"}]}],"out":[{"x":1172,"y":128,"wires":[{"id":"57c0c58d.ffa1bc","port":0}]},{"x":1172,"y":176,"wires":[{"id":"57c0c58d.ffa1bc","port":1}]},{"x":1172,"y":224,"wires":[{"id":"57c0c58d.ffa1bc","port":2}]},{"x":964,"y":240,"wires":[{"id":"c3389099.bc489","port":1}]}],"env":[{"name":"service","type":"str","value":"","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"color":"#DDAA99","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"status":{"x":244,"y":272,"wires":[{"id":"d847d277.d448c","port":0}]}},{"id":"b4512e6b.640d9","type":"function","z":"fda663f6.59a56","name":"create service call","func":"const actions = [];\\n[1,2,3].forEach(i => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = env.get(`${name}Title`);\\n    const uri = env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? flow.get(`${name}Id`) : undefined;\\n    \\n    actions.push({\\n        action,\\n        title,\\n        uri\\n    });\\n});\\n\\nmsg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            title: env.get('title'),\\n            message: env.get('message'),\\n            data: {\\n                tag: flow.get('notificationTag'),\\n                actions,\\n                color: env.get(\\"color\\"),\\n                group: env.get(\\"group\\"),\\n                sticky: env.get(\\"sticky\\"),\\n                timeout: env.get(\\"timeout\\"),\\n                icon: env.get(\\"icon\\")\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","x":298,"y":80,"wires":[["7a427ca2.c030e4"]]},{"id":"57c0c58d.ffa1bc","type":"switch","z":"fda663f6.59a56","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"d847d277.d448c","type":"status","z":"fda663f6.59a56","name":"","scope":["b4512e6b.640d9","c3389099.bc489","7955d8e6.b10888","7a427ca2.c030e4"],"x":124,"y":272,"wires":[[]]},{"id":"c3389099.bc489","type":"function","z":"fda663f6.59a56","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","x":832,"y":176,"wires":[["57c0c58d.ffa1bc"],[]]},{"id":"f814cdc6.def07","type":"switch","z":"fda663f6.59a56","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["4db9b8d.0c14a48"]]},{"id":"7596669d.feb668","type":"ha-api","z":"fda663f6.59a56","name":"get user info","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","location":"userData","locationType":"msg","responseType":"json","x":822,"y":128,"wires":[["c3389099.bc489"]]},{"id":"b745e475.d6cdf8","type":"server-events","z":"fda663f6.59a56","name":"mobile_app_notification_cleared","server":"","event_type":"mobile_app_notification_cleared","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":224,"wires":[["f814cdc6.def07"]]},{"id":"4db9b8d.0c14a48","type":"switch","z":"fda663f6.59a56","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["7596669d.feb668"],["c3389099.bc489"]]},{"id":"e9b697a.fc03268","type":"switch","z":"fda663f6.59a56","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["b4512e6b.640d9"],["7955d8e6.b10888"]],"l":false},{"id":"7955d8e6.b10888","type":"function","z":"fda663f6.59a56","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","x":318,"y":128,"wires":[["7a427ca2.c030e4"]]},{"id":"520a884c.35f9c8","type":"server-events","z":"fda663f6.59a56","name":"mobile_app_notification_action","server":"","event_type":"mobile_app_notification_action","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":176,"wires":[["f814cdc6.def07"]]},{"id":"7a427ca2.c030e4","type":"api-call-service","z":"fda663f6.59a56","name":"","server":"","version":1,"debugenabled":false,"service_domain":"notify","service":"","entityId":"","data":"","dataType":"json","mergecontext":"callServiceData","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":80,"wires":[[]]},{"id":"aa02fa4a.a35548","type":"inject","z":"9530fd91.600e2","name":"","repeat":"","crontab":"*/6 16-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":118,"y":336,"wires":[["7e966ac8.609524"]]},{"id":"cfa1b8e4.8d4a08","type":"time-range-switch","z":"9530fd91.600e2","name":"","startTime":"sunset","endTime":"23:59","startOffset":0,"endOffset":0,"x":496,"y":336,"wires":[["c7efc558.da1bc8"],[]]},{"id":"a41f4d83.d45c4","type":"ha-get-entities","z":"9530fd91.600e2","server":"","name":"","rules":[{"property":"entity_id","logic":"in_group","value":"group.vacation_lights","valueType":"str"},{"property":"state","logic":"is","value":"off","valueType":"str"}],"output_type":"random","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":806,"y":336,"wires":[["f3897d20.fffee"]]},{"id":"c7efc558.da1bc8","type":"function","z":"9530fd91.600e2","name":"25%","func":"const random = Math.round(Math.random() * 100);\\n\\nif(random < 75) {\\n    node.status({fill: \\"red\\", text: random});\\n    return;\\n}\\n\\nnode.status({fill: \\"green\\", text: random});\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":658,"y":336,"wires":[["a41f4d83.d45c4"]]},{"id":"f3897d20.fffee","type":"api-call-service","z":"9530fd91.600e2","name":"turn on","server":"","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_on","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":956,"y":336,"wires":[["20fce293.98ce8e"]]},{"id":"20fce293.98ce8e","type":"delay","z":"9530fd91.600e2","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"5","randomLast":"36","randomUnits":"minutes","drop":false,"x":1100,"y":336,"wires":[["3d851328.fb1b8c"]]},{"id":"3d851328.fb1b8c","type":"api-call-service","z":"9530fd91.600e2","name":"turn off","server":"","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1234,"y":336,"wires":[[]]},{"id":"7e966ac8.609524","type":"api-current-state","z":"9530fd91.600e2","name":"vacation mode on?","server":"","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":true,"entity_id":"input_boolean.vacation_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":298,"y":336,"wires":[[],["cfa1b8e4.8d4a08"]]},{"id":"22f34ec4.9d3a22","type":"comment","z":"9530fd91.600e2","name":"Vacation Lights","info":"","x":112,"y":288,"wires":[]},{"id":"7003285c.a3a8c8","type":"api-call-service","z":"9530fd91.600e2","name":"turn on vacation mode","server":"","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.vacation_mode","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":788,"y":192,"wires":[["4971bda0.0758f4"]]},{"id":"4971bda0.0758f4","type":"api-call-service","z":"9530fd91.600e2","name":"notify jason","server":"","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_jason","entityId":"","data":"{\\"title\\":\\"Vacation Mode\\",\\"message\\":\\"Vacation Mode has been enabled.\\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":982,"y":192,"wires":[[]]},{"id":"bf80cebf.58bcc","type":"server-state-changed","z":"9530fd91.600e2","name":"home/away","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.jason","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"days","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":102,"y":192,"wires":[["7d414deb.904f64"],["c81cbf7d.abe22"]]},{"id":"c81cbf7d.abe22","type":"api-call-service","z":"9530fd91.600e2","name":"vacation mode off","server":"","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.vacation_mode","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":314,"y":240,"wires":[[]]},{"id":"7d414deb.904f64","type":"api-current-state","z":"9530fd91.600e2","name":"vacation mode on?","server":"","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vacation_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":314,"y":192,"wires":[["dca703ed.f3222"],[]]},{"id":"dca703ed.f3222","type":"subflow:fda663f6.59a56","z":"9530fd91.600e2","name":"turn on vacation mode?","env":[{"name":"service","value":"mobile_app_jason","type":"str"},{"name":"title","value":"Vacation Mode","type":"str"},{"name":"message","value":"You've been aways for 24 hours. Do you want to turn on vacation mode?","type":"str"},{"name":"action1Title","value":"Yes","type":"str"},{"name":"action2Title","value":"No","type":"str"},{"name":"group","value":"","type":"str"}],"x":542,"y":208,"wires":[["7003285c.a3a8c8"],[],[],[]]},{"id":"d4a03a04.6c78f8","type":"subflow:eb756b3f.d770f8","z":"9530fd91.600e2","name":"create input_boolean","env":[{"name":"helpers","value":"[{\\"id\\":\\"vacation_mode\\",\\"type\\":\\"input_boolean\\",\\"name\\":\\"Vacation Mode\\",\\"icon\\":\\"mdi:beach\\"}]","type":"json"}],"x":292,"y":96,"wires":[]},{"id":"f3d6f382.70bfe","type":"inject","z":"9530fd91.600e2","name":"Click me to","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":108,"y":96,"wires":[["d4a03a04.6c78f8"]]},{"id":"4a22094b.635368","type":"comment","z":"9530fd91.600e2","name":"Setup","info":"","x":82,"y":48,"wires":[]},{"id":"7ce57cf8.cad134","type":"comment","z":"9530fd91.600e2","name":"Actionable notification to turn on vacation mode","info":"","x":212,"y":144,"wires":[]}]\n

    Step 1

    Create an input boolean in Home Assistant that will control if the house is in vacation mode.

    screenshot

    or via the helpers menu in the Home Assistant UI or add it manually in YAML

    input_boolean:
    +  vacation_mode:
    +    name: Vacation Mode
    +    icon: mdi:beach
    +

    Step 2

    Create a flow that will automatically change the vacation mode to off if we come home. Secondly will send our phone an actionable notification for android asking if we want to turn on vacation mode if we have been gone longer than 24 hours.

    screenshot

    [{"id":"fda663f6.59a56","type":"subflow","name":"Actionable Notification","info":"[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-android.html)\\n","category":"","in":[{"x":84,"y":80,"wires":[{"id":"e9b697a.fc03268"}]}],"out":[{"x":1172,"y":128,"wires":[{"id":"57c0c58d.ffa1bc","port":0}]},{"x":1172,"y":176,"wires":[{"id":"57c0c58d.ffa1bc","port":1}]},{"x":1172,"y":224,"wires":[{"id":"57c0c58d.ffa1bc","port":2}]},{"x":964,"y":240,"wires":[{"id":"c3389099.bc489","port":1}]}],"env":[{"name":"service","type":"str","value":"","ui":{"label":{"en-US":"Notify Service"},"type":"input","opts":{"types":["str"]}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Title"},"type":"input","opts":{"types":["str"]}}},{"name":"message","type":"str","value":"","ui":{"label":{"en-US":"Message"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Title","type":"str","value":"","ui":{"label":{"en-US":"Action 1 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action1Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 1 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Title","type":"str","value":"","ui":{"label":{"en-US":"Action 2 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action2Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 2 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Title","type":"str","value":"","ui":{"label":{"en-US":"Action 3 Title"},"type":"input","opts":{"types":["str"]}}},{"name":"action3Uri","type":"str","value":"","ui":{"label":{"en-US":"Action 3 URI (optional)"},"type":"input","opts":{"types":["str"]}}},{"name":"userInfo","type":"bool","value":"false","ui":{"label":{"en-US":"Populate User Information"},"type":"checkbox"}},{"name":"sticky","type":"bool","value":"false","ui":{"label":{"en-US":"Sticky"},"type":"checkbox"}},{"name":"group","type":"str","value":"None","ui":{"label":{"en-US":"Group"},"type":"select","opts":{"opts":[{"l":{"en-US":"None"},"v":""},{"l":{"en-US":"Cameras"},"v":"camera"},{"l":{"en-US":"Security"},"v":"security"},{"l":{"en-US":"Garage"},"v":"garage"},{"l":{"en-US":"Laundry Room"},"v":"laundry_room"}]}}},{"name":"color","type":"str","value":"","ui":{"label":{"en-US":"Color"},"type":"input","opts":{"types":["str"]}}},{"name":"timeout","type":"num","value":"","ui":{"label":{"en-US":"Timeout"},"type":"input","opts":{"types":["num"]}}},{"name":"icon","type":"str","value":"","ui":{"label":{"en-US":"Icon"},"type":"input","opts":{"types":["str"]}}}],"color":"#DDAA99","outputLabels":["Action 1","Action 2","Action 3","Cleared"],"status":{"x":244,"y":272,"wires":[{"id":"d847d277.d448c","port":0}]}},{"id":"b4512e6b.640d9","type":"function","z":"fda663f6.59a56","name":"create service call","func":"const actions = [];\\n[1,2,3].forEach(i => {\\n    const name = `action${i}`\\n    const id = flow.get(`${name}Id`);\\n    const title = env.get(`${name}Title`);\\n    const uri = env.get(`${name}Uri`);\\n    const action = uri.length ? 'URI' : title ? flow.get(`${name}Id`) : undefined;\\n    \\n    actions.push({\\n        action,\\n        title,\\n        uri\\n    });\\n});\\n\\nmsg._originalPayload = msg.payload;\\nflow.set('latestMessage', msg);\\n\\nconst services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            title: env.get('title'),\\n            message: env.get('message'),\\n            data: {\\n                tag: flow.get('notificationTag'),\\n                actions,\\n                color: env.get(\\"color\\"),\\n                group: env.get(\\"group\\"),\\n                sticky: env.get(\\"sticky\\"),\\n                timeout: env.get(\\"timeout\\"),\\n                icon: env.get(\\"icon\\")\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"const randomId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\\n\\n[1,2,3].forEach(i => {\\n    flow.set(`action${i}Id`, `action${i}_${randomId()}`);\\n})\\n\\n\\nflow.set('notificationTag', `${env.get('title')}_${randomId()}`);","finalize":"","x":298,"y":80,"wires":[["7a427ca2.c030e4"]]},{"id":"57c0c58d.ffa1bc","type":"switch","z":"fda663f6.59a56","name":"which action?","property":"eventData.event.action","propertyType":"msg","rules":[{"t":"eq","v":"action1Id","vt":"flow"},{"t":"eq","v":"action2Id","vt":"flow"},{"t":"eq","v":"action3Id","vt":"flow"}],"checkall":"true","repair":false,"outputs":3,"x":1024,"y":176,"wires":[[],[],[]]},{"id":"d847d277.d448c","type":"status","z":"fda663f6.59a56","name":"","scope":["b4512e6b.640d9","c3389099.bc489","7955d8e6.b10888","7a427ca2.c030e4"],"x":124,"y":272,"wires":[[]]},{"id":"c3389099.bc489","type":"function","z":"fda663f6.59a56","name":"build message","func":"const latestMessage = flow.get('latestMessage');\\nconst event = msg.payload.event;\\n\\nlatestMessage.eventData = msg.payload;\\nlatestMessage.payload = latestMessage._originalPayload;\\ndelete latestMessage._originalPayload;\\n\\nif(env.get('userInfo')) {\\n    const userData = msg.userData.find(u => u.id === msg.payload.context.user_id);\\n    latestMessage.userData = userData;\\n}\\n\\nif(msg.event_type === 'mobile_app_notification_cleared') {\\n    node.status({\\n        text: `cleared at: ${getPrettyDate()}`,\\n        shape: 'dot',\\n        fill: 'blue'\\n    });\\n    \\n    return [null, latestMessage];\\n}\\n\\nconst index = [1,2,3].find(i => event[`action_${i}_key`] === event.action);\\nnode.status({\\n    text: `${event[`action_${index}_title`]} at: ${getPrettyDate()}`,\\n    shape: 'dot',\\n    fill: 'green'\\n});\\n\\nreturn latestMessage;\\n\\n\\nfunction getPrettyDate() {\\n    return new Date().toLocaleDateString('en-US', {\\n        month: 'short',\\n        day: 'numeric',\\n        hour12: false,\\n        hour: 'numeric',\\n        minute: 'numeric',\\n    });\\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","x":832,"y":176,"wires":[["57c0c58d.ffa1bc"],[]]},{"id":"f814cdc6.def07","type":"switch","z":"fda663f6.59a56","name":"belongs here?","property":"payload.event.tag","propertyType":"msg","rules":[{"t":"eq","v":"notificationTag","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":176,"wires":[["4db9b8d.0c14a48"]]},{"id":"7596669d.feb668","type":"ha-api","z":"fda663f6.59a56","name":"get user info","server":"","debugenabled":false,"protocol":"websocket","method":"get","path":"","data":"{\\"type\\": \\"config/auth/list\\"}","dataType":"json","location":"userData","locationType":"msg","responseType":"json","x":822,"y":128,"wires":[["c3389099.bc489"]]},{"id":"b745e475.d6cdf8","type":"server-events","z":"fda663f6.59a56","name":"mobile_app_notification_cleared","server":"","event_type":"mobile_app_notification_cleared","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":224,"wires":[["f814cdc6.def07"]]},{"id":"4db9b8d.0c14a48","type":"switch","z":"fda663f6.59a56","name":"fetch user info?","property":"userInfo","propertyType":"env","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":624,"y":176,"wires":[["7596669d.feb668"],["c3389099.bc489"]]},{"id":"e9b697a.fc03268","type":"switch","z":"fda663f6.59a56","name":"","property":"clear_notification","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":143,"y":80,"wires":[["b4512e6b.640d9"],["7955d8e6.b10888"]],"l":false},{"id":"7955d8e6.b10888","type":"function","z":"fda663f6.59a56","name":"create clear notification","func":"const services = env.get('service');\\nif(!services) {\\n    node.status({\\n        text: 'no services defined',\\n        shape: 'ring',\\n        fill: 'red'\\n    });\\n    return;    \\n}\\n\\nservices.trim().split(/,\\\\s*/).forEach(service => {\\n    if(!service) return;\\n    \\n    msg.payload = {\\n        service,\\n        data: {\\n            message: \\"clear_notification\\",\\n            data: {\\n                tag: flow.get('notificationTag'),\\n            }\\n        }\\n    };\\n    node.send(msg);\\n});\\n\\nnode.done();","outputs":1,"noerr":0,"initialize":"","finalize":"","x":318,"y":128,"wires":[["7a427ca2.c030e4"]]},{"id":"520a884c.35f9c8","type":"server-events","z":"fda663f6.59a56","name":"mobile_app_notification_action","server":"","event_type":"mobile_app_notification_action","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":false,"x":194,"y":176,"wires":[["f814cdc6.def07"]]},{"id":"7a427ca2.c030e4","type":"api-call-service","z":"fda663f6.59a56","name":"","server":"","version":1,"debugenabled":false,"service_domain":"notify","service":"","entityId":"","data":"","dataType":"json","mergecontext":"callServiceData","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":80,"wires":[[]]},{"id":"7003285c.a3a8c8","type":"api-call-service","z":"9530fd91.600e2","name":"turn on vacation mode","server":"","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.vacation_mode","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":788,"y":192,"wires":[["4971bda0.0758f4"]]},{"id":"4971bda0.0758f4","type":"api-call-service","z":"9530fd91.600e2","name":"notify jason","server":"","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_jason","entityId":"","data":"{\\"title\\":\\"Vacation Mode\\",\\"message\\":\\"Vacation Mode has been enabled.\\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":982,"y":192,"wires":[[]]},{"id":"bf80cebf.58bcc","type":"server-state-changed","z":"9530fd91.600e2","name":"home/away","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.jason","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"days","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":102,"y":192,"wires":[["7d414deb.904f64"],["c81cbf7d.abe22"]]},{"id":"c81cbf7d.abe22","type":"api-call-service","z":"9530fd91.600e2","name":"vacation mode off","server":"","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.vacation_mode","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":314,"y":240,"wires":[[]]},{"id":"7d414deb.904f64","type":"api-current-state","z":"9530fd91.600e2","name":"vacation mode on?","server":"","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vacation_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":314,"y":192,"wires":[["dca703ed.f3222"],[]]},{"id":"dca703ed.f3222","type":"subflow:fda663f6.59a56","z":"9530fd91.600e2","name":"turn on vacation mode?","env":[{"name":"service","value":"mobile_app_jason","type":"str"},{"name":"title","value":"Vacation Mode","type":"str"},{"name":"message","value":"You've been aways for 24 hours. Do you want to turn on vacation mode?","type":"str"},{"name":"action1Title","value":"Yes","type":"str"},{"name":"action2Title","value":"No","type":"str"},{"name":"group","value":"","type":"str"}],"x":542,"y":208,"wires":[["7003285c.a3a8c8"],[],[],[]]},{"id":"7ce57cf8.cad134","type":"comment","z":"9530fd91.600e2","name":"Actionable notification to turn on vacation mode","info":"","x":212,"y":144,"wires":[]}]\n

    Also See

    ',15)),a("ul",null,[a("li",null,[e(t,{to:"/cookbook/actionable-notifications-subflow-for-android.html"},{default:u(()=>s[0]||(s[0]=[l("Actionable notifactions subflow for android")])),_:1})])]),s[2]||(s[2]=n(`

    Step 3

    Set up a group of lights and switches in Home Assistant that you want to turn on and off while vacation mode is active. This can be done without creating a group in Home Assistant by modifying the get-entities node in the below flow to entity_id in light.night_light,light.kitchen,switch.bedroom_light,switch.laundry_room.

    group:
    +  vacation_lights:
    +    name: Vacation Lights
    +    entities:
    +      - light.night_light
    +      - light.kitchen
    +      - switch.bedroom_light
    +      - switch.laundry_room
    +

    Step 4

    This flow will run between sunset and midnight turning lights on and off at random intervals if vacation mode is enabled.

    screenshot

    [{"id":"aa02fa4a.a35548","type":"inject","z":"9530fd91.600e2","name":"","repeat":"","crontab":"*/6 16-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":118,"y":336,"wires":[["7e966ac8.609524"]]},{"id":"cfa1b8e4.8d4a08","type":"time-range-switch","z":"9530fd91.600e2","name":"","startTime":"sunset","endTime":"23:59","startOffset":0,"endOffset":0,"x":496,"y":336,"wires":[["c7efc558.da1bc8"],[]]},{"id":"a41f4d83.d45c4","type":"ha-get-entities","z":"9530fd91.600e2","server":"","name":"","rules":[{"property":"entity_id","logic":"in_group","value":"group.vacation_lights","valueType":"str"},{"property":"state","logic":"is","value":"off","valueType":"str"}],"output_type":"random","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":806,"y":336,"wires":[["f3897d20.fffee"]]},{"id":"c7efc558.da1bc8","type":"function","z":"9530fd91.600e2","name":"25%","func":"const random = Math.round(Math.random() * 100);\\n\\nif(random < 75) {\\n    node.status({fill: \\"red\\", text: random});\\n    return;\\n}\\n\\nnode.status({fill: \\"green\\", text: random});\\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":658,"y":336,"wires":[["a41f4d83.d45c4"]]},{"id":"f3897d20.fffee","type":"api-call-service","z":"9530fd91.600e2","name":"turn on","server":"","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_on","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":956,"y":336,"wires":[["20fce293.98ce8e"]]},{"id":"20fce293.98ce8e","type":"delay","z":"9530fd91.600e2","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"5","randomLast":"36","randomUnits":"minutes","drop":false,"x":1100,"y":336,"wires":[["3d851328.fb1b8c"]]},{"id":"3d851328.fb1b8c","type":"api-call-service","z":"9530fd91.600e2","name":"turn off","server":"","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1234,"y":336,"wires":[[]]},{"id":"7e966ac8.609524","type":"api-current-state","z":"9530fd91.600e2","name":"vacation mode on?","server":"","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":true,"entity_id":"input_boolean.vacation_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":298,"y":336,"wires":[[],["cfa1b8e4.8d4a08"]]},{"id":"22f34ec4.9d3a22","type":"comment","z":"9530fd91.600e2","name":"Vacation Lights","info":"","x":112,"y":288,"wires":[]}]
    +
    `,7))])}const f=p(g,[["render",d],["__file","vacation-mode.html.vue"]]),v=JSON.parse('{"path":"/cookbook/vacation-mode.html","title":"Vacation Mode","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Step 1","slug":"step-1","link":"#step-1","children":[]},{"level":2,"title":"Step 2","slug":"step-2","link":"#step-2","children":[]},{"level":2,"title":"Step 3","slug":"step-3","link":"#step-3","children":[]},{"level":2,"title":"Step 4","slug":"step-4","link":"#step-4","children":[]}],"git":{"updatedTime":1647350454000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"cookbook/vacation-mode.md"}');export{f as comp,v as data}; diff --git a/assets/vacation-mode_01-3u-aevgN.png b/assets/vacation-mode_01-3u-aevgN.png new file mode 100644 index 0000000000..1cfac3d84b Binary files /dev/null and b/assets/vacation-mode_01-3u-aevgN.png differ diff --git a/assets/vacation-mode_02-lxgo11VL.png b/assets/vacation-mode_02-lxgo11VL.png new file mode 100644 index 0000000000..9e28fa27c8 Binary files /dev/null and b/assets/vacation-mode_02-lxgo11VL.png differ diff --git a/assets/vacation-mode_03-DVtSIIvI.png b/assets/vacation-mode_03-DVtSIIvI.png new file mode 100644 index 0000000000..d64edcbdf1 Binary files /dev/null and b/assets/vacation-mode_03-DVtSIIvI.png differ diff --git a/assets/vacation-mode_04-CQ-MFwKC.png b/assets/vacation-mode_04-CQ-MFwKC.png new file mode 100644 index 0000000000..0baa93dc38 Binary files /dev/null and b/assets/vacation-mode_04-CQ-MFwKC.png differ diff --git a/assets/wait-until.html-_CDC3EjJ.js b/assets/wait-until.html-_CDC3EjJ.js new file mode 100644 index 0000000000..d1451e2cdc --- /dev/null +++ b/assets/wait-until.html-_CDC3EjJ.js @@ -0,0 +1,21 @@ +import{_ as p,c as r,a as n,d as a,b as e,w as c,e as o,r as i,o as u}from"./app-CefLgoES.js";const d={},h={id:"entities",tabindex:"-1"},g={class:"header-anchor",href:"#entities"},k={id:"wait-until-1",tabindex:"-1"},f={class:"header-anchor",href:"#wait-until-1"};function m(y,t){const s=i("Badge"),l=i("RouteLink");return u(),r("div",null,[t[6]||(t[6]=n("h1",{id:"wait-until",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#wait-until"},[n("span",null,"Wait Until")])],-1)),t[7]||(t[7]=n("p",null,"The Wait Until node waits for a specific condition to be met or for a timeout to occur before passing on the last received message. This node is useful for pausing the flow of automation until certain criteria are met, such as waiting for a door to close before turning off the lights.",-1)),t[8]||(t[8]=n("h2",{id:"configuration",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#configuration"},[n("span",null,"Configuration")])],-1)),n("h3",h,[n("a",g,[n("span",null,[t[0]||(t[0]=a("Entities ")),e(s,{text:"required"})])])]),n("ul",null,[t[4]||(t[4]=n("li",null,[a("Type: "),n("code",null,"string")],-1)),n("li",null,[t[2]||(t[2]=a("Accepts ")),e(l,{to:"/guide/mustache-templates.html"},{default:c(()=>t[1]||(t[1]=[a("Mustache Templates")])),_:1}),t[3]||(t[3]=a(" only for entity type"))])]),t[9]||(t[9]=o('

    A list of entities to wait for the condition to be met. The node will wait for any of the entities to meet the condition. If the entity is not found it will be ignored.

    The types that can be used are: entity id, substring, and regex.

    Examples

    • light.living_room - Will wait for the entity with the id light.living_room
    • motion - Will wait for any entity that has motion in the entity id
    • ^light\\..* - Will wait for any entity that starts with light.
    ',4)),n("h3",k,[n("a",f,[n("span",null,[t[5]||(t[5]=a("Wait Until ")),e(s,{text:"required"})])])]),t[10]||(t[10]=o(`
    • Type: string

    The property field will be checked against the value field using the comparator.

    Timeout

    • Type: number

    The amount of time to wait for the condition to become true before deactivating the node and passing the message object to the second output. If the timeout is equal to zero the node will wait indefinitely for the condition to be met.

    Warning

    If using a Node-RED global or flow context variable in the timeout field it will not update the timeout value if the context value changes after the node has been deployed.

    Check against the current state

    • Type: boolean

    When an input is received it will check the comparator against the current state instead of waiting for a state change.

    INFO

    This is only available when there is only one entity selected

    Input

    reset

    If the received message has this property set to any value the node will be set to inactive and the timeout cleared.

    payload

    • Type: object

    Example

    Full Payload

    {
    +  "entities": {
    +    "entity": ["light.living_room", "light.bedroom"],
    +    "substring": ["light."],
    +    "regex": ["light.*"]
    +  },
    +  "property": "state",
    +  "comparator": "is",
    +  "value": "on",
    +  "valueType": "str",
    +  "timeout": 10,
    +  "timeoutUnits": "seconds",
    +  "checkCurrentState": false
    +}
    +

    Override with a Single Entity

    {
    +  "entities": "light.living_room"
    +}
    +

    Override with a Several Entities

    {
    +  "entities": ["light.living_room", "light.bedroom"]
    +}
    +

    Output

    Value types:

    • entity: entity data of the triggered entity. Will be undefined if multiple entities are selected and the timeout occurs.
    • config: config properties of the node
    `,25))])}const v=p(d,[["render",m],["__file","wait-until.html.vue"]]),b=JSON.parse('{"path":"/node/wait-until.html","title":"Wait Until","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entities","slug":"entities","link":"#entities","children":[]},{"level":3,"title":"Wait Until","slug":"wait-until-1","link":"#wait-until-1","children":[]},{"level":3,"title":"Timeout","slug":"timeout","link":"#timeout","children":[]},{"level":3,"title":"Check against the current state","slug":"check-against-the-current-state","link":"#check-against-the-current-state","children":[]}]},{"level":2,"title":"Input","slug":"input","link":"#input","children":[{"level":3,"title":"reset","slug":"reset","link":"#reset","children":[]},{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]},{"level":3,"title":"Example","slug":"example","link":"#example","children":[]},{"level":3,"title":"Full Payload","slug":"full-payload","link":"#full-payload","children":[]}]},{"level":2,"title":"Output","slug":"output","link":"#output","children":[]}],"git":{"updatedTime":1723796552000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":11}]},"filePathRelative":"node/wait-until.md"}');export{v as comp,b as data}; diff --git a/assets/webhook.html-DJ_g8RC7.js b/assets/webhook.html-DJ_g8RC7.js new file mode 100644 index 0000000000..51949c5e87 --- /dev/null +++ b/assets/webhook.html-DJ_g8RC7.js @@ -0,0 +1 @@ +import{_ as a,c as l,e as i,a as o,d as t,b as n,o as d,r}from"./app-CefLgoES.js";const h={},c={id:"id",tabindex:"-1"},u={class:"header-anchor",href:"#id"},p={id:"allowed-methods",tabindex:"-1"},m={class:"header-anchor",href:"#allowed-methods"};function f(g,e){const s=r("Badge");return d(),l("div",null,[e[2]||(e[2]=i('

    Webhook

    The Webhook node outputs data received from a created webhook in Home Assistant. Webhooks are a way to receive data or trigger automations from external sources, and this node allows you to integrate those triggers into your Node-RED flows.

    Warning

    Needs Custom Integration installed in Home Assistant for this node to function

    Configuration

    ',4)),o("h3",c,[o("a",u,[o("span",null,[e[0]||(e[0]=t("ID ")),n(s,{text:"required"})])])]),e[3]||(e[3]=o("ul",null,[o("li",null,[t("Type: "),o("code",null,"string")])],-1)),e[4]||(e[4]=o("p",null,"A string to be used for the webhook URL in Home Assistant.",-1)),o("h3",p,[o("a",m,[o("span",null,[e[1]||(e[1]=t("Allowed Methods ")),n(s,{text:"required"})])])]),e[5]||(e[5]=i('
    • Type: list

    A list of allowed methods that Home Assistant will accept for the webhook. At least one method must be selected.

    Expose as

    • Type: string

    When an entity is selected a switch entity will be created in Home Assistant. Turning on and off this switch will disable/enable the nodes in Node-RED.

    Outputs

    Value types:

    • received data: The parsed body from the webhook request
    • trigger id: webhook id
    • headers: entity state of the triggered entity
    • params: Query string parameters
    • config: config properties of the node
    ',8))])}const w=a(h,[["render",f],["__file","webhook.html.vue"]]),k=JSON.parse('{"path":"/node/webhook.html","title":"Webhook","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"ID","slug":"id","link":"#id","children":[]},{"level":3,"title":"Allowed Methods","slug":"allowed-methods","link":"#allowed-methods","children":[]},{"level":3,"title":"Expose as","slug":"expose-as","link":"#expose-as","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":7}]},"filePathRelative":"node/webhook.md"}');export{w as comp,k as data}; diff --git a/assets/zone.html-e_71GTE4.js b/assets/zone.html-e_71GTE4.js new file mode 100644 index 0000000000..70a2adca50 --- /dev/null +++ b/assets/zone.html-e_71GTE4.js @@ -0,0 +1 @@ +import{_ as t,c as n,e as a,o as i}from"./app-CefLgoES.js";const o={};function s(l,e){return i(),n("div",null,e[0]||(e[0]=[a('

    Zone

    The Zone node outputs data when a configured entity enters or leaves one of the defined zones in Home Assistant. Zones are geographical areas you define in Home Assistant, and this node can trigger automations based on whether entities (like phones or trackers) enter or exit these zones.

    Configuration

    Entities

    • Type: array

    An array of entity ids to monitor for zone changes.

    Event

    • Type: string

    Set when to check an entity. Either entering or leaving a zone.

    Zones

    • Type: array

    An array of zone ids to check when a configured entity updates.

    Outputs

    topic

    • Type: string

    The entity id of the device/person that triggered the update.

    payload

    • Type: string

    The state of the device/person entity that triggered the update.

    data

    • Type: object

    The entity object of the device/person that triggered the update.

    zones

    • Type: array

    An array of zone entities where the device/person entity entered/left after an update of location.

    ',25)]))}const d=t(o,[["render",s],["__file","zone.html.vue"]]),h=JSON.parse('{"path":"/node/zone.html","title":"Zone","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Configuration","slug":"configuration","link":"#configuration","children":[{"level":3,"title":"Entities","slug":"entities","link":"#entities","children":[]},{"level":3,"title":"Event","slug":"event","link":"#event","children":[]},{"level":3,"title":"Zones","slug":"zones","link":"#zones","children":[]}]},{"level":2,"title":"Outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"topic","slug":"topic","link":"#topic","children":[]},{"level":3,"title":"payload","slug":"payload","link":"#payload","children":[]},{"level":3,"title":"data","slug":"data","link":"#data","children":[]},{"level":3,"title":"zones","slug":"zones-1","link":"#zones-1","children":[]}]}],"git":{"updatedTime":1723606857000,"contributors":[{"name":"Jason","email":"37859597+zachowj@users.noreply.github.com","commits":4}]},"filePathRelative":"node/zone.md"}');export{d as comp,h as data}; diff --git a/cookbook/actionable-notifications-subflow-for-android.html b/cookbook/actionable-notifications-subflow-for-android.html new file mode 100644 index 0000000000..8ef41b7790 --- /dev/null +++ b/cookbook/actionable-notifications-subflow-for-android.html @@ -0,0 +1,50 @@ + + + + + + + + + Actionable Notifications Subflow for Android | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html b/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html new file mode 100644 index 0000000000..fffe5bd351 --- /dev/null +++ b/cookbook/check-if-an-entity-was-turned-on-in-the-last-24-hours.html @@ -0,0 +1,45 @@ + + + + + + + + + Check if an entity was a certain state in the last 24 hours | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/events-by-label.html b/cookbook/events-by-label.html new file mode 100644 index 0000000000..48dd5f6852 --- /dev/null +++ b/cookbook/events-by-label.html @@ -0,0 +1,44 @@ + + + + + + + + + Events by Label | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/expiration-date-monitor.html b/cookbook/expiration-date-monitor.html new file mode 100644 index 0000000000..21e29129ad --- /dev/null +++ b/cookbook/expiration-date-monitor.html @@ -0,0 +1,63 @@ + + + + + + + + + Expiration Date Monitor with notification | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/get-state_changed-events-based-on-area.html b/cookbook/get-state_changed-events-based-on-area.html new file mode 100644 index 0000000000..0573a3d134 --- /dev/null +++ b/cookbook/get-state_changed-events-based-on-area.html @@ -0,0 +1,44 @@ + + + + + + + + + Get state_changed Events Based on Area | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html b/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html new file mode 100644 index 0000000000..e279df22a9 --- /dev/null +++ b/cookbook/holiday-lights-scheduler-and-demo-mode-for-wled.html @@ -0,0 +1,134 @@ + + + + + + + + + Holiday lights scheduler and demo mode for WLED | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/index.html b/cookbook/index.html new file mode 100644 index 0000000000..5579c3cb9a --- /dev/null +++ b/cookbook/index.html @@ -0,0 +1,43 @@ + + + + + + + + + Cookbook | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/action.html b/cookbook/jsonata/action.html new file mode 100644 index 0000000000..dc320da41e --- /dev/null +++ b/cookbook/jsonata/action.html @@ -0,0 +1,80 @@ + + + + + + + + + Action Node JSONata Examples | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/change-node.html b/cookbook/jsonata/change-node.html new file mode 100644 index 0000000000..e66b7ace7a --- /dev/null +++ b/cookbook/jsonata/change-node.html @@ -0,0 +1,102 @@ + + + + + + + + + Change node | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/current-state.html b/cookbook/jsonata/current-state.html new file mode 100644 index 0000000000..e703cb947f --- /dev/null +++ b/cookbook/jsonata/current-state.html @@ -0,0 +1,56 @@ + + + + + + + + + Current State | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/events-state.html b/cookbook/jsonata/events-state.html new file mode 100644 index 0000000000..2395e996b8 --- /dev/null +++ b/cookbook/jsonata/events-state.html @@ -0,0 +1,92 @@ + + + + + + + + + Events: state | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/functions.html b/cookbook/jsonata/functions.html new file mode 100644 index 0000000000..30fa06cb0a --- /dev/null +++ b/cookbook/jsonata/functions.html @@ -0,0 +1,50 @@ + + + + + + + + + Other functions | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/sensor.html b/cookbook/jsonata/sensor.html new file mode 100644 index 0000000000..7cbaf7a899 --- /dev/null +++ b/cookbook/jsonata/sensor.html @@ -0,0 +1,55 @@ + + + + + + + + + Sensor | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/switch-node.html b/cookbook/jsonata/switch-node.html new file mode 100644 index 0000000000..d6a5b941e7 --- /dev/null +++ b/cookbook/jsonata/switch-node.html @@ -0,0 +1,47 @@ + + + + + + + + + Switch node | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/jsonata/trigger-state.html b/cookbook/jsonata/trigger-state.html new file mode 100644 index 0000000000..faf0395551 --- /dev/null +++ b/cookbook/jsonata/trigger-state.html @@ -0,0 +1,88 @@ + + + + + + + + + Trigger: state | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/motion-triggered-light.html b/cookbook/motion-triggered-light.html new file mode 100644 index 0000000000..f92baa8e71 --- /dev/null +++ b/cookbook/motion-triggered-light.html @@ -0,0 +1,45 @@ + + + + + + + + + Motion Triggered Light | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/play-jellyfin-show-using-sentence-node.html b/cookbook/play-jellyfin-show-using-sentence-node.html new file mode 100644 index 0000000000..d0d854c2f9 --- /dev/null +++ b/cookbook/play-jellyfin-show-using-sentence-node.html @@ -0,0 +1,44 @@ + + + + + + + + + Play a Jellyfin Show Using the Sentence Node | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/saving-and-restoring-states.html b/cookbook/saving-and-restoring-states.html new file mode 100644 index 0000000000..1f4cac4ac1 --- /dev/null +++ b/cookbook/saving-and-restoring-states.html @@ -0,0 +1,47 @@ + + + + + + + + + Saving and Restoring States | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/starting-flow-after-home-assistant-restart.html b/cookbook/starting-flow-after-home-assistant-restart.html new file mode 100644 index 0000000000..2d6dfc6d99 --- /dev/null +++ b/cookbook/starting-flow-after-home-assistant-restart.html @@ -0,0 +1,58 @@ + + + + + + + + + Starting a flow after a Home Assistant restart | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/sun-events.html b/cookbook/sun-events.html new file mode 100644 index 0000000000..cb10747514 --- /dev/null +++ b/cookbook/sun-events.html @@ -0,0 +1,46 @@ + + + + + + + + + Turn Light On/Off with Sunset/Sunrise | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/using-date-and-time-entities-to-trigger-flows.html b/cookbook/using-date-and-time-entities-to-trigger-flows.html new file mode 100644 index 0000000000..cea40e54c0 --- /dev/null +++ b/cookbook/using-date-and-time-entities-to-trigger-flows.html @@ -0,0 +1,50 @@ + + + + + + + + + Using Date and Time entities to trigger flows | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/cookbook/vacation-mode.html b/cookbook/vacation-mode.html new file mode 100644 index 0000000000..42fd9bff27 --- /dev/null +++ b/cookbook/vacation-mode.html @@ -0,0 +1,58 @@ + + + + + + + + + Vacation Mode | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000..0735548fb6 Binary files /dev/null and b/favicon.ico differ diff --git a/guide/action.html b/guide/action.html new file mode 100644 index 0000000000..3834337717 --- /dev/null +++ b/guide/action.html @@ -0,0 +1,55 @@ + + + + + + + + + Action Node Tips and Tricks | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/conditionals.html b/guide/conditionals.html new file mode 100644 index 0000000000..80b988c591 --- /dev/null +++ b/guide/conditionals.html @@ -0,0 +1,46 @@ + + + + + + + + + Conditionals | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/custom_integration/exposed-nodes.html b/guide/custom_integration/exposed-nodes.html new file mode 100644 index 0000000000..701fad6441 --- /dev/null +++ b/guide/custom_integration/exposed-nodes.html @@ -0,0 +1,43 @@ + + + + + + + + + Exposed Nodes | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/custom_integration/index.html b/guide/custom_integration/index.html new file mode 100644 index 0000000000..537852ef1f --- /dev/null +++ b/guide/custom_integration/index.html @@ -0,0 +1,43 @@ + + + + + + + + + Getting Started | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/development.html b/guide/development.html new file mode 100644 index 0000000000..936c0f7052 --- /dev/null +++ b/guide/development.html @@ -0,0 +1,53 @@ + + + + + + + + + Development | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/diagnostics.html b/guide/diagnostics.html new file mode 100644 index 0000000000..4b55004395 --- /dev/null +++ b/guide/diagnostics.html @@ -0,0 +1,44 @@ + + + + + + + + + Diagnostics Information | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/documentation.html b/guide/documentation.html new file mode 100644 index 0000000000..7039eb32f6 --- /dev/null +++ b/guide/documentation.html @@ -0,0 +1,46 @@ + + + + + + + + + Documentation | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/first-automation.html b/guide/first-automation.html new file mode 100644 index 0000000000..5805fcfb2b --- /dev/null +++ b/guide/first-automation.html @@ -0,0 +1,44 @@ + + + + + + + + + First Automation | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/index.html b/guide/index.html new file mode 100644 index 0000000000..617af6836b --- /dev/null +++ b/guide/index.html @@ -0,0 +1,46 @@ + + + + + + + + + Getting Started | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/jsonata/index.html b/guide/jsonata/index.html new file mode 100644 index 0000000000..c7b6b00c45 --- /dev/null +++ b/guide/jsonata/index.html @@ -0,0 +1,43 @@ + + + + + + + + + JSONata | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/jsonata/jsonata-primer.html b/guide/jsonata/jsonata-primer.html new file mode 100644 index 0000000000..d8fbebd81a --- /dev/null +++ b/guide/jsonata/jsonata-primer.html @@ -0,0 +1,55 @@ + + + + + + + + + JSONata primer | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/migration.html b/guide/migration.html new file mode 100644 index 0000000000..f691ec6c2f --- /dev/null +++ b/guide/migration.html @@ -0,0 +1,75 @@ + + + + + + + + + Migration | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/guide/mustache-templates.html b/guide/mustache-templates.html new file mode 100644 index 0000000000..859c2f46ed --- /dev/null +++ b/guide/mustache-templates.html @@ -0,0 +1,43 @@ + + + + + + + + + Mustache Templates | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000000..dc8c0bd05c --- /dev/null +++ b/index.html @@ -0,0 +1,43 @@ + + + + + + + + + node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/API.html b/node/API.html new file mode 100644 index 0000000000..f12010cb6c --- /dev/null +++ b/node/API.html @@ -0,0 +1,43 @@ + + + + + + + + + API | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/action.html b/node/action.html new file mode 100644 index 0000000000..75ab97525f --- /dev/null +++ b/node/action.html @@ -0,0 +1,56 @@ + + + + + + + + + Action | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/binary-sensor.html b/node/binary-sensor.html new file mode 100644 index 0000000000..c8cd16bca6 --- /dev/null +++ b/node/binary-sensor.html @@ -0,0 +1,43 @@ + + + + + + + + + Binary Sensor | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/button.html b/node/button.html new file mode 100644 index 0000000000..910942d141 --- /dev/null +++ b/node/button.html @@ -0,0 +1,43 @@ + + + + + + + + + Button | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/config-server.html b/node/config-server.html new file mode 100644 index 0000000000..28e903a487 --- /dev/null +++ b/node/config-server.html @@ -0,0 +1,47 @@ + + + + + + + + + Server Config | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/current-state.html b/node/current-state.html new file mode 100644 index 0000000000..ec30dae8d8 --- /dev/null +++ b/node/current-state.html @@ -0,0 +1,43 @@ + + + + + + + + + Current State | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/device-config.html b/node/device-config.html new file mode 100644 index 0000000000..08cf6ae7e1 --- /dev/null +++ b/node/device-config.html @@ -0,0 +1,43 @@ + + + + + + + + + Device Config | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/device.html b/node/device.html new file mode 100644 index 0000000000..ee2b13b6c4 --- /dev/null +++ b/node/device.html @@ -0,0 +1,43 @@ + + + + + + + + + Device | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/entity-config.html b/node/entity-config.html new file mode 100644 index 0000000000..de4a4d8bc8 --- /dev/null +++ b/node/entity-config.html @@ -0,0 +1,43 @@ + + + + + + + + + Entity Config | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/entity.html b/node/entity.html new file mode 100644 index 0000000000..fe2eb73083 --- /dev/null +++ b/node/entity.html @@ -0,0 +1,43 @@ + + + + + + + + + Entity | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/events-all.html b/node/events-all.html new file mode 100644 index 0000000000..eff4a5be46 --- /dev/null +++ b/node/events-all.html @@ -0,0 +1,43 @@ + + + + + + + + + Events: all | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/events-calendar.html b/node/events-calendar.html new file mode 100644 index 0000000000..b19cf0e83d --- /dev/null +++ b/node/events-calendar.html @@ -0,0 +1,43 @@ + + + + + + + + + Events: calendar | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/events-state.html b/node/events-state.html new file mode 100644 index 0000000000..2f0add422a --- /dev/null +++ b/node/events-state.html @@ -0,0 +1,43 @@ + + + + + + + + + Events: state | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/fire-event.html b/node/fire-event.html new file mode 100644 index 0000000000..7de71ec7c8 --- /dev/null +++ b/node/fire-event.html @@ -0,0 +1,43 @@ + + + + + + + + + Fire Event | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/get-entities.html b/node/get-entities.html new file mode 100644 index 0000000000..2e69a1c007 --- /dev/null +++ b/node/get-entities.html @@ -0,0 +1,92 @@ + + + + + + + + + Get Entities | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/get-history.html b/node/get-history.html new file mode 100644 index 0000000000..86466afdfe --- /dev/null +++ b/node/get-history.html @@ -0,0 +1,87 @@ + + + + + + + + + Get History | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/index.html b/node/index.html new file mode 100644 index 0000000000..c4f50e79a2 --- /dev/null +++ b/node/index.html @@ -0,0 +1,43 @@ + + + + + + + + + Nodes | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/number.html b/node/number.html new file mode 100644 index 0000000000..72e724173b --- /dev/null +++ b/node/number.html @@ -0,0 +1,44 @@ + + + + + + + + + Number | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/poll-state.html b/node/poll-state.html new file mode 100644 index 0000000000..624df62a73 --- /dev/null +++ b/node/poll-state.html @@ -0,0 +1,43 @@ + + + + + + + + + Poll State | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/render-template.html b/node/render-template.html new file mode 100644 index 0000000000..42c3ec6d76 --- /dev/null +++ b/node/render-template.html @@ -0,0 +1,43 @@ + + + + + + + + + Render Template | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/select.html b/node/select.html new file mode 100644 index 0000000000..cafb59770f --- /dev/null +++ b/node/select.html @@ -0,0 +1,44 @@ + + + + + + + + + Select | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/sensor.html b/node/sensor.html new file mode 100644 index 0000000000..39d957edd3 --- /dev/null +++ b/node/sensor.html @@ -0,0 +1,43 @@ + + + + + + + + + Sensor | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/sentence.html b/node/sentence.html new file mode 100644 index 0000000000..58a0c2454c --- /dev/null +++ b/node/sentence.html @@ -0,0 +1,50 @@ + + + + + + + + + Sentence | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/switch.html b/node/switch.html new file mode 100644 index 0000000000..9204ddec56 --- /dev/null +++ b/node/switch.html @@ -0,0 +1,44 @@ + + + + + + + + + Switch | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/tag.html b/node/tag.html new file mode 100644 index 0000000000..3cc263d15c --- /dev/null +++ b/node/tag.html @@ -0,0 +1,43 @@ + + + + + + + + + Tag | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/text.html b/node/text.html new file mode 100644 index 0000000000..4138fa33e9 --- /dev/null +++ b/node/text.html @@ -0,0 +1,44 @@ + + + + + + + + + Text | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/time-entity.html b/node/time-entity.html new file mode 100644 index 0000000000..389dff184b --- /dev/null +++ b/node/time-entity.html @@ -0,0 +1,44 @@ + + + + + + + + + Time | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/time.html b/node/time.html new file mode 100644 index 0000000000..cfbdba48f0 --- /dev/null +++ b/node/time.html @@ -0,0 +1,43 @@ + + + + + + + + + Time | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/trigger-state.html b/node/trigger-state.html new file mode 100644 index 0000000000..e5eebf1de5 --- /dev/null +++ b/node/trigger-state.html @@ -0,0 +1,52 @@ + + + + + + + + + Trigger: state | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/update-config.html b/node/update-config.html new file mode 100644 index 0000000000..90fdc2430b --- /dev/null +++ b/node/update-config.html @@ -0,0 +1,50 @@ + + + + + + + + + Update Config | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/wait-until.html b/node/wait-until.html new file mode 100644 index 0000000000..53457efb8f --- /dev/null +++ b/node/wait-until.html @@ -0,0 +1,63 @@ + + + + + + + + + Wait Until | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/webhook.html b/node/webhook.html new file mode 100644 index 0000000000..0e985230cd --- /dev/null +++ b/node/webhook.html @@ -0,0 +1,43 @@ + + + + + + + + + Webhook | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/node/zone.html b/node/zone.html new file mode 100644 index 0000000000..f5e9dc54cf --- /dev/null +++ b/node/zone.html @@ -0,0 +1,43 @@ + + + + + + + + + Zone | node-red-contrib-home-assistant-websocket + + + + + +
    + + + diff --git a/scrubber/index.html b/scrubber/index.html new file mode 100644 index 0000000000..99df1bf542 --- /dev/null +++ b/scrubber/index.html @@ -0,0 +1,43 @@ + + + + + + + + + Scrubber Tool | node-red-contrib-home-assistant-websocket + + + + + +
    + + +