appKey und secret abrufen:

curl -i -v --json "{'snNumber': 'EureHubSeriennummer', 'account': 'EureEmailadresse'}" https://app.zendure.tech/eu/developer/api/apply

Inhalt zendure.conf

connection zendure-broker
address mqtt-eu.zen-iot.com:1883
remote_username <appKey>
remote_password <appSecret>
remote_clientid <appKey>
topic <appKey>/# in
topic # in 0 homeassistant/sensor/<appKey>/ <appKey>/sensor/device/

Sensoren Batterie HUB 2000

Achtung!! Die Sensoren ’sensor.balkonsolar_ertrag_switch_0_power‘ und ’sensor.solarinputpower‘ müssen auf eure Sensor-Namen angepasst werden!

  - sensor:
      - name: "Power Battery Total"
        unique_id: power_battery_total
        state: >
          {{ states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) -
             states('sensor.solarinputpower')|float(0) }}
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        availability: >
            {{
               [ states('sensor.balkonsolar_ertrag_switch_0_power'),
                 states('sensor.solarinputpower') ] | map('is_number') | min }}
  - sensor:
      - name: "Power Battery Ausgang"
        unique_id: power_battery_ausgang
        state: >
            {% if states('sensor.power_battery_total') | float(0) >= 0 %}
                {{states('sensor.power_battery_total') | float(0) | round (3) }}
            {% else %}
                {{(states ('0.0') | float(0)) |round(3) }}
            {% endif %}
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        availability: >
            {{ 
               [ states('sensor.power_battery_total') ] | map('is_number') | min }}
  - sensor:
      - name: "Power Battery Eingang"
        unique_id: power_battery_eingang
        state: >
            {% if states('sensor.power_battery_total') | float(0) < 0 %}
                {{(states('sensor.power_battery_total') | float(0))*-1 | round (3) }}
            {% else %}
                {{(states ('0.0') | float(0)) |round(3) }}
            {% endif %}
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        availability: >
            {{ 
               [ states('sensor.power_battery_total') ] | map('is_number') | min }}

Sensoren Hyper 2000

#Battery komplett
{%- if states('input_number.hyper_2000_batterie_status') | float(0) == 1 -%}
  {%- if states('sensor.balkonsolar_ertrag_switch_0_power') | float(0) > 850 -%}
    {{ 0 - states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) - states('sensor.solarinputpower_2')|float(0) }}
  {%- elif states('sensor.outputpackpower_2') | float(0) > states('sensor.solarinputpower_2') | float(0) -%}
    {{ 0 - states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) - states('sensor.solarinputpower_2')|float(0) }}
  {%- else -%}
    {{ states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) - states('sensor.solarinputpower_2')|float(0) }}
  {%- endif %}
{%- elif states('input_number.hyper_2000_batterie_status') | float(0) == 2 -%}
  {{ states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) - states('sensor.solarinputpower_2')|float(0) }}
{%- else -%}
  {{ 0 }}
{%- endif %}


#Battery Eingang
{% if states('sensor.hyper_2000_battery_komplett') | float(0) < 0 %}
    {{(states('sensor.hyper_2000_battery_komplett') | float(0))*-1 | round (3) }}
{% else %}
    {{(states ('0.0') | float(0)) |round(3) }}
{% endif %}


# Battery Ausgang
{% if states('sensor.hyper_2000_battery_komplett') | float(0) >= 0 %}
    {{states('sensor.hyper_2000_battery_komplett') | float(0) | round (3) }}
{% else %}
    {{(states ('0.0') | float(0)) |round(3) }}
{% endif %}


# Power ins Haus
{%- if states('input_number.hyper_2000_batterie_status') | float(0) == 1 -%}
  {%- if states('sensor.balkonsolar_ertrag_switch_0_power') | float(0) > 850 -%}
    {{ 0 }}
  {%- elif states('sensor.outputpackpower_2') | float(0) > states('sensor.solarinputpower_2') | float(0) -%}
    {{ 0 }}
  {%- else -%}
    {{ states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) }}
  {%- endif %}
{%- else -%}
  {{ states('sensor.balkonsolar_ertrag_switch_0_power')|float(0) }}
{%- endif %}

Diesen Beitrag teilen: