thegroove / esphome-zbbridge

ESPHome custom component and configuration for Sonoff Zigbee Bridge with serial-over-tcp
GNU General Public License v3.0
40 stars 10 forks source link

Fix for latest ESPHome version. #15

Open 5thsymphony opened 2 years ago

5thsymphony commented 2 years ago

See upstream merge for more info on this refactor:

https://github.com/esphome/esphome/commit/471b82f727e2f698b8879fb51c4161a9cf49d34b

MattWestb commented 2 years ago

Hi @5thsymphony !! I have one WeMos Di Mini that is running the old working version and have updated ESPHome so it not working and was testing your patch but i still getting many errors then trying compiling the firmware. Have ESPHome implanting more new futures that is braking the serial server and the very nice binary sensor ??

fraserp commented 1 year ago

I've tried to use this branch to get it to compile with ESPHome 2022.12.8 however I get the following error:

INFO Reading configuration /config/esphome/sonoff_zbbridge.yaml... ERROR Unable to load component serial_server.binary_sensor: Traceback (most recent call last): File "/esphome/esphome/loader.py", line 162, in _lookup_module module = importlib.import_module(f"esphome.components.{domain}") File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/config/esphome/custom_components/serial_server/binary_sensor.py", line 15, in cv.Optional(CONF_DEVICE_CLASS, default=DEVICE_CLASS_CONNECTIVITY): binary_sensor.device_class, AttributeError: module 'esphome.components.binary_sensor' has no attribute 'device_class' Failed config

Jarnsen commented 1 year ago

I've tried to use this branch to get it to compile with ESPHome 2022.12.8 however I get the following error:

INFO Reading configuration /config/esphome/sonoff_zbbridge.yaml... ERROR Unable to load component serial_server.binary_sensor: Traceback (most recent call last): File "/esphome/esphome/loader.py", line 162, in _lookup_module module = importlib.import_module(f"esphome.components.{domain}") File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/config/esphome/custom_components/serial_server/binary_sensor.py", line 15, in cv.Optional(CONF_DEVICE_CLASS, default=DEVICE_CLASS_CONNECTIVITY): binary_sensor.device_class, AttributeError: module 'esphome.components.binary_sensor' has no attribute 'device_class' Failed config

Same problem here.

INFO Reading configuration /config/esphome/zb-bridge.yaml... ERROR Unable to load component serial_server.binary_sensor: Traceback (most recent call last): File "/esphome/esphome/loader.py", line 165, in _lookup_module module = importlib.import_module(f"esphome.components.{domain}") File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/config/esphome/custom_components/serial_server/binarysensor.py", line 10, in class = ns.class_('BinarySensor', binary_sensor.BinarySensor, cg.Nameable) AttributeError: module 'esphome.codegen' has no attribute 'Nameable' Failed config

binary_sensor.serial_server: [source /config/esphome/zb-bridge.yaml:36]

Platform not found: 'binary_sensor.serial_server'. platform: serial_server name: Zigbee to serial

where is the problem?