custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.93k stars 248 forks source link

[Bug]: option Display precision doesn't work how it should #1179

Open vp-lab opened 1 year ago

vp-lab commented 1 year ago

What happened?

I have all the sensors configured in configuration.yaml and now in the home page I get something like, 23.74534536°C

ble_monitor:
  discovery: False
  active_scan: True
  devices:
    - mac: "A4:C1:38:9F:FF:4C"
      restore_state: True
    - mac: "A4:C1:38:A7:E7:D1"
      restore_state: True
    - mac: "A4:C1:38:46:6C:06"
      restore_state: True
    - mac: "A4:C1:38:1A:64:17"
      restore_state: True
    - mac: "5C:CA:D3:81:3A:8F"

Please see the screenshot. 2023-05-21_18-14

I don't see anything wrong in logs. What I need to send you more? I tried to enable debug change precision but I can't see something.

Sensor type

LYWSD03MMC

Relevant log output

2023-05-21 18:08:10.734 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.08, 'humidity': 56.24, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 122, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:10.735 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.08, 'humidity': 56.24, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 122, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:11.429 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.61, 'humidity': 55.68, 'voltage': 2.4, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -64, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 94, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:11.429 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.61, 'humidity': 55.68, 'voltage': 2.4, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -64, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 94, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:11.563 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:12.420 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:12.427 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:13.282 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:14.997 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:15.348 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:15.854 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:16.109 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:16.618 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:16.712 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:17.141 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:17.405 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:17.565 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:18.175 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:18.422 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:18.428 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:18.572 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.77, 'humidity': 56.1, 'voltage': 2.866, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 173, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:18.572 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.77, 'humidity': 56.1, 'voltage': 2.866, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 173, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:18.687 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:19.280 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:19.466 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.ibeacon] Discovery is disabled. UUID: 1ca92e23-f087-4df7-b9a2-fd4b716a4bf6 is not whitelisted!
2023-05-21 18:08:20.100 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.6, 'humidity': 55.71, 'voltage': 2.901, 'battery': 77, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 246, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:20.100 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.6, 'humidity': 55.71, 'voltage': 2.901, 'battery': 77, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 246, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:20.133 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:20.728 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.07, 'humidity': 56.21, 'voltage': 2.655, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 123, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:20.728 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.07, 'humidity': 56.21, 'voltage': 2.655, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 123, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:21.849 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:22.714 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:23.565 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:23.889 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.64, 'humidity': 55.69, 'voltage': 2.401, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -59, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 95, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:23.889 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.64, 'humidity': 55.69, 'voltage': 2.401, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -59, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 95, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:24.426 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:26.066 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.78, 'humidity': 56.07, 'voltage': 2.869, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -73, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 174, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:26.067 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.78, 'humidity': 56.07, 'voltage': 2.869, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -73, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 174, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:26.135 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:26.989 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:27.596 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.6, 'humidity': 55.72, 'voltage': 2.905, 'battery': 78, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 247, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:27.596 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.6, 'humidity': 55.72, 'voltage': 2.905, 'battery': 78, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 247, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:27.844 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:28.700 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:29.558 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:30.416 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:30.717 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.1, 'humidity': 56.25, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 124, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:30.718 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.1, 'humidity': 56.25, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 124, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:31.280 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:32.129 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:32.984 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:33.568 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.77, 'humidity': 56.05, 'voltage': 2.865, 'battery': 73, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -71, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 175, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:33.569 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.77, 'humidity': 56.05, 'voltage': 2.865, 'battery': 73, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -71, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 175, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:33.843 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:34.335 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] 0 BLE ADV messages processed last 60 seconds for 0 device tracker device(s)
2023-05-21 18:08:34.703 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:35.569 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:36.425 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:37.280 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:38.140 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:38.843 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.63, 'humidity': 55.69, 'voltage': 2.332, 'battery': 14, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 96, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:38.843 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.63, 'humidity': 55.69, 'voltage': 2.332, 'battery': 14, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 96, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:38.998 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:40.104 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.59, 'humidity': 55.73, 'voltage': 2.903, 'battery': 78, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 248, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:40.104 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.59, 'humidity': 55.73, 'voltage': 2.903, 'battery': 78, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -78, 'mac': 'A4C138466C06', 'type': 'ATC', 'packet': 248, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:40.707 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.1, 'humidity': 56.25, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 125, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:40.707 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.1, 'humidity': 56.25, 'voltage': 2.657, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 125, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:40.717 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:41.336 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.63, 'humidity': 55.67, 'voltage': 2.403, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 97, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:41.336 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.63, 'humidity': 55.67, 'voltage': 2.403, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 97, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:41.575 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:42.439 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:43.290 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:44.148 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:44.339 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 22 BLE advertisements processed for 5 binary sensor device(s)
2023-05-21 18:08:44.339 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing.
2023-05-21 18:08:44.340 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 22 BLE advertisements processed for 5 sensor device(s)
2023-05-21 18:08:44.345 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2023-05-21 18:08:44.345 DEBUG (Thread-2) [custom_components.ble_monitor] 3704 HCI events processed for previous period
2023-05-21 18:08:44.346 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: Run
2023-05-21 18:08:44.348 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: BLEScanRequester._initialized is False for hci0,  waiting for connection...
2023-05-21 18:08:44.367 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2023-05-21 18:08:44.368 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: BLEScanRequester._initialized is True for hci0,  connection established, send_scan_request succeeded.
2023-05-21 18:08:44.368 DEBUG (Thread-2) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2023-05-21 18:08:44.999 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:45.862 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:46.717 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:48.431 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:48.567 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.76, 'humidity': 56.06, 'voltage': 2.868, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -71, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 176, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:48.567 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.76, 'humidity': 56.06, 'voltage': 2.868, 'battery': 74, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -71, 'mac': 'A4C1389FFF4C', 'type': 'ATC', 'packet': 176, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:49.285 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:50.149 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:50.695 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.11, 'humidity': 56.23, 'voltage': 2.655, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 126, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:50.696 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.11, 'humidity': 56.23, 'voltage': 2.655, 'battery': 50, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -72, 'mac': 'A4C138A7E7D1', 'type': 'ATC', 'packet': 126, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:51.000 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
2023-05-21 18:08:51.302 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'temperature': 23.63, 'humidity': 55.7, 'voltage': 2.403, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 98, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:51.302 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'temperature': 23.63, 'humidity': 55.7, 'voltage': 2.403, 'battery': 22, 'switch': 0, 'opening': 1, 'status': 'opened', 'data': True, 'rssi': -63, 'mac': 'A4C1381A6417', 'type': 'ATC', 'packet': 98, 'firmware': 'ATC (Custom)'}
2023-05-21 18:08:54.427 DEBUG (Thread-2) [custom_components.ble_monitor.ble_parser.amazfit] Discovery is disabled. MAC: DE:CF:0C:C5:28:32 is not whitelisted!
Ernst79 commented 1 year ago

