Skip to content

Commit

Permalink
Merge pull request #51 from custom-components/report_unknown-info
Browse files Browse the repository at this point in the history
report_unknown option output moved to info log level
  • Loading branch information
Magalex2x14 authored Mar 8, 2020
2 parents ed9c479 + a7462e3 commit f5977a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions custom_components/mitemp_bt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def parse_raw_message(data, aeskeyslist, report_unknown=False):
]
except KeyError:
if report_unknown:
_LOGGER.debug(
_LOGGER.info(
"BLE ADV from UNKNOWN: RSSI: %s, MAC: %s, ADV: %s",
rssi,
''.join('{:02X}'.format(x) for x in xiaomi_mac_reversed[::-1]),
Expand Down Expand Up @@ -391,7 +391,7 @@ def lpacket(mac, packet=None):
scanner.start(config)
sensors_by_mac = {}
if config[CONF_REPORT_UNKNOWN]:
_LOGGER.debug(
_LOGGER.info(
"Attention! Option report_unknown is enabled, be ready for a huge output..."
)
# prepare device:key list to speedup parser
Expand Down
6 changes: 3 additions & 3 deletions faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@ Most often, the cause of this is the presence of bugs in the system components r
### My sensor from the Xiaomi ecosystem is not in the list of supported ones. How to request implementation?

- [Install the component](https://github.com/custom-components/sensor.mitemp_bt/blob/master/README.md#how-to-install) if you have not already done so.
- Make sure you have [logger](https://www.home-assistant.io/integrations/logger/) enabled, and logging enabled for `debug` level (globally or just for `custom_components.mitemp_bt`). For example:
- Make sure you have [logger](https://www.home-assistant.io/integrations/logger/) enabled, and logging enabled for `info` level (globally or just for `custom_components.mitemp_bt`). For example:

```yaml
logger:
default: warn
logs:
custom_components.mitemp_bt: debug
custom_components.mitemp_bt: info
```

- Place your sensor extremely close to the HA host (BT interface).
- [Enable the option](https://github.com/custom-components/sensor.mitemp_bt/blob/master/README.md#configuration) `report_unknown`.
- Wait until a number of "BLE ADV from UNKNOWN" messages accumulate in the log.
- Create a new [issue](https://github.com/custom-components/sensor.mitemp_bt/issues), write everything you know about your sensor and attach the obtained log.
- Do not forget to disable the `report_unknown` option (delete it or set it to `False` and restart HA).
- Do not forget to disable the `report_unknown` option (delete it or set it to `False` and restart HA)! Since the potentially large output of this option will spam the log and can mask really important messages.
- Wait for a response from the developers.

## DEBUG
Expand Down

0 comments on commit f5977a9

Please sign in to comment.