We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atick - ble impulse counter.
minimum code to get values:
import array import asyncio from bleak import BleakClient address = "XX:XX:XX:XX:XX:XX" UUID_SERVICE_AG = "348634B0-EFE4-11E4-B80C-0800200C9A66" UUID_AG_ATTR_VALUES = "348634B8-EFE4-11E4-B80C-0800200C9A66" def truncate_float(n, places): return int(n * (10 ** places)) / 10 ** places async def main(address, UUID_AG_ATTR_VALUES): async with BleakClient(address) as client: characteristic_value = (client .services.get_service(UUID_SERVICE_AG) .get_characteristic(UUID_AG_ATTR_VALUES)) data = await client.read_gatt_char(characteristic_value) values = array.array('f', data).tolist() counter_a_value = truncate_float(values[0], 2) counter_b_value = truncate_float(values[1], 2) print(f"counter a:", counter_a_value) print(f"counter b:",counter_b_value) asyncio.run(main(address, UUID_AG_ATTR_VALUES))
there is also an extension for HA https://github.com/XNicON/hassio-atick/tree/main/custom_components/deembot_atick
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Atick - ble impulse counter.
minimum code to get values:
there is also an extension for HA
https://github.com/XNicON/hassio-atick/tree/main/custom_components/deembot_atick
The text was updated successfully, but these errors were encountered: