davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
MIT License
316 stars 64 forks source link

When using the custom names there are no attributes is the sensors #93

Closed gieljnssns closed 1 year ago

gieljnssns commented 1 year ago

Describe the bug When I use custom entity names there are no attrfibutes exposed To Reproduce Steps to reproduce the behavior

Expected behavior I expected to see the attributes

Screenshots

Scherm­afbeelding 2023-06-26 om 18 19 40 Scherm­afbeelding 2023-06-26 om 18 25 17 Scherm­afbeelding 2023-06-26 om 18 25 40 Scherm­afbeelding 2023-06-26 om 18 25 52

Home Assistant installation type

Your hardware

EMHASS installation type

Additional context

publish_data:
  url: http://localhost:5001/action/publish-data
  method: POST
  content_type: "application/json"
  payload: >-
    {
      "custom_deferrable_forecast_id": [
        {"entity_id": "sensor.emhass_wasmachien",
          "unit_of_measurement": "W",
          "friendly_name": "Emhass wasmachien"},
        {"entity_id": "sensor.emhass_droogkast",
          "unit_of_measurement": "W",
          "friendly_name": "Emhass droogkast"},
        {"entity_id": "sensor.emhass_afwasmachien",
          "unit_of_measurement": "W",
          "friendly_name": "Emhass afwasmachien"},
        {"entity_id": "sensor.emhass_warmtepompboiler",
          "unit_of_measurement": "W",
          "friendly_name": "Emhass warmtepompboiler"
        }
      ],
      "custom_pv_forecast_id": {
        "entity_id": "sensor.emhass_pv_forecast",
        "unit_of_measurement": "W",
        "friendly_name": "Emhass pv forecast"},
      "custom_load_forecast_id": {
        "entity_id": "sensor.emhass_load_forecast",
        "unit_of_measurement": "W",
        "friendly_name": "Emhass load forecast"},
      "custom_grid_forecast_id": {
        "entity_id": "sensor.emhass_grid_forecast",
        "unit_of_measurement": "W",
        "friendly_name": "Emhass grid forecast"},
      "custom_unit_load_cost_id": {
        "entity_id": "sensor.emhass_load_cost",
        "unit_of_measurement": "€/kWh",
        "friendly_name": "Emhass load cost"},
      "custom_unit_prod_price_id": {
        "entity_id": "sensor.emhass_prod_price",
        "unit_of_measurement": "€/kWh",
        "friendly_name": "Emhass production price"}
    }
davidusb-geek commented 1 year ago

I see why this is happening. It is a bug. I will fix it as soon as possible.

davidusb-geek commented 1 year ago

I've just published a new release solving this issue.