mirror of
https://github.com/home-assistant/core.git
synced 2025-09-05 12:51:37 +02:00
Add "bypass age verification" switch to NextDNS integration (#150716)
This commit is contained in:
@@ -328,6 +328,9 @@
|
||||
"block_zoom": {
|
||||
"name": "Block Zoom"
|
||||
},
|
||||
"bypass_age_verification": {
|
||||
"name": "Bypass age verification"
|
||||
},
|
||||
"cache_boost": {
|
||||
"name": "Cache boost"
|
||||
},
|
||||
|
@@ -56,6 +56,12 @@ SWITCHES = (
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.anonymized_ecs,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="bav",
|
||||
translation_key="bypass_age_verification",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.bav,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="logs",
|
||||
translation_key="logs",
|
||||
|
@@ -2879,6 +2879,54 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_bypass_age_verification-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.fake_profile_bypass_age_verification',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Bypass age verification',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'bypass_age_verification',
|
||||
'unique_id': 'xyz12_bav',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_bypass_age_verification-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Fake Profile Bypass age verification',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_bypass_age_verification',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_cache_boost-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
Reference in New Issue
Block a user