Skip to content

Commit

Permalink
Merge pull request #63 from iMicknl/fix_32
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl authored Jun 17, 2020
2 parents a084cec + 13ccf78 commit 80ceeea
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,16 @@ If your device is not supported, it will show the following message in the loggi
| Siren |
| MusicPlayer |
| VentilationSystem |

## Advanced

### Enable debug logging

The [logger](https://www.home-assistant.io/integrations/logger/) integration lets you define the level of logging activities in Home Assistant. Turning on debug mode will show more information about unsupported devices in your logbook.

```yaml
logger:
default: critical
logs:
custom_components.tahoma: debug
```
10 changes: 6 additions & 4 deletions custom_components/tahoma/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""The TaHoma integration."""
import asyncio
import json
import logging

from requests.exceptions import RequestException
Expand Down Expand Up @@ -77,11 +78,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
hass.data[DOMAIN][entry.entry_id]["devices"].append(_device)

else:
_LOGGER.warning(
"Unsupported TaHoma device (%s - %s - %s)",
_LOGGER.debug(
"Unsupported Tahoma device (%s). Create an issue on Github with the following information. \n\n %s \n %s \n %s",
_device.type,
_device.uiclass,
_device.widget,
_device.type + " - " + _device.uiclass + " - " + _device.widget,
json.dumps(_device.command_def) + ",",
json.dumps(_device.states_def),
)

for component in PLATFORMS:
Expand Down
10 changes: 10 additions & 0 deletions custom_components/tahoma/tahoma_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,16 @@ def widget(self):
"""Get device widget type."""
return self.__widget

@property
def command_def(self):
"""Get device widget type."""
return self.__command_def

@property
def states_def(self):
"""Get device widget type."""
return self.__states_def

# def execute_action(self, action):
# """Exceute action."""
# self.__protocol
Expand Down

0 comments on commit 80ceeea

Please sign in to comment.