nos86 / hacs-modbus-logo

An implementation of modbus for PLC Logo!8
MIT License
4 stars 0 forks source link

No modbus.base_platform in recent versions of Home Assistant #32

Open asinpk opened 2 weeks ago

asinpk commented 2 weeks ago

System Health details

System Information

version core-2024.10.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch x86_64
timezone Asia/Kamchatka
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 4970 Installed Version | 2.0.1 Stage | running Available Repositories | 1430 Downloaded Repositories | 4
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.10.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 30.8 GB disk_used | 4.2 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.15.0), File editor (5.8.0)
Dashboards dashboards | 3 -- | -- resources | 0 views | 1 mode | storage
Recorder oldest_recorder_run | 1 октября 2024 г. в 21:47 -- | -- current_recorder_run | 8 октября 2024 г. в 17:59 estimated_db_size | 3.66 MiB database_engine | sqlite database_version | 3.45.3
Xiaomi Miot Auto component_version | 0.7.20 -- | -- can_reach_server | ok can_reach_spec | ok logged_accounts | 0 total_devices | 0

Checklist

Describe the issue

Some time ago in PR https://github.com/home-assistant/core/pull/126104/commits the "base_platform.py" module was moved to "entity.py" and now integration startup failed with error "No module named 'homeassistant.components.modbus.base_platform'".

My modbus config:

modbus_logo:
  - name: modbus_pplc
    type: serial
    port: /dev/ttyUSB0
    baudrate: 115200
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1
    lights:
      - name: pplc_light_basement
        slave: 1
        address: 0
        scan_interval: 1
        write_type: holding
        command_on: 1
        command_off: 0
        verify:
            input_type: holding
            address: 0
            state_on: 1
            state_off: 0
            sync: true
      - name: pplc_light_first_floor
        slave: 1
        address: 1
        scan_interval: 1
        write_type: holding
        command_on: 1
        command_off: 0
        verify:
            input_type: input
            address: 1
            state_on: 1
            state_off: 0
            sync: true
      - name: pplc_light_second_floor
        slave: 1
        address: 2
        scan_interval: 1
        write_type: holding
        command_on: 1
        command_off: 0
        verify:
            input_type: input
            address: 2
            state_on: 1
            state_off: 0
            sync: true

Reproduction steps

  1. Install recent HA
  2. Install integration
  3. Add some modbus switches/lights/etc.

Debug logs

2024-10-08 18:22:23.946 DEBUG (MainThread) [homeassistant.loader] Importing platforms for modbus_logo executor=['light'] loop=[] took 0.75s
2024-10-08 18:22:23.946 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'modbus_logo.light': Platform not found (No module named 'homeassistant.components.modbus.base_platform').
2024-10-08 18:22:23.952 DEBUG (MainThread) [homeassistant.loader] Importing platforms for modbus_logo executor=['switch'] loop=[] took 0.76s
2024-10-08 18:22:23.952 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'modbus_logo.switch': Platform not found (No module named 'homeassistant.components.modbus.base_platform').

Diagnostics dump

No response

nos86 commented 2 weeks ago

Hello @asinpk , thanks for highlighting the issue. I'll working in the next few days to solve the issue and release the updated version.

nos86 commented 2 weeks ago

I have fixed the issue and release as Pre-release the change (v.0.2.1-rc.1)

When you are able can you try this new package and confirm me that it works?

asinpk commented 2 weeks ago

Hello @nos86 I have checked the version 0.2.1-rc.1 and it works. Thanks.