Get Ohme to gold quality (#140617)

* Add reconfigure step, diagnostics and default disabled entities to Ohme

* Formatting

* Update tests

* Bugfixes and add tests for diagnostics and reconfigure

* Remove diagnostics changes

* Remove reconfigure changes

* Pull upstream strings.json
This commit is contained in:
Dan Raper 2025-03-28 18:41:00 +00:00 committed by GitHub
parent 7ae397a211
commit 82b463b22f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 10 deletions

View File

@ -48,17 +48,20 @@ rules:
status: exempt
comment: |
All supported devices are cloud connected over mobile data. Discovery is not possible.
docs-data-update: todo
docs-examples: todo
docs-known-limitations: todo
docs-data-update: done
docs-examples: done
docs-known-limitations: done
docs-supported-devices: done
docs-supported-functions: todo
docs-troubleshooting: todo
docs-use-cases: todo
dynamic-devices: todo
entity-category: todo
docs-supported-functions: done
docs-troubleshooting: done
docs-use-cases: done
dynamic-devices:
status: exempt
comment: |
Not supported by the API. Accounts and devices have a one-to-one relationship.
entity-category: done
entity-device-class: done
entity-disabled-by-default: todo
entity-disabled-by-default: done
entity-translations: done
exception-translations: done
icon-translations: done
@ -67,7 +70,10 @@ rules:
status: exempt
comment: |
This integration currently has no repairs.
stale-devices: todo
stale-devices:
status: exempt
comment: |
Not supported by the API. Accounts and devices have a one-to-one relationship.
# Platinum
async-dependency: todo
inject-websession: todo

View File

@ -99,6 +99,7 @@ SENSOR_ADVANCED_SETTINGS = [
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
value_fn=lambda client: client.power.ct_amps,
is_supported_fn=lambda client: client.ct_connected,
entity_registry_enabled_default=False,
),
]

View File

@ -5,6 +5,7 @@ from unittest.mock import MagicMock, patch
from freezegun.api import FrozenDateTimeFactory
from ohme import ApiException
import pytest
from syrupy import SnapshotAssertion
from homeassistant.const import STATE_UNAVAILABLE, Platform
@ -16,6 +17,7 @@ from . import setup_integration
from tests.common import MockConfigEntry, async_fire_time_changed, snapshot_platform
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
async def test_sensors(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,