https://github.com/alexxit/hassdiagnostics
Diagnostics entities for Home Assistant
https://github.com/alexxit/hassdiagnostics
hacs home-assistant
Last synced: about 1 year ago
JSON representation
Diagnostics entities for Home Assistant
- Host: GitHub
- URL: https://github.com/alexxit/hassdiagnostics
- Owner: AlexxIT
- License: mit
- Created: 2024-04-10T12:59:47.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T11:57:15.000Z (about 2 years ago)
- Last Synced: 2024-10-04T19:44:16.954Z (over 1 year ago)
- Topics: hacs, home-assistant
- Language: Python
- Homepage:
- Size: 144 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Hass Diagnostics
Diagnostics entities for [Home Assistant](https://www.home-assistant.io/).
## Installation
[HACS](https://hacs.xyz/) custom repository: `AlexxIT/HassDiagnostics`.
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=AlexxIT&repository=HassDiagnostics&category=Integration)
Or manually copy `hass_diagnostics` folder from [latest release](https://github.com/AlexxIT/HassDiagnostics/releases/latest) to `/config/custom_components` folder.
## Configuration
Add integration via Home Assistant UI.
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=hass_diagnostics)
## Smart Log
Creates a sensor whose data can be displayed with a [Markdown card](https://www.home-assistant.io/dashboards/markdown/).
- combining issues by integration, category, and device IP address
- displaying short text of problem
- displaying where possible:
- integration name
- python library name
- issue category
- IP address of the device
- link to github sources

**Markdown card - version 1**
```markdown
[diagnostics](/config/integrations/integration/hass_diagnostics) | [log](/config/logs) | total: {{ states('sensor.smart_log') }} items
{% for i in state_attr('sensor.smart_log', 'records') or '' -%}
---
{{i.get('domain') or i.get('package') or i.name}} ({{i.count}}) {{i.get('category','')}} {{i.get('host','')}}
{{i.short}}
{{i.name}}
{{i.message|replace('\n',' ')|regex_replace('(http[^\s]+)', '\\1')}}
{{i.source|join(', ')}}{{', github'%i.github if 'github' in i}}
{{''+i.exception+'
' if 'exception' in i}}
{% endfor %}
```
**Markdown card - version 2**
```markdown
[diagnostics](/config/integrations/integration/hass_diagnostics) | [log](/config/logs) | total: {{ states('sensor.smart_log') }} items
{% for i in state_attr('sensor.smart_log', 'records') -%}
- **{{i.get('domain') or i.get('package') or i.name}}** ({{i.count}}) {{i.get('category','')}} {{i.get('host','')}}
*{{i.short}}*
{% endfor %}
```
## Start Time
Creates a sensor, with Home Assistant start time from the logs.
```
2020-02-24 17:13:11 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 25.5s
```