Skip to content

Commit

Permalink
Merge pull request #64 from veista/master
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
veista authored Jul 27, 2023
2 parents 8393f7e + b87a670 commit 79cfc03
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 64 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Nilan integration for Home Assistant

CTS602 supported devices (as typed in HMI menu):

- Comfort light
- VPL 15c
- VP18cCom
- COMFORT
- VP 18c
- VP 18ek
- VP 18cek
- VPL 25c
- COMBI 302
- COMBI 302 T

Majority of functions are supported. If some critical is missing please leave an issue.

Expand Down
4 changes: 3 additions & 1 deletion custom_components/nilan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

hass.data[DOMAIN][entry.entry_id] = device

hass.config_entries.async_setup_platforms(entry, PLATFORMS)
hass.async_create_task(
hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
)
return True


Expand Down
4 changes: 2 additions & 2 deletions custom_components/nilan/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from homeassistant import config_entries

from pymodbus.client.sync import ModbusTcpClient, ModbusSerialClient
from pymodbus.client import ModbusTcpClient, ModbusSerialClient
from pymodbus.exceptions import ModbusException

from .device import CTS602_DEVICE_TYPES
Expand Down Expand Up @@ -57,7 +57,7 @@ async def async_validate_device(com_type, port, unit_id, address: str | None) ->
)
try:
result = client.read_holding_registers(
CTS602HoldingRegisters.control_type, 1, unit=int(unit_id)
CTS602HoldingRegisters.control_type, 1, slave=int(unit_id)
)
except ModbusException as value_error:
client.close()
Expand Down
Loading

0 comments on commit 79cfc03

Please sign in to comment.