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

Allowing piping for numeric entity states #670

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

Mulando
Copy link
Contributor

@Mulando Mulando commented Jul 27, 2024

State values of entities can now be merged together by piping the entity names. Only works with numbers. If the state is not a number, the first will be used. If another property than "state" is used, only the values of the first entity will be used.

E.g. my inverter does not provide a single sensor for the current grid consumption. Instead each phase has its own value. So I made a small modification to your project by allowing piping sensor entities.

Example:
grid:
entity: >-
sensor.foxessrs485_grid_ct_r | sensor.foxessrs485_grid_ct_s |
sensor.foxessrs485_grid_ct_t

Mulando and others added 3 commits July 27, 2024 21:11
…ity names. Only works with numbers. If the state is not a number, the first will be used. If another property than "state" is used, only the values of the first entity will be used.
Copy link
Owner

@flixlix flixlix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR!
I do recognize this is a hack and would like to implement this with the UI editor preferably, but for now I'll merge this :)

@flixlix flixlix changed the base branch from main to release-0.2.3 August 25, 2024 19:07
@flixlix flixlix merged commit 3fd7d00 into flixlix:release-0.2.3 Aug 26, 2024
1 of 2 checks passed
@doopa75
Copy link

doopa75 commented Dec 11, 2024

E.g. my inverter does not provide a single sensor for the current grid consumption. Instead each phase has its own value. So I made a small modification to your project by allowing piping sensor entities.
Example: grid: entity: >- sensor.foxessrs485_grid_ct_r | sensor.foxessrs485_grid_ct_s | sensor.foxessrs485_grid_ct_t

I have a sdm630 meter that monitors power on each phase. How do I configure the grid to correctly show power flow?
I have sensors:
solar:
entity: sensor.stp4_0_3av_40_936_grid_power = 300
grid:
entity: sensor.sdm630_sdm630_powerL1 = -100
sensor.sdm630_sdm630_powerL2 = 0
sensor.sdm630_sdm630_powerL3 = 100

example
solar production 300W / 3 = 100W per phase.

House load 300 W (0 W first phase, 100 W second phase, 200 W third phase)

The flow should look like this:
house load 300 W, from the grid 100 W (100 on phase 3), from the sun 200 W (100 W on phase 2 and 100 W on phase 3)

To sum up the network: phase 1 is (minus) -100 W returns to the grid, phase 2 is 0 W (powered by the sun), phase 3 is 100 W (the second 100 W from the sun)

Is it good to configure the energy flow at the current stage of development?

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

Successfully merging this pull request may close these issues.

3 participants