Git Product home page Git Product logo

Comments (7)

argoyle avatar argoyle commented on June 21, 2024 1

There is a pos/neg somewhere and probably something else but most are L1, L2, L3. I'll see if I can find the time to do something.

from ha-ferroamp.

argoyle avatar argoyle commented on June 21, 2024 1

There is a pos/neg somewhere and probably something else but most are L1, L2, L3. I'll see if I can find the time to do something.

For diagnostics it would be a nice feature. I guess downside is there will be a lot of sensors 🤓 .

Yes, not really a problem I would say.

Maybe it's a good idea to keep the original the original sensors (including state attrs too). For sensors like grid_power I guess the general use case is looking at all phases combined rather than individual phases.

Yes, I didn't plan on removing the current entities, just add new for each phase.

from ha-ferroamp.

argoyle avatar argoyle commented on June 21, 2024

This is of course doable. We have lots of attributes on different entities so maybe we should extract all of them? Thoughts on this @henricm ?

from ha-ferroamp.

henricm avatar henricm commented on June 21, 2024

I've also thought about this actually. I think it's a good idea to extract the values for each phase to be sensors of their own. Or are there other attributes too? I'm thinking about the sensors that have L1, L2, L3 attributes.

from ha-ferroamp.

bj00rn avatar bj00rn commented on June 21, 2024

There is a pos/neg somewhere and probably something else but most are L1, L2, L3. I'll see if I can find the time to do something.

For diagnostics it would be a nice feature. I guess downside is there will be a lot of sensors 🤓 .

  • external_voltage => external_voltage_l1, external_voltage_l2, external_voltage_l3
  • grid_current => grid_current_l1, grid_current_l2, grid_current_l3
  • external_reactive_current => external_reactive_current_l1,external_reactive_current_l2,external_reactive_current_l3
  • etc..

Maybe it's a good idea to keep the original the original sensors (including state attrs too). For sensors like grid_power I guess the general use case is looking at all phases combined rather than individual phases.

from ha-ferroamp.

robinostlund avatar robinostlund commented on June 21, 2024

Think also this feature would be good, i have solved this today by creating templates:

---
sensor:
  - name: "Ferroamp Adaptive Current Equalization Phase 1"
    unique_id: "ferroamp_adaptive_current_equalization_phase_1"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_adaptive_current_equalization','L1') }}

  - name: "Ferroamp Adaptive Current Equalization Phase 2"
    unique_id: "ferroamp_adaptive_current_equalization_phase_2"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_adaptive_current_equalization','L2') }}

  - name: "Ferroamp Adaptive Current Equalization Phase 3"
    unique_id: "ferroamp_adaptive_current_equalization_phase_3"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_adaptive_current_equalization','L3') }}

  - name: "Ferroamp Grid Current Phase 1"
    unique_id: "ferroamp_grid_current_phase_1"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_grid_current','L1') }}

  - name: "Ferroamp Grid Power Phase 1"
    unique_id: "ferroamp_grid_power_phase_1"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_grid_power','L1'), 0) %}
      {{ power }}

  - name: "Ferroamp Grid Current Phase 2"
    unique_id: "ferroamp_grid_current_phase_2"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_grid_current','L2') }}

  - name: "Ferroamp Grid Power Phase 2"
    unique_id: "ferroamp_grid_power_phase_2"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_grid_power','L2'), 0) %}
      {{ power }}


  - name: "Ferroamp Grid Current Phase 3"
    unique_id: "ferroamp_grid_current_phase_3"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {{ state_attr('sensor.ferroamp_grid_current','L3') }}


  - name: "Ferroamp Grid Power Phase 3"
    unique_id: "ferroamp_grid_power_phase_3"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_grid_power','L3'), 0) %}
      {{ power }}


  - name: "Ferroamp Consumption Current Phase 1"
    unique_id: "ferroamp_consumption_current_phase_1"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {% set power = int(states('sensor.ferroamp_consumption_power_phase_1'), 0) %}
      {% set current = float(power / 230, 0) %}
      {% if current < 0 %}
        {% set current = 0 %}
      {% endif %}
      {{ current | round(2) }}

  - name: "Ferroamp Consumption Power Phase 1"
    unique_id: "ferroamp_consumption_power_phase_1"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_consumption_power','L1'), 0) %}
      {{ power }}


  - name: "Ferroamp Consumption Current Phase 2"
    unique_id: "ferroamp_consumption_current_phase_2"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {% set power = int(states('sensor.ferroamp_consumption_power_phase_2'), 0) %}
      {% set current = float(power / 230, 0) %}
      {% if current < 0 %}
        {% set current = 0 %}
      {% endif %}
      {{ current | round(2) }}

  - name: "Ferroamp Consumption Power Phase 2"
    unique_id: "ferroamp_consumption_power_phase_2"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_consumption_power','L2'), 0) %}
      {{ power }}


  - name: "Ferroamp Consumption Current Phase 3"
    unique_id: "ferroamp_consumption_current_phase_3"
    device_class: current
    icon: "mdi:current-ac"
    unit_of_measurement: A
    state_class: measurement
    state: >
      {% set power = int(states('sensor.ferroamp_consumption_power_phase_3'), 0) %}
      {% set current = float(power / 230, 0) %}
      {% if current < 0 %}
        {% set current = 0 %}
      {% endif %}
      {{ current | round(2) }}

  - name: "Ferroamp Consumption Power Phase 3"
    unique_id: "ferroamp_consumption_power_phase_3"
    device_class: power
    icon: "mdi:power-plug"
    unit_of_measurement: W
    state_class: measurement
    state: >
      {% set power = int(state_attr('sensor.ferroamp_consumption_power','L3'), 0) %}
      {{ power }}

from ha-ferroamp.

bj00rn avatar bj00rn commented on June 21, 2024

Also affected, DC link voltage sensor

image image

from ha-ferroamp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.