Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current State/History Node - Ability to get entity id from root flow / global state or template #177

Closed
niemyjski opened this issue Dec 26, 2019 · 4 comments

Comments

@niemyjski
Copy link

I'd like to be able to just set flow.entity_id and have it be able to be read off the current state node or use a template inside of entity_id to control it. I can't do this today and it seems like it should work but it doesn't.

@zachowj
Copy link
Owner

zachowj commented Dec 27, 2019

Same thing as I said in #176. I believe you're running an older version of this package.

image

[{"id":"945d1d53.3bbe3","type":"inject","z":"ffbd7f06.4a014","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":832,"wires":[["6994058e.e42a6c"]]},{"id":"6994058e.e42a6c","type":"change","z":"ffbd7f06.4a014","name":"","rules":[{"t":"set","p":"entity_id","pt":"flow","to":"sun.sun","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":832,"wires":[["b4d5fc92.845f6"]]},{"id":"b4d5fc92.845f6","type":"api-current-state","z":"ffbd7f06.4a014","name":"","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{flow.entity_id}}","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":622,"y":832,"wires":[["292f49e9.b48da6"]]},{"id":"292f49e9.b48da6","type":"debug","z":"ffbd7f06.4a014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data","targetType":"msg","x":840,"y":832,"wires":[]}]

@niemyjski
Copy link
Author

I'm using version 0.10.2 with hassio. I did notice that this also applies to history node. I want to specify an entity_id via a template or even it in the payload.

@niemyjski
Copy link
Author

I upgraded it the latest version and I don't see it in the docs but I'll try it.

@niemyjski niemyjski changed the title Current State Node - Ability to get entity id from root flow / global state or template Current State/History Node - Ability to get entity id from root flow / global state or template Dec 31, 2019
zachowj added a commit that referenced this issue Jan 15, 2020
- Changed inputs to be properties of msg.payload.

Closes #191 #190 #177
@zachowj
Copy link
Owner

zachowj commented Jan 15, 2020

9414210

@zachowj zachowj closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants