npm node-red-contrib-home-assistant-websocket 0.14.0

latest releases: 0.65.1, 0.65.0, 0.64.0...
4 years ago

Features

  • JSONata everywhere (6424235)
  • api: Add option for data field to be a JSONata Expr (37b54ce)
  • call-service: Add JSONata option to data field (8e91f42)
  • fire-event: Add option for data field to be a JSONata Expr (526d083)
  • get-entities: Allow overriding of config values from payload (a0fdb96), closes #133

JSONata

  • There are three functions added for JSONata expressions 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
    • $entities() returns all entities in the cache
    • $entities(entity_id) returns a single entity from cache from passed in entity_id

When JSONata appears in the conditional dropdown it expects the expression to return a boolean, true or false.

image

When it is chosen with a conditional, not JSONata it will return a value of the evaluated expression that will be checked against the conditional chosen.

image

Call-Service Node Changes

  • Entity ids are no longer merged with the data property on the front end
  • The data field does not have to be valid JSON until after templates are rendered. This change will allow you to assign numbers to properties as an actual number and not a string using templates.
  • entity_id  in the data property will supersede the entity id field
  • Flows exported from version 0.14.0 will lose the entity id when imported into a previous version

Notice: Just because the text is yellow on a node doesn't mean you need to go update it. It will continue to function just as it is and the next time you modify the node it can be upgraded then.

Don't miss a new node-red-contrib-home-assistant-websocket release

NewReleases is sending notifications on new releases.