ENTITY_ID in a text string

Your question is simple enough and the answer probably is too however, I have no idea what $entity_id is, where it comes from, or how you access it. I also have no idea what a "current_state" node is or what it looks like. Unfortunately, not a lot of folk here use HA.

If you could show us what things look like and where/what this $entity_id is, I will probably be able to help - otherwise, you might get better luck on the HA forums.


PS: please use the forum tools for formatting data and flows in your posts.

Canned blurb:

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json