diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2edb17366..a6c2e06a9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -65,40 +65,30 @@ body: - type: input id: overkiz_device_model validations: - required: true + required: false attributes: label: Device model placeholder: e.g. PositionableScreen description: > Can be found in the Configuration panel -> Integrations -> Somfy TaHoma -> (x) devices -> Model. - - type: input - id: overkiz_device_type - validations: - required: true - attributes: - label: Device type - placeholder: e.g. io:DimmableLightIOComponent - description: > - Can be found in the Configuration panel -> Integrations -> Somfy TaHoma -> (x) devices. Click on the device and copy the firmware. - - type: markdown attributes: value: | ## Details - type: textarea - id: additional-information + id: logs attributes: - label: Additional information - description: If you have any additional information for us, use the field below. Please note, you can attach screenshots or screen recordings here, by dragging and dropping files in the field below. + label: Home Assistant log + description: Enable [debug logging](https://github.com/iMicknl/ha-tahoma#enable-debug-logging) and paste your full log here. We redact your id's and emailaddresses by default. + render: shell - type: textarea - id: logs + id: additional-information attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell + label: Additional information + description: If you have any additional information for us, use the field below. Please note, you can attach screenshots or screen recordings here, by dragging and dropping files in the field below. - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/unsupported_device.yml b/.github/ISSUE_TEMPLATE/unsupported_device.yml index 16b1875dd..cf9951cd0 100644 --- a/.github/ISSUE_TEMPLATE/unsupported_device.yml +++ b/.github/ISSUE_TEMPLATE/unsupported_device.yml @@ -28,8 +28,8 @@ body: - type: textarea id: unsupported_device_log attributes: - label: Unsupported device log - description: Enable [debug logging](https://github.com/iMicknl/ha-tahoma#enable-debug-logging) and paste the Unsupported device string here. If your device already shows up in Home Assistant, share the firwmare (e.g. `io:DimmableLightIOComponent`), which can be gathered from device detail page. + label: Home Assistant log + description: Enable [debug logging](https://github.com/iMicknl/ha-tahoma#enable-debug-logging) and paste your full log here. We redact your id's and emailaddresses by default. render: shell validations: required: true @@ -52,13 +52,6 @@ body: label: Additional information description: If you have any additional information for us, use the field below. Please note, you can attach screenshots or screen recordings here, by dragging and dropping files in the field below. - - type: textarea - id: logs - attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - type: markdown attributes: value: | diff --git a/README.md b/README.md index 82b24c631..4bd7bf607 100644 --- a/README.md +++ b/README.md @@ -72,20 +72,15 @@ logger: ### Device not supported -If your device is not visible in the device list of Home Assistant (/config/devices/dashboard), you need to turn on [debug logging](#enable-debug-logging). Copy the debug string from your log and create a [new issue](https://github.com/iMicknl/ha-tahoma/issues/new/choose) +If your device is not visible in the device list of Home Assistant (/config/devices/dashboard), you need to turn on [debug logging](#enable-debug-logging) first. Copy your Home Assistant log (Configuration > Logs) and create a [new issue](https://github.com/iMicknl/ha-tahoma/issues/new/choose). -`DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device (io:DimmableLightIOComponent - Light - DimmableLight).` ### Device not working correctly -If your device is listed in the device list, create a [new issue](https://github.com/iMicknl/ha-tahoma/issues/new/choose) and fill in all details of the issue template. +If your device is listed in the device list, you need to turn on [debug logging](#enable-debug-logging) first. Copy your Home Assistant log (Configuration > Logs) and create a [new issue](https://github.com/iMicknl/ha-tahoma/issues/new/choose). -In order to gather more information, you can use the `tahoma.get_execution_history` service which will print your execution history to the Home Assistant log. Run the commands via the official vendor app (e.g. TaHoma) and capture the commands. +In order to gather more information, you can use the `tahoma.get_execution_history` service which will print your execution history to the Home Assistant log. Run the commands via the official vendor app (e.g. TaHoma) and include your log in the issue. -``` -2021-01-28 09:20:22 INFO (MainThread) [custom_components.tahoma] 2021-01-27 21:30:00: off executed via Home Assistant on io://xxxx, with []. -2021-01-28 09:20:22 INFO (MainThread) [custom_components.tahoma] 2021-01-27 16:23:29: setIntensity executed via Home Assistant on io://xxxx, with [70]. -``` ### Retrieve HomeKit code diff --git a/custom_components/tahoma/__init__.py b/custom_components/tahoma/__init__.py index a9769fbb5..6ef223869 100644 --- a/custom_components/tahoma/__init__.py +++ b/custom_components/tahoma/__init__.py @@ -214,12 +214,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: device_registry = await dr.async_get_registry(hass) for gateway in gateways: - _LOGGER.debug( - "Added gateway (%s - %s - %s)", - gateway.id, - gateway.type, - gateway.sub_type, - ) + _LOGGER.debug("Added gateway (%s)", gateway) gateway_model = ( beautify_name(gateway.sub_type.name) diff --git a/custom_components/tahoma/config_flow.py b/custom_components/tahoma/config_flow.py index e023df492..375b09627 100644 --- a/custom_components/tahoma/config_flow.py +++ b/custom_components/tahoma/config_flow.py @@ -18,6 +18,7 @@ MaintenanceException, TooManyRequestsException, ) +from pyhoma.models import obfuscate_id import voluptuous as vol from .const import ( @@ -162,10 +163,10 @@ async def async_step_dhcp(self, discovery_info): hostname = discovery_info[HOSTNAME] gateway_id = hostname[8:22] - _LOGGER.debug("DHCP discovery detected gateway %s", gateway_id) + _LOGGER.debug("DHCP discovery detected gateway %s", obfuscate_id(gateway_id)) if self._gateway_already_configured(gateway_id): - _LOGGER.debug("Gateway %s is already configured", gateway_id) + _LOGGER.debug("Gateway %s is already configured", obfuscate_id(gateway_id)) return self.async_abort(reason="already_configured") return await self.async_step_user() diff --git a/requirements.txt b/requirements.txt index 1fb29f61b..6f3e424e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pyhoma==0.5.18 +pyhoma==0.5.20 \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt index 646598427..adfb8e1ea 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,2 +1,2 @@ -r requirements.txt -homeassistant==2021.8.0b0 \ No newline at end of file +homeassistant==2021.9.0b2 diff --git a/requirements_test.txt b/requirements_test.txt index 73b503c80..d09ba4fef 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,5 @@ -r requirements_dev.txt -pytest-homeassistant-custom-component==0.4.3 +pytest-homeassistant-custom-component==0.4.4 # required for DHCP discovery test scapy==2.4.5 aiodiscover==1.4.2