Git Product home page Git Product logo

beewi_smartclim's People

Contributors

alemuro avatar dependabot-preview[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vroume

beewi_smartclim's Issues

Error __init__() takes 2 positional arguments but 3 were given (version 0.0.7 + home assistant + btlewrap 0.1.0)

Hello,
I've activated beewi_smartclim in my Home Assistant setup (containers on Raspberry Pi).
I'm running Home Assistant 0.118.0 which seems to embed btlewrap 0.1.0 and beewi_smartclim 0.0.7 (even if this version seems to require btlewrap 0.0.8).

After that, sensor states were "unknown" in home assistant and in HA Core Logs, I had following kind of error :

2020-11-19 21:04:21 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.capteur_beewi_battery fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/beewi_smartclim/sensor.py", line 98, in update
    self._poller.update_sensor()
  File "/usr/local/lib/python3.8/site-packages/beewi_smartclim/__init__.py", line 72, in update_sensor
    bt_interface = BluetoothInterface(backend=self._backend, adapter="hci0")
TypeError: __init__() takes 2 positional arguments but 3 were given

I think this problem should also arise with btlewrap 0.0.8 since BluetoothInterface __ init__ prototype seems not to have changed between 0.0.8 and 0.1.0.
I've solved (to be confirmed !) the error by changing call to BluetoothInterface in beewi_smartclim's __ init__.py file :
bt_interface = BluetoothInterface(self._backend, adapter="hci0")
changed to :
bt_interface = BluetoothInterface(backend=self._backend, adapter="hci0")

Maybe it could be corrected inside beewi_smartclim ?

By the way, thanks for the work, seems nice to have access so easily to my BeeWi sensor from HA ! ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.