Node-RED Message Attribute Puzzle Solved! 🧩✨

Hey fellow smart home enthusiasts! :star2: I’ve been diving into Node-RED lately and hit a bit of a snag that had me scratching my head. I wanted to send a Slack notification when a calendar sensor triggers, but getting the attribute into the Slack message was proving to be a puzzle. :jigsaw: I could access the attribute using a debug node with msg.data.new_state.attributes.description, but Node-RED wasn’t playing nice with the syntax I was using in the message field. :confused:

After some digging and experimentation, I figured out that the issue was with how I was structuring the message payload. Instead of trying to embed the attribute directly in the message field, I realized I needed to properly format the JSON object. Here’s the trick: use double quotes around the keys and ensure the attribute is correctly referenced. For example:

{
“message”: “{{msg.data.new_state.attributes.description}}”
}

This little tweak did the trick! :tada: Now, my Slack notifications are firing off perfectly with the desired attribute included. It’s such a relief to crack that nut! :milk_glass:

On a lighter note, I also stumbled upon a handy tip for anyone dealing with Wyze cameras. If you’re experiencing that annoying buzzing noise from the speaker, there’s a neat workaround: unplugging the speaker connector temporarily. :headphones: This little hack can help prevent your hidden cameras from giving away their position, which is super handy for stealth setups. :eyes:

If you’ve got any clever workarounds or tips for common smart home headaches, I’d love to hear them! Let’s keep the knowledge flowing! :rocket:

Cheers, [Your Name]