Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add diagnostics to LaMetric #79757

Merged
merged 2 commits into from Oct 7, 2022
Merged

Add diagnostics to LaMetric #79757

merged 2 commits into from Oct 7, 2022

Conversation

frenck
Copy link
Member

@frenck frenck commented Oct 6, 2022

Proposed change

This PR adds support for downloading diagnostics to the LaMetric integration.

Here is the result on how it looks for one of my LaMetric devices:

{
  "home_assistant": {
    "installation_type": "Home Assistant Core",
    "version": "2022.11.0.dev0",
    "dev": true,
    "hassio": false,
    "virtualenv": true,
    "python_version": "3.9.9",
    "docker": false,
    "arch": "x86_64",
    "timezone": "UTC",
    "os_name": "Linux",
    "os_version": "5.10.0-11-amd64",
    "run_as_root": false
  },
  "custom_components": {},
  "integration_manifest": {
    "domain": "lametric",
    "name": "LaMetric",
    "documentation": "https://www.home-assistant.io/integrations/lametric",
    "requirements": [
      "demetriek==0.2.4"
    ],
    "codeowners": [
      "@robbiet480",
      "@frenck"
    ],
    "iot_class": "local_polling",
    "dependencies": [
      "application_credentials"
    ],
    "loggers": [
      "demetriek"
    ],
    "config_flow": true,
    "ssdp": [
      {
        "deviceType": "urn:schemas-upnp-org:device:LaMetric:1"
      }
    ],
    "dhcp": [
      {
        "registered_devices": true
      }
    ],
    "is_built_in": true
  },
  "data": {
    "device_id": "**REDACTED**",
    "name": "**REDACTED**",
    "serial_number": "**REDACTED**",
    "os_version": "2.2.4",
    "mode": "kiosk",
    "model": "LM 37X8",
    "audio": {
      "volume": 84,
      "volume_range": {
        "range_min": 0,
        "range_max": 100
      },
      "volume_limit": {
        "range_min": 0,
        "range_max": 100
      }
    },
    "bluetooth": {
      "available": true,
      "name": "**REDACTED**",
      "active": false,
      "discoverable": true,
      "pairable": true,
      "address": "24:18:C6:19:68:0A"
    },
    "display": {
      "brightness": 62,
      "brightness_mode": "manual",
      "width": 37,
      "height": 8,
      "display_type": "mixed"
    },
    "wifi": {
      "active": true,
      "mac": "24:18:C6:19:00:0E",
      "available": true,
      "encryption": "WPA",
      "ssid": "**REDACTED**",
      "ip": "10.10.11.105",
      "mode": "dhcp",
      "netmask": "255.255.254.0",
      "rssi": 26
    }
  }
}

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

Hey there @robbiet480, mind taking a look at this pull request as it has been labeled with an integration (lametric) you are listed as a code owner for? Thanks!

Copy link
Contributor

@bachya bachya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my device:

{
  "home_assistant": {
    "installation_type": "Home Assistant Core",
    "version": "2022.11.0.dev0",
    "dev": true,
    "hassio": false,
    "virtualenv": true,
    "python_version": "3.10.5",
    "docker": false,
    "arch": "x86_64",
    "timezone": "America/Denver",
    "os_name": "Darwin",
    "os_version": "12.6",
    "run_as_root": false
  },
  "custom_components": {
    "hacs": {
      "version": "1.23.0",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "lametric",
    "name": "LaMetric",
    "documentation": "https://www.home-assistant.io/integrations/lametric",
    "requirements": [
      "demetriek==0.2.4"
    ],
    "codeowners": [
      "@robbiet480",
      "@frenck"
    ],
    "iot_class": "local_polling",
    "dependencies": [
      "application_credentials"
    ],
    "loggers": [
      "demetriek"
    ],
    "config_flow": true,
    "ssdp": [
      {
        "deviceType": "urn:schemas-upnp-org:device:LaMetric:1"
      }
    ],
    "dhcp": [
      {
        "registered_devices": true
      }
    ],
    "is_built_in": true
  },
  "data": {
    "device_id": "**REDACTED**",
    "name": "**REDACTED**",
    "serial_number": "**REDACTED**",
    "os_version": "2.3.0",
    "mode": "manual",
    "model": "LM 37X8",
    "audio": {
      "volume": 0,
      "volume_range": {
        "range_min": 0,
        "range_max": 100
      },
      "volume_limit": {
        "range_min": 0,
        "range_max": 69
      }
    },
    "bluetooth": {
      "available": true,
      "name": "**REDACTED**",
      "active": false,
      "discoverable": true,
      "pairable": true,
      "address": "24:18:C6:19:6C:55"
    },
    "display": {
      "brightness": 75,
      "brightness_mode": "auto",
      "width": 37,
      "height": 8,
      "display_type": "mixed"
    },
    "wifi": {
      "active": true,
      "mac": "24:18:C6:19:04:59",
      "available": true,
      "encryption": "WPA",
      "ssid": "**REDACTED**",
      "ip": "172.16.20.247",
      "mode": "dhcp",
      "netmask": "255.255.255.0",
      "rssi": 44
    }
  }
}

@MartinHjelmare MartinHjelmare merged commit 633ffad into dev Oct 7, 2022
@MartinHjelmare MartinHjelmare deleted the frenck-2022-1884 branch October 7, 2022 06:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants