mirror of
https://github.com/home-assistant/core.git
synced 2026-09-27 01:46:11 -04:00
Add support for new NextDNS settings (#182102)
This commit is contained in:
@@ -207,6 +207,9 @@
|
||||
"block_tumblr": {
|
||||
"default": "mdi:image-outline"
|
||||
},
|
||||
"block_tunneling_endpoints": {
|
||||
"default": "mdi:vpn"
|
||||
},
|
||||
"block_twitch": {
|
||||
"default": "mdi:twitch"
|
||||
},
|
||||
|
||||
@@ -210,12 +210,18 @@
|
||||
"block_dailymotion": {
|
||||
"name": "Block Dailymotion"
|
||||
},
|
||||
"block_data_drop_services": {
|
||||
"name": "Block data-drop services"
|
||||
},
|
||||
"block_dating": {
|
||||
"name": "Block dating"
|
||||
},
|
||||
"block_ddns": {
|
||||
"name": "Block dynamic DNS hostnames"
|
||||
},
|
||||
"block_decentralized_web_gateways": {
|
||||
"name": "Block decentralized web gateways"
|
||||
},
|
||||
"block_discord": {
|
||||
"name": "Block Discord"
|
||||
},
|
||||
@@ -234,6 +240,9 @@
|
||||
"block_fortnite": {
|
||||
"name": "Block Fortnite"
|
||||
},
|
||||
"block_free_hosting_domains": {
|
||||
"name": "Block free hosting domains"
|
||||
},
|
||||
"block_gambling": {
|
||||
"name": "Block gambling"
|
||||
},
|
||||
@@ -297,6 +306,9 @@
|
||||
"block_reddit": {
|
||||
"name": "Block Reddit"
|
||||
},
|
||||
"block_residential_hosting": {
|
||||
"name": "Block residential hosting"
|
||||
},
|
||||
"block_roblox": {
|
||||
"name": "Block Roblox"
|
||||
},
|
||||
@@ -330,6 +342,9 @@
|
||||
"block_tumblr": {
|
||||
"name": "Block Tumblr"
|
||||
},
|
||||
"block_tunneling_endpoints": {
|
||||
"name": "Block tunneling endpoints"
|
||||
},
|
||||
"block_twitch": {
|
||||
"name": "Block Twitch"
|
||||
},
|
||||
|
||||
@@ -114,6 +114,36 @@ SWITCHES = (
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_parked_domains,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="block_data_drop_services",
|
||||
translation_key="block_data_drop_services",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_data_drop_services,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="block_decentralized_web_gateways",
|
||||
translation_key="block_decentralized_web_gateways",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_decentralized_web_gateways,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="block_free_hosting_domains",
|
||||
translation_key="block_free_hosting_domains",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_free_hosting_domains,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="block_residential_hosting",
|
||||
translation_key="block_residential_hosting",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_residential_hosting,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="block_tunneling_endpoints",
|
||||
translation_key="block_tunneling_endpoints",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
state=lambda data: data.block_tunneling_endpoints,
|
||||
),
|
||||
NextDnsSwitchEntityDescription(
|
||||
key="cryptojacking_protection",
|
||||
translation_key="cryptojacking_protection",
|
||||
|
||||
@@ -5,11 +5,16 @@
|
||||
"bav": true,
|
||||
"block_bypass_methods": true,
|
||||
"block_csam": true,
|
||||
"block_data_drop_services": true,
|
||||
"block_decentralized_web_gateways": true,
|
||||
"block_ddns": true,
|
||||
"block_free_hosting_domains": true,
|
||||
"block_disguised_trackers": true,
|
||||
"block_nrd": true,
|
||||
"block_page": false,
|
||||
"block_parked_domains": true,
|
||||
"block_residential_hosting": true,
|
||||
"block_tunneling_endpoints": true,
|
||||
"cache_boost": true,
|
||||
"cname_flattening": true,
|
||||
"cryptojacking_protection": true,
|
||||
@@ -74,10 +79,5 @@
|
||||
"block_piracy": true,
|
||||
"block_porn": true,
|
||||
"block_social_networks": true,
|
||||
"block_video_streaming": true,
|
||||
"block_data_drop_services": true,
|
||||
"block_decentralized_web_gateways": true,
|
||||
"block_free_hosting_domains": true,
|
||||
"block_residential_hosting": true,
|
||||
"block_tunneling_endpoints": true
|
||||
"block_video_streaming": true
|
||||
}
|
||||
|
||||
@@ -549,6 +549,56 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_data_drop_services-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'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_block_data_drop_services',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Block data-drop services',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Block data-drop services',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'block_data_drop_services',
|
||||
'unique_id': 'xyz12_block_data_drop_services',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_data_drop_services-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Fake Profile Block data-drop services',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_block_data_drop_services',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_dating-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
@@ -599,6 +649,56 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_decentralized_web_gateways-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'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_block_decentralized_web_gateways',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Block decentralized web gateways',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Block decentralized web gateways',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'block_decentralized_web_gateways',
|
||||
'unique_id': 'xyz12_block_decentralized_web_gateways',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_decentralized_web_gateways-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Fake Profile Block decentralized web gateways',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_block_decentralized_web_gateways',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_discord-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
@@ -949,6 +1049,56 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_free_hosting_domains-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'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_block_free_hosting_domains',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Block free hosting domains',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Block free hosting domains',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'block_free_hosting_domains',
|
||||
'unique_id': 'xyz12_block_free_hosting_domains',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_free_hosting_domains-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Fake Profile Block free hosting domains',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_block_free_hosting_domains',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_gambling-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
@@ -1999,6 +2149,56 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_residential_hosting-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'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_block_residential_hosting',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Block residential hosting',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Block residential hosting',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'block_residential_hosting',
|
||||
'unique_id': 'xyz12_block_residential_hosting',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_residential_hosting-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Fake Profile Block residential hosting',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_block_residential_hosting',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_roblox-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
@@ -2549,6 +2749,56 @@
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_tunneling_endpoints-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'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_block_tunneling_endpoints',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Block tunneling endpoints',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Block tunneling endpoints',
|
||||
'platform': 'nextdns',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'block_tunneling_endpoints',
|
||||
'unique_id': 'xyz12_block_tunneling_endpoints',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_tunneling_endpoints-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Fake Profile Block tunneling endpoints',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.fake_profile_block_tunneling_endpoints',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch[switch.fake_profile_block_twitch-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
Reference in New Issue
Block a user