Skip to content

Commit

Permalink
Merge pull request #18 from MiguelAngelLV/main
Browse files Browse the repository at this point in the history
Ajuste de mercado e Indexada
  • Loading branch information
azogue authored Mar 10, 2024
2 parents 1650d7d + 7aa62e3 commit 4988b09
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion custom_components/pvpc_hourly_pricing/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
import logging
from typing import Any

from aiopvpc.const import KEY_INJECTION, KEY_MAG, KEY_OMIE, KEY_PVPC
from aiopvpc.const import (
KEY_ADJUSTMENT,
KEY_INDEXED,
KEY_INJECTION,
KEY_MAG,
KEY_OMIE,
KEY_PVPC,
)
from aiopvpc.ha_helpers import make_sensor_unique_id

from homeassistant.components.sensor import (
Expand Down Expand Up @@ -43,6 +50,24 @@
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=5,
),
SensorEntityDescription(
key=KEY_ADJUSTMENT,
icon="mdi:shopping",
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=5,
name="Market adjustment",
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key=KEY_INDEXED,
icon="mdi:currency-eur",
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=5,
name="Indexed price",
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key=KEY_INJECTION,
icon="mdi:transmission-tower-export",
Expand Down

0 comments on commit 4988b09

Please sign in to comment.