ha-sankey-chart icon indicating copy to clipboard operation
ha-sankey-chart copied to clipboard

Connections accross sections

Open MindFreeze opened this issue 2 years ago • 3 comments

Or ability to skip a section. Could be implemented with ghost boxes in between.

Also mentioned in #6

MindFreeze avatar May 19 '22 12:05 MindFreeze

I've been waiting for this one but cannot work out how to do it. I am currently fudging it with the dirty hack of including an entity twice in different sections and making it a child of itself. If I remove the intermediary entity I now get an orphan entity that is not connected to anything.

Is there something I need to put in between to achieve the "passthrough" I can see in the code? Could you update the docs with an example? Thanks

Muppetteer avatar Aug 10 '22 00:08 Muppetteer

This is exactly how it works. It just auto adds child entities in the intermediary sections to connect the curve. The 'passthrough' type enables special rendering for those. Same rules about state apply though. If for some reason you don't get the intermediaries, you can try to keep yours and just add type: passthrough to them. This would even allow you to position them manually.

I haven't had time to properly explain this in the README.

Here is a screenshot of a weird test I have 192 168 1 100_8123_lovelace-test_0

MindFreeze avatar Aug 10 '22 19:08 MindFreeze

Thanks, it is working now. I suspect it may have been a browser cache issue not picking up the new code. I found that keeping the entity, setting type: passthrough, and connecting to itself as a child works best as I can control the order and colour of the branches.

Muppetteer avatar Aug 10 '22 23:08 Muppetteer

Updated README

MindFreeze avatar Oct 24 '22 09:10 MindFreeze

Is it just me or does the combination of child/parent state not work with passthrough?

icefest avatar Apr 15 '24 08:04 icefest

@icefest It should. I've used it with passthrough before. Maybe there is some sort of regression. Feel free to open a bug report

MindFreeze avatar Apr 15 '24 08:04 MindFreeze