slipx06 / sunsynk-power-flow-card

⚡A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.
MIT License
214 stars 57 forks source link

Unable to access sensors from options in the setup of the card #433

Closed devilliersjohnny closed 6 months ago

devilliersjohnny commented 6 months ago

Is there an existing issue for this?

Current Behavior

Unable to access sensors from options in the setup of the card

sensor_error

Where as the documentation says that I should?

sensor_error_documentation

The same holds true for all the other text_input fields that I have tested so far

Steps To Reproduce

  1. Create the sensor same as below
- name: "EDB I1 Battery Shutdown SOC"
    unique_id: edb_i1_battery_shutdown_soc
    unit_of_measurement: "%"
    icon: mdi:battery-outline
    device_class: battery
    state: >
      {% if states('input_text.edb_i1_battery_shutdown_soc_input_text') | is_number %}
        {% set battery_soc = states('input_text.edb_i1_battery_shutdown_soc_input_text')  | float | round(0) %}
      {% else %}
        {% set battery_soc = 'None' %}
      {% endif %}
      {{ battery_soc }}
  1. Create Input_text feild for edb_i1_battery_shutdown_soc_input_text
  2. Reload Yaml
  3. Set value for input_text.edb_i1_battery_shutdown_soc_input_text
  4. Input sensor.edb_i1_battery_shutdown_soc into Battery Options under Shutdown SOC and note that the card does not accept the value ( the input is underlined in red... see above )

Expected behaviour

According to the documentation and dashboard example ( see https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/main/Dashboard.yaml) ) provided I would like to see the data from the sensors be pulled through to the cards configuration

Card Version

v4.37.0

Home Assistant Version

2024.5.3

Configuration

No response

Relevant log output

No response

slipx06 commented 6 months ago

Thanks I'll take a look. Some of the fields were updated to accept both a string/number or entity. I'm not sure the visual editor supports both. For now you have to switch to the code editor.