Skip to content

Commit

Permalink
Added PWM sensor to Zappi, fixes #302
Browse files Browse the repository at this point in the history
  • Loading branch information
CJNE committed Mar 26, 2023
1 parent 8462d6c commit b46e5e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_components/myenergi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from homeassistant.const import ELECTRIC_POTENTIAL_VOLT
from homeassistant.const import ENERGY_KILO_WATT_HOUR
from homeassistant.const import FREQUENCY_HERTZ
from homeassistant.const import PERCENTAGE
from homeassistant.const import POWER_WATT
from homeassistant.const import TEMP_CELSIUS
from homeassistant.helpers.entity import EntityCategory
Expand Down Expand Up @@ -351,6 +352,14 @@ async def async_setup_entry(hass, entry, async_add_devices):
)
# Zappi only sensors
if device.kind == ZAPPI:
sensors.append(
MyenergiSensor(
coordinator,
device,
entry,
create_meta("PWM", "pwm", unit=PERCENTAGE),
)
)
sensors.append(
MyenergiSensor(
coordinator,
Expand Down

0 comments on commit b46e5e8

Please sign in to comment.