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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address yale review comments part 2 #124887

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions tests/components/yale/snapshots/test_lock.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# serializer version: 1
# name: test_lock_device_registry
DeviceRegistryEntrySnapshot({
'area_id': 'online_with_doorsense_name',
'config_entries': <ANY>,
'configuration_url': 'https://account.aaecosystem.com',
'connections': set({
tuple(
'bluetooth',
'12:22',
),
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'yale',
'online_with_doorsense',
),
}),
'is_new': False,
'labels': set({
}),
'manufacturer': 'Yale Home Inc.',
'model': 'AUG-MD01',
'model_id': None,
'name': 'online_with_doorsense Name',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': 'online_with_doorsense Name',
'sw_version': 'undefined-4.3.0-1.8.14',
'via_device_id': None,
})
# ---
95 changes: 95 additions & 0 deletions tests/components/yale/snapshots/test_sensor.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# serializer version: 1
# name: test_lock_operator_autorelock
ReadOnlyDict({
'autorelock': True,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': False,
'method': 'autorelock',
'remote': False,
'tag': False,
})
# ---
# name: test_lock_operator_keypad
ReadOnlyDict({
'autorelock': False,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': True,
'manual': False,
'method': 'keypad',
'remote': False,
'tag': False,
})
# ---
# name: test_lock_operator_manual
ReadOnlyDict({
'autorelock': False,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': True,
'method': 'manual',
'remote': False,
'tag': False,
})
# ---
# name: test_lock_operator_remote
ReadOnlyDict({
'autorelock': False,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': False,
'method': 'remote',
'remote': True,
'tag': False,
})
# ---
# name: test_restored_state
StateSnapshot({
'attributes': ReadOnlyDict({
'autorelock': False,
'entity_picture': 'image.png',
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': False,
'method': 'tag',
'remote': False,
'tag': True,
}),
'context': <ANY>,
'entity_id': 'sensor.online_with_doorsense_name_operator',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'Tag Unlock',
})
# ---
# name: test_unlock_operator_manual
StateSnapshot({
'attributes': ReadOnlyDict({
'autorelock': False,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': True,
'method': 'manual',
'remote': False,
'tag': False,
}),
'context': <ANY>,
'entity_id': 'sensor.online_with_doorsense_name_operator',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'Your favorite elven princess',
})
# ---
# name: test_unlock_operator_tag
ReadOnlyDict({
'autorelock': False,
'friendly_name': 'online_with_doorsense Name Operator',
'keypad': False,
'manual': False,
'method': 'tag',
'remote': False,
'tag': True,
})
# ---
1 change: 0 additions & 1 deletion tests/components/yale/test_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ async def test_wake_lock(hass: HomeAssistant) -> None:
await hass.services.async_call(
BUTTON_DOMAIN, SERVICE_PRESS, {ATTR_ENTITY_ID: entity_id}, blocking=True
)
await hass.async_block_till_done()
api_instance.async_status_async.assert_called_once()
Loading