Skip to content

Commit

Permalink
Merge branch 'main' into mega-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Jul 24, 2024
2 parents c67dcc5 + f26f30e commit b31baa5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion custom_components/solaredge_modbus_multi/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

import logging

from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityCategory
Expand Down Expand Up @@ -100,6 +103,7 @@ def is_on(self) -> bool:
class GridStatusOnOff(SolarEdgeBinarySensorBase):
"""Grid Status On Off. This is undocumented from discussions."""

device_class = BinarySensorDeviceClass.POWER
icon = "mdi:transmission-tower"

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ async def read_modbus_data(self) -> None:
)

""" Grid On/Off Status """
if self.hub.option_detect_extras is True and self._grid_status is not False:
if self._grid_status is not False:
try:
inverter_data = await self.hub.modbus_read_holding_registers(
unit=self.inverter_unit_id, address=40113, rcount=2
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solaredge_modbus_multi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues",
"loggers": ["custom_components.solaredge_modbus_multi"],
"requirements": ["pymodbus>=3.6.6"],
"version": "2.4.17-pre.3"
"version": "2.4.18"
}

0 comments on commit b31baa5

Please sign in to comment.