Comments (5)
Since you're surrounding your variables in quotes, it's being sent as a string. Try it without the quotes and curly brackets like this:
{ "message": msg.payload.temperature }
from node-red-contrib-home-assistant.
That was my first thought as well, but node-red starts complaining if you don't use quotes:
from node-red-contrib-home-assistant.
Try putting this in a function node before the service call. Make sure your "Data" field (in the image above) just has {}
in there.
var temp = msg.payload.temperature
msg.payload: {
data: {
message: temp
}
}
return msg
from node-red-contrib-home-assistant.
Thank you, this works:
msg.payload = {
data: {
message: msg.payload.temperature
}
}
return msg;
I guess it would be more efficient if this extra step was not necessary, but for now it works ;-)
from node-red-contrib-home-assistant.
@damylen Can this issue be closed?
from node-red-contrib-home-assistant.
Related Issues (20)
- Support SSL LetsEncrypt 443 port? HOT 1
- History Node Not Filtering Per Entity
- Can't install node-red-contrib-home-assistant HOT 1
- Call Service with Merge Context not working properly
- The node doesn't see all of my services. HOT 1
- Install error on bcrypt HOT 4
- DEPRECATED HOT 1
- Templating not working properly in data field
- Accept boolean inputs to call_service nodes HOT 1
- Node Red still broken after HA update (0.106.1) HOT 2
- current state error HOT 1
- Entity could not be found in cache for entity_id: HOT 2
- Issue Installing HOT 1
- Dead link to example flows on the Github page
- Error install HOT 1
- Change to OAuth Access Token HOT 2
- Node Red Stopped Responding after upgrading to HA 0.76.0 HOT 1
- Call service node replaces msg object
- install with npm: not a valid repo name HOT 1
- Updates? HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-home-assistant.