You should be able to set the precision with the menu you show on the top right in the print screen. Isn’t your entity displayed with that precision? What kind of card do you use to display you sensor on your Home Screen?

vp-lab commented 1 year ago

I tried to set the precision like 10 times and nothing happend.

It's mushroom template card.

It also appear in the developer tools - states - filter entities You can see in the previous screenshot down there where I filter the entity.

Ernst79 commented 1 year ago

The mushroom template card should respect the precision setting, however, there is an issue here where someone says it isn’t. https://github.com/piitaya/lovelace-mushroom/issues/1057

can you check that a normal entity card does respect the precision property? If so, I would say that this is a bug in the mushroom template card.

vp-lab commented 1 year ago

It's fine on the default entity card hassio and mushroom. 2023-05-22_08-59 (1) - it's the default lovelace entities card (fine) (2) - mushroom entity card (fine) (3) - mushroom template card (wrong)

But I have 2 more questions:

  1. Why on the Developer Tools - States - Search that sensor, it appears with 2 digits or more? 2023-05-22_09-01

  2. I have NodeRed connected to my HA and all the automations are done in NodeRed. But when I receive a notification about that temperature sensor it's like screenshot below. NodeRed reads all the data from HomeAssistant but that temperature sensor isn't right with all that decimals. 2023-05-22_09-02

I think there's a problem with the addon too.

Tell me if I can send you more logs to solve this bug.

Ernst79 commented 1 year ago

In BLE Monitor 12.0.0, we changed the way we handle rounding. According to this post on the developer part of the Home Assistant site we have to remove rounding from BLE monitor and let HA take care of it.

The Developer Tools - States is showing the full precision, without any rounding. As we do some averaging in BLE monitor (we take the mean of all values in one minute), there is a large change that you get a lot of digits. The frontend should take care of the rounding to display it to you, but the actual value is as it is, without any rounding. That is why node red is also showing a lot of digits.

If you really don't want these large number of digits, you can use median in stead of mean in BLE monitor. Or you could use a template sensor.

Olegz73 commented 1 year ago

Have same trouble with default plant card. IMG_20230703_002132 Rounding in entity settings do nothing

Ernst79 commented 1 year ago

You will have to report this at the developer of the card and ask him/her to use the display precision of HA

myhomeiot commented 1 year ago

Have same problem, tons of digits. I miss the decimals settings of Passive BLE monitor. Precision settings of HA only for view but the DB should keep all this pointless digits :( Maybe you will consider to return decimals settings, disabled by default to respect for HA recommendations? BTW It's still exists in documentation

image

myhomeiot commented 1 year ago

@Ernst79 Forget to mention your here