Enable sentry reporting for zwave_js (#71719)

* Enable sentry reporting for zwave_js

* Fix test
This commit is contained in:
Raman Gupta 2022-05-12 03:05:35 -04:00 committed by GitHub
parent 684fe242d9
commit ca52aa47aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -95,6 +95,7 @@ def get_value_of_zwave_value(value: ZwaveValue | None) -> Any | None:
async def async_enable_statistics(client: ZwaveClient) -> None:
"""Enable statistics on the driver."""
await client.driver.async_enable_statistics("Home Assistant", HA_VERSION)
await client.driver.async_enable_error_reporting()
@callback

View file

@ -3172,10 +3172,12 @@ async def test_data_collection(hass, client, integration, hass_ws_client):
result = msg["result"]
assert result is None
assert len(client.async_send_command.call_args_list) == 1
args = client.async_send_command.call_args[0][0]
assert len(client.async_send_command.call_args_list) == 2
args = client.async_send_command.call_args_list[0][0][0]
assert args["command"] == "driver.enable_statistics"
assert args["applicationName"] == "Home Assistant"
args = client.async_send_command.call_args_list[1][0][0]
assert args["command"] == "driver.enable_error_reporting"
assert entry.data[CONF_DATA_COLLECTION_OPTED_IN]
client.async_send_command.reset_mock()