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

The example flow isn't working #505

Closed
Edo78 opened this issue Nov 2, 2021 · 0 comments
Closed

The example flow isn't working #505

Edo78 opened this issue Nov 2, 2021 · 0 comments

Comments

@Edo78
Copy link
Contributor

Edo78 commented Nov 2, 2021

Documentation URL

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/starting-flow-after-home-assistant-restart.html#create-an-input-boolean-using-the-helpers-menu-configuration-helpers

The problem

I just checked the example but it isn't working. Besides having to personalize the name of my instance and my url I've found a problem in the subflow
https://github.com/zachowj/node-red-contrib-home-assistant-websocket/blob/ebcfecfa3e0cd58338ab0737ce3e219fdf1fc253/examples/cookbook/starting-flow-after-home-assistant-restart/example_01.json

The node named create helper return a msg

{
    "entity":{
        "id":"input_boolean.home_assistant_restarted",
        "type":"input_boolean",
        "name":"Home Assistant Restarted",
        "icon":"mdi:restart-alert"
    },
    "payload":{
        "name":"Home Assistant Restarted",
        "icon":"mdi:restart-alert",
        "id":"home_assistant_restarted"
    },
    "_msgid":"972ab3b3fdd92d9e"
}

Then the next node check if payload.id is different from entity.id and they are because the first is home_assistant_restarted while the latter is the full id of the entity input_boolean.home_assistant_restarted.
The next node try to rename it with the following

{
   "type":"config/entity_registry/update",
   "entity_id": entity.type & "." & payload.id,
   "new_entity_id": entity.type & "." & entity.id
}

But the new id should be input_boolean.input_boolean.home_assistant_restarted and the node throw a Error Message: Invalid entity ID error.

I'm not sure why there's a check to see if the entity must be renamed and so I don't know how to fix the check itself nor the renaming part.

@zachowj zachowj closed this as completed in 3696c44 Nov 2, 2021
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

1 participant