Trying to get the color parameter of a color lamp

Hi everyone

I've starting looking into Node Red a couple days ago and I've managed to create some basic flows.
I'm also using Home Assistant, on a RaspPi4 with a ConbeeII :slight_smile:

The question I have is related to this setup:

I have a TradFri Remote and a TradFri Color bulb.
Among other things, the remote does the following: with the left arrow, I change the color to Pink, with the right arrow I change it to Green.

To do this I use a Switch and Call Services.

What I would like to do is, when he light is Pink and I click again on the left arrow, it goes to a 3rd color, for example a neutral yellow. Same with Green and right arrow.

I thought I could use a current state node to test the color parameter but I can't find the proper values for State Location and the State value to test

Any idea what I am missing ? Or doing wrong ?

Thanks !

Code:

[{"id":"9f56faa8.744138","type":"tab","label":"Judith's Bedroom","disabled":false,"info":""},{"id":"1bea54d7.fa59ab","type":"api-call-service","z":"9f56faa8.744138","name":"On/Off","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.color_light_6","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":100,"wires":[[]]},{"id":"dbdd4435.7df608","type":"link in","z":"9f56faa8.744138","name":"Judith Bedroom","links":["2f241471.96557c"],"x":95,"y":160,"wires":[["8ab24aad.d4dbc8"]]},{"id":"8ab24aad.d4dbc8","type":"switch","z":"9f56faa8.744138","name":"Remote Judith Main","property":"payload.event.event","propertyType":"msg","rules":[{"t":"eq","v":"1002","vt":"str"},{"t":"eq","v":"2002","vt":"str"},{"t":"eq","v":"3002","vt":"str"},{"t":"eq","v":"4002","vt":"str"},{"t":"eq","v":"5002","vt":"str"},{"t":"eq","v":"4003","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":260,"y":160,"wires":[["1bea54d7.fa59ab"],["97e42b1.194b2d8"],["ac905c5f.0b9ae"],["2d341cc.38140e4"],["846a3920.754b08"],[]]},{"id":"97e42b1.194b2d8","type":"api-call-service","z":"9f56faa8.744138","name":"Bright +10%","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.color_light_6","data":"{\"brightness_step_pct\": 10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":160,"wires":[[]]},{"id":"ac905c5f.0b9ae","type":"api-call-service","z":"9f56faa8.744138","name":"Bright -10%","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.color_light_6","data":"{\"brightness_step_pct\": -10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":220,"wires":[[]]},{"id":"a706ba06.2ae5a8","type":"api-call-service","z":"9f56faa8.744138","name":"P!nk :)","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.color_light_6","data":"{\"transition\":5,\"hs_color\":[285,57.14285714285714]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":380,"wires":[[]]},{"id":"846a3920.754b08","type":"api-call-service","z":"9f56faa8.744138","name":"Bamboo Green","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.color_light_6","data":"{\"transition\":5,\"rgb_color\":[72,255,72]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":400,"wires":[[]]},{"id":"2d341cc.38140e4","type":"api-current-state","z":"9f56faa8.744138","name":"P!nk ?","server":"6a3a2c70.4b1d84","version":1,"outputs":2,"halt_if":"{\"hs_color\": [300,71.42857142857142]}","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.color_light_6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":340,"wires":[["e6b7a36d.5a17c"],["a706ba06.2ae5a8"]]},{"id":"e6b7a36d.5a17c","type":"api-call-service","z":"9f56faa8.744138","name":"Bamboo Green","server":"6a3a2c70.4b1d84","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.color_light_6","data":"{\"transition\":5,\"rgb_color\":[72,255,72]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":800,"y":320,"wires":[[]]},{"id":"6a3a2c70.4b1d84","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.