Help with switchmate

hey guys im trying to set up my switchmate but get an error and also i count find any where if it is working on hass.io here is my configuration and logs hope someone can help thanks

switch:
  - platform: switchmate
    mac: 'f7:01:c7:e9:0d:66'
    name: switchmate


Failed to connect to switchmate
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/switchmate/__init__.py", line 34, in _connect
    bluepy.btle.ADDR_TYPE_RANDOM)
  File "/usr/local/lib/python3.6/site-packages/bluepy/btle.py", line 353, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/local/lib/python3.6/site-packages/bluepy/btle.py", line 402, in _connect
    "Failed to connect to peripheral %s, addr type: %s" % (addr, addrType))
bluepy.btle.BTLEException: Failed to connect to peripheral F7:01:C7:E9:0D:66, addr type: random


switchmate: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 251, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 352, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/switchmate.py", line 62, in update
    self._device.update()
  File "/usr/local/lib/python3.6/site-packages/switchmate/__init__.py", line 59, in update
    self.state = self._device.readCharacteristic(HANDLE) == key
AttributeError: 'NoneType' object has no attribute 'readCharacteristic'

I’m getting the same errors, but I have 2 switchmate devices configured. Hass seems to swap between which Switchmate it will connect to.

For the device that works, this integration is great!!

I have the same error on my original switchmate too. I think the original switchmate requires an auth code that you add to the yaml file. To get the auth code you have to use a program like node-switchmate which I couldn’t get to work correctly last time I tried. If/when I figure it out I’ll post the solution here. It will take me some time to get back to it though.