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

Improvement: Enhance 'globalVariables' custom template #5

Open
heinemannj opened this issue Nov 5, 2024 · 2 comments
Open

Improvement: Enhance 'globalVariables' custom template #5

heinemannj opened this issue Nov 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@heinemannj
Copy link
Owner

Enrich globalVariables custom template with additional information and documentation:

{% from '032-hems.jinja' import globalVariables %}
{% set var = globalVariables()|from_json %}

{%- set ns = namespace(list = []) %}
{%- set ns.dict = [] %}
{%- for record in var|list %}
    {%- set ns.list = ns.list + [var[record]] %}
    {%- set ns.dict = ns.dict + [{
        'variable': record,
        'entity': var[record],
        'unit': 'unit_tbd',
        'default': 'default_value_tbd',
        'description': 'description_tbd',
        'register': 'register_tbd',
        'calculation': 'calculation_tbd',
        'type': 'type_tbd',
        'integration': 'integration_tbd',
        'comment': 'none_tbd',
        'customization': 'none',
      }] %}
{%- endfor %}

{{ns.dict}}

Future custom_template content:

[
  {
    "variable": "bat_soc_setpoint_low",
    "entity": "input_number.batteries_soc_setpoint_low",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_soc_setpoint_neutral",
    "entity": "input_number.batteries_soc_setpoint_neutral",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_soc_setpoint_high",
    "entity": "input_number.batteries_soc_setpoint_high",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_soc_setpoint_forcible_charge",
    "entity": "input_number.batteries_soc_setpoint_forcible_charge",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_setpoint_low",
    "entity": "input_number.epexspot_quantile_setpoint_low",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_setpoint_neutral",
    "entity": "input_number.epexspot_quantile_setpoint_neutral",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_setpoint_high",
    "entity": "input_number.epexspot_quantile_setpoint_high",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_1_current",
    "entity": "sensor.inverter_pv_1_current",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_1_voltage",
    "entity": "sensor.inverter_pv_1_voltage",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_2_current",
    "entity": "sensor.inverter_pv_2_current",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_2_voltage",
    "entity": "sensor.inverter_pv_2_voltage",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_rated_power",
    "entity": "sensor.inverter_rated_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_max_active_power",
    "entity": "sensor.inverter_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_in_power",
    "entity": "sensor.inverter_input_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_active_power",
    "entity": "sensor.inverter_active_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_active_power",
    "entity": "sensor.power_meter_active_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "house_power",
    "entity": "sensor.house_consumption_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_rated_capacity",
    "entity": "sensor.batteries_rated_capacity",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_rated_charge_power",
    "entity": "sensor.batteries_maximum_charge_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_rated_discharge_power",
    "entity": "sensor.batteries_maximum_discharge_power",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_in_power_mean_30min",
    "entity": "sensor.batteries_charge_power_mean_30min",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_out_power_mean_24h",
    "entity": "sensor.batteries_discharge_power_mean_24h",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_soc",
    "entity": "sensor.batteries_state_of_capacity",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_yield_total",
    "entity": "sensor.inverter_total_dc_input_energy",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_in_grid_total",
    "entity": "sensor.batteries_charge_from_grid_energy_total",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_out_total",
    "entity": "sensor.inverter_total_yield",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_in_total",
    "entity": "sensor.batteries_total_charge",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_out_total",
    "entity": "sensor.batteries_total_discharge",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_out_total",
    "entity": "sensor.power_meter_exported",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_in_total",
    "entity": "sensor.power_meter_consumption",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_yield",
    "entity": "sensor.pv_yield_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_in_solar",
    "entity": "sensor.solar_yield_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_in_grid",
    "entity": "sensor.batteries_charge_from_grid_energy_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_out",
    "entity": "sensor.inverter_daily_yield",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_loss",
    "entity": "sensor.inverter_loss_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_in",
    "entity": "sensor.batteries_day_charge",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_in_with_loss",
    "entity": "sensor.batteries_day_charge_with_loss",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_in_loss",
    "entity": "sensor.batteries_charge_loss_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_out",
    "entity": "sensor.batteries_day_discharge",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_out_with_loss",
    "entity": "sensor.batteries_day_discharge_with_loss",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_out_loss",
    "entity": "sensor.batteries_discharge_loss_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_out",
    "entity": "sensor.power_meter_exported_energy_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_in",
    "entity": "sensor.power_meter_consumption_energy_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_active_power_forecast",
    "entity": "sensor.p_grid_forecast",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "house_power_forecast",
    "entity": "sensor.p_load_forecast",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_active_power_forecast",
    "entity": "sensor.p_hybrid_inverter",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "prediction_status",
    "entity": "sensor.optim_status",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "house_in_forecast",
    "entity": "sensor.load_forecast_remaining_today_every_minute",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_in_solar_forecast",
    "entity": "sensor.solcast_forecast_remaining_today_every_minute",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "bat_eoc",
    "entity": "sensor.batteries_end_of_charge_energy",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_out_weekly",
    "entity": "sensor.inverter_yield_weekly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_out_monthly",
    "entity": "sensor.inverter_yield_monthly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "inv_out_yearly",
    "entity": "sensor.inverter_yield_yearly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_out_weekly",
    "entity": "sensor.power_meter_exported_energy_weekly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_out_monthly",
    "entity": "sensor.power_meter_exported_energy_monthly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "grid_out_yearly",
    "entity": "sensor.power_meter_exported_energy_yearly",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "self_sufficiency_total",
    "entity": "sensor.house_self_sufficiency_total",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "self_sufficiency_daily",
    "entity": "sensor.house_self_sufficiency_daily",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "rising_time",
    "entity": "sensor.hems_sun_rising",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "setting_time",
    "entity": "sensor.hems_sun_setting",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "daylight_duration",
    "entity": "sensor.hems_sun_daylight",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solar_noon_time",
    "entity": "sensor.hems_sun_solar_noon",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_excess_start_time",
    "entity": "sensor.hems_sun_pv_excess_start",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_excess_end_time",
    "entity": "sensor.hems_sun_pv_excess_end",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "prediction_end_time",
    "entity": "sensor.hems_sun_prediction_end",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_excess_start_rising_offset",
    "entity": "input_number.hems_sun_pv_excess_start_rising_offset",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "pv_excess_end_setting_offset",
    "entity": "input_number.hems_sun_pv_excess_end_setting_offset",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "prediction_end_setting_offset",
    "entity": "input_number.hems_sun_prediction_end_setting_offset",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_price",
    "entity": "sensor.epex_spot_data_price",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_price_1",
    "entity": "sensor.epex_spot_data_price_3",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_price_2",
    "entity": "sensor.epex_spot_data_price_1",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_price_3",
    "entity": "sensor.epex_spot_data_price_2",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_net_price",
    "entity": "sensor.epex_spot_data_net_price",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_net_price_1",
    "entity": "sensor.epex_spot_data_net_price_3",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_net_price_2",
    "entity": "sensor.epex_spot_data_net_price_1",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_net_price_3",
    "entity": "sensor.epex_spot_data_net_price_2",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile",
    "entity": "sensor.epex_spot_data_quantile",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_1",
    "entity": "sensor.epex_spot_data_quantile_3",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_2",
    "entity": "sensor.epex_spot_data_quantile_1",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_quantile_3",
    "entity": "sensor.epex_spot_data_quantile_2",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "epexspot_data_update",
    "entity": "binary_sensor.epex_spot_data_update",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solcast_forecast_today",
    "entity": "sensor.solcast_pv_forecast_prognose_heute",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solcast_forecast_tomorrow",
    "entity": "sensor.solcast_pv_forecast_prognose_fur_morgen",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solcast_last_poll_time",
    "entity": "sensor.solcast_pv_forecast_zuletzt_abgefragte_api",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solcast_api_request_limit",
    "entity": "sensor.solcast_pv_forecast_api_limit",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "solcast_api_request_used",
    "entity": "sensor.solcast_pv_forecast_verwendete_api",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "sg_ready_hp_lock",
    "entity": "switch.406_wp_sg_ready_evu",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  },
  {
    "variable": "sg_ready_pv_excess",
    "entity": "switch.406_wp_sg_ready_pv_ma",
    "unit": "unit_tbd",
    "default": "default_value_tbd",
    "description": "description_tbd",
    "register": "register_tbd",
    "calculation": "calculation_tbd",
    "type": "type_tbd",
    "integration": "integration_tbd",
    "comment": "none_tbd",
    "customization": "none"
  }
]
@heinemannj heinemannj added the enhancement New feature or request label Nov 5, 2024
@heinemannj
Copy link
Owner Author

