Closed KhomichMO closed 4 years ago
Hi i tried to completely delete the integration, then reboot HA, then install it again, then several reboots to check the bug...and nothing. I have only "RK-G200S" after every reboot. "redmond sky" can appear only if "findType" function doesnt work. You can find it in 'init.py'.
try to change your "findType" function to below:
def findType(self): match_result = search(r'hci([\d]+)', self._device) if match_result is None: _LOGGER.error('match result is None') else: iface = int(match_result.group(1)) scanner = btle.Scanner(iface=iface) ble_devices = {device.addr:str(device.getValueText(9)) for device in scanner.scan(2.0)} dev_name = ble_devices.get(self._mac, 'None') self._type = SUPPORTED_DEVICES.get(dev_name, 1) if dev_name != 'None': self._name = dev_name else: _LOGGER.error('dev_name is None')
here is the better syntax: https://pastebin.com/A0LGHiBh
then catch your logs
Using your code caught this:
dev_name is None 8:43:07 PM – ready4sky (ERROR)
it means, that my integretion cant find your device in 2 sec. try to increase the counter to, may be, 5 sec. ble_devices = {device.addr:str(device.getValueText(9)) for device in scanner.scan(2.0)}
generally, pay attention to your bluetooth hardware (RPI integrated ble is very bad) and the distance between HA and kettle
Seems to work with 5 secs, thanks.
Kettle: G200S
After each HA reload new set of entities are created: first "RK-G200S", after the next reload - "redmond sky" (RK-G200S is deactivated), then back to RK-G200S and so on.