The following approach seems to be much more easier:

{% from '032-hems.jinja' import globalVariables %}
{% set var = globalVariables()|from_json %}

{%- set ns = namespace(dict = []) %}
{%- for record in var|list %}
    {%- set ns.dict = ns.dict + [{
        record: {
          'entity': var[record],
          'unit': 'unit_tbd',
          'default': 'default_value_tbd',
          'description': 'description_tbd',
          'register': 'register_tbd',
          'calculation': 'calculation_tbd',
          'type': 'type_tbd',
          'integration': 'integration_tbd',
          'comment': 'none_tbd',
          'customization': 'none'
        }
      }] %}
{%- endfor %}

{{ns.dict}}
[
  {
    "bat_soc_setpoint_low": {
      "entity": "input_number.batteries_soc_setpoint_low",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_soc_setpoint_neutral": {
      "entity": "input_number.batteries_soc_setpoint_neutral",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_soc_setpoint_high": {
      "entity": "input_number.batteries_soc_setpoint_high",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_soc_setpoint_forcible_charge": {
      "entity": "input_number.batteries_soc_setpoint_forcible_charge",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_setpoint_low": {
      "entity": "input_number.epexspot_quantile_setpoint_low",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_setpoint_neutral": {
      "entity": "input_number.epexspot_quantile_setpoint_neutral",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_setpoint_high": {
      "entity": "input_number.epexspot_quantile_setpoint_high",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_1_current": {
      "entity": "sensor.inverter_pv_1_current",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_1_voltage": {
      "entity": "sensor.inverter_pv_1_voltage",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_2_current": {
      "entity": "sensor.inverter_pv_2_current",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_2_voltage": {
      "entity": "sensor.inverter_pv_2_voltage",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_rated_power": {
      "entity": "sensor.inverter_rated_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_max_active_power": {
      "entity": "sensor.inverter_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_in_power": {
      "entity": "sensor.inverter_input_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_active_power": {
      "entity": "sensor.inverter_active_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_active_power": {
      "entity": "sensor.power_meter_active_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "house_power": {
      "entity": "sensor.house_consumption_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_rated_capacity": {
      "entity": "sensor.batteries_rated_capacity",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_rated_charge_power": {
      "entity": "sensor.batteries_maximum_charge_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_rated_discharge_power": {
      "entity": "sensor.batteries_maximum_discharge_power",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_in_power_mean_30min": {
      "entity": "sensor.batteries_charge_power_mean_30min",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_out_power_mean_24h": {
      "entity": "sensor.batteries_discharge_power_mean_24h",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_soc": {
      "entity": "sensor.batteries_state_of_capacity",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_yield_total": {
      "entity": "sensor.inverter_total_dc_input_energy",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_in_grid_total": {
      "entity": "sensor.batteries_charge_from_grid_energy_total",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_out_total": {
      "entity": "sensor.inverter_total_yield",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_in_total": {
      "entity": "sensor.batteries_total_charge",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_out_total": {
      "entity": "sensor.batteries_total_discharge",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_out_total": {
      "entity": "sensor.power_meter_exported",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_in_total": {
      "entity": "sensor.power_meter_consumption",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_yield": {
      "entity": "sensor.pv_yield_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_in_solar": {
      "entity": "sensor.solar_yield_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_in_grid": {
      "entity": "sensor.batteries_charge_from_grid_energy_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_out": {
      "entity": "sensor.inverter_daily_yield",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_loss": {
      "entity": "sensor.inverter_loss_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_in": {
      "entity": "sensor.batteries_day_charge",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_in_with_loss": {
      "entity": "sensor.batteries_day_charge_with_loss",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_in_loss": {
      "entity": "sensor.batteries_charge_loss_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_out": {
      "entity": "sensor.batteries_day_discharge",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_out_with_loss": {
      "entity": "sensor.batteries_day_discharge_with_loss",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_out_loss": {
      "entity": "sensor.batteries_discharge_loss_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_out": {
      "entity": "sensor.power_meter_exported_energy_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_in": {
      "entity": "sensor.power_meter_consumption_energy_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_active_power_forecast": {
      "entity": "sensor.p_grid_forecast",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "house_power_forecast": {
      "entity": "sensor.p_load_forecast",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_active_power_forecast": {
      "entity": "sensor.p_hybrid_inverter",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_active_power_forecast": {
      "entity": "sensor.p_batt_forecast",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "prediction_status": {
      "entity": "sensor.optim_status",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "house_in_forecast": {
      "entity": "sensor.load_forecast_remaining_today_every_minute",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_in_solar_forecast": {
      "entity": "sensor.solcast_forecast_remaining_today_every_minute",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "bat_eoc": {
      "entity": "sensor.batteries_end_of_charge_energy",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_out_weekly": {
      "entity": "sensor.inverter_yield_weekly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_out_monthly": {
      "entity": "sensor.inverter_yield_monthly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "inv_out_yearly": {
      "entity": "sensor.inverter_yield_yearly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_out_weekly": {
      "entity": "sensor.power_meter_exported_energy_weekly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_out_monthly": {
      "entity": "sensor.power_meter_exported_energy_monthly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "grid_out_yearly": {
      "entity": "sensor.power_meter_exported_energy_yearly",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "self_sufficiency_total": {
      "entity": "sensor.house_self_sufficiency_total",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "self_sufficiency_daily": {
      "entity": "sensor.house_self_sufficiency_daily",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "rising_time": {
      "entity": "sensor.hems_sun_rising",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "setting_time": {
      "entity": "sensor.hems_sun_setting",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "daylight_duration": {
      "entity": "sensor.hems_sun_daylight",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solar_noon_time": {
      "entity": "sensor.hems_sun_solar_noon",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_excess_start_time": {
      "entity": "sensor.hems_sun_pv_excess_start",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_excess_end_time": {
      "entity": "sensor.hems_sun_pv_excess_end",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "prediction_end_time": {
      "entity": "sensor.hems_sun_prediction_end",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_excess_start_rising_offset": {
      "entity": "input_number.hems_sun_pv_excess_start_rising_offset",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "pv_excess_end_setting_offset": {
      "entity": "input_number.hems_sun_pv_excess_end_setting_offset",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "prediction_end_setting_offset": {
      "entity": "input_number.hems_sun_prediction_end_setting_offset",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_price": {
      "entity": "sensor.epex_spot_data_price",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_price_1": {
      "entity": "sensor.epex_spot_data_price_3",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_price_2": {
      "entity": "sensor.epex_spot_data_price_1",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_price_3": {
      "entity": "sensor.epex_spot_data_price_2",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_net_price": {
      "entity": "sensor.epex_spot_data_net_price",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_net_price_1": {
      "entity": "sensor.epex_spot_data_net_price_3",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_net_price_2": {
      "entity": "sensor.epex_spot_data_net_price_1",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_net_price_3": {
      "entity": "sensor.epex_spot_data_net_price_2",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_rank": {
      "entity": "sensor.epex_spot_data_rank",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_rank_1": {
      "entity": "sensor.epex_spot_data_rank_3",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_rank_2": {
      "entity": "sensor.epex_spot_data_rank_1",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_rank_3": {
      "entity": "sensor.epex_spot_data_rank_2",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile": {
      "entity": "sensor.epex_spot_data_quantile",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_1": {
      "entity": "sensor.epex_spot_data_quantile_3",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_2": {
      "entity": "sensor.epex_spot_data_quantile_1",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_quantile_3": {
      "entity": "sensor.epex_spot_data_quantile_2",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "epexspot_data_update": {
      "entity": "binary_sensor.epex_spot_data_update",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solcast_forecast_today": {
      "entity": "sensor.solcast_pv_forecast_prognose_heute",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solcast_forecast_tomorrow": {
      "entity": "sensor.solcast_pv_forecast_prognose_fur_morgen",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solcast_last_poll_time": {
      "entity": "sensor.solcast_pv_forecast_zuletzt_abgefragte_api",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solcast_api_request_limit": {
      "entity": "sensor.solcast_pv_forecast_api_limit",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "solcast_api_request_used": {
      "entity": "sensor.solcast_pv_forecast_verwendete_api",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "sg_ready_hp_lock": {
      "entity": "switch.406_wp_sg_ready_evu",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  },
  {
    "sg_ready_pv_excess": {
      "entity": "switch.406_wp_sg_ready_pv_ma",
      "unit": "unit_tbd",
      "default": "default_value_tbd",
      "description": "description_tbd",
      "register": "register_tbd",
      "calculation": "calculation_tbd",
      "type": "type_tbd",
      "integration": "integration_tbd",
      "comment": "none_tbd",
      "customization": "none"
    }
  }
]

@heinemannj
Copy link
Owner Author

Filter to get related entity:

{% from '032-hems.jinja' import globalVariablesTest %}
{% set var = globalVariablesTest()|from_json %}

{% set bar = var.bat_soc_setpoint_neutral.entity %}
{{bar}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant