Skip to content

Commit

Permalink
Remove ui language select
Browse files Browse the repository at this point in the history
  • Loading branch information
tr4nt0r committed Dec 15, 2024
1 parent 80ba6ec commit 71017da
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 145 deletions.
3 changes: 0 additions & 3 deletions homeassistant/components/iron_os/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@
"desc_scroll_speed": {
"default": "mdi:message-text-fast"
},
"ui_language": {
"default": "mdi:translate-variant"
},
"logo_duration": {
"default": "mdi:clock-digital"
}
Expand Down
12 changes: 0 additions & 12 deletions homeassistant/components/iron_os/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
BatteryType,
CharSetting,
CommunicationError,
LanguageCode,
LockingMode,
LogoDuration,
ScreenOrientationMode,
Expand Down Expand Up @@ -55,7 +54,6 @@ class PinecilSelect(StrEnum):
TEMP_UNIT = "temp_unit"
DESC_SCROLL_SPEED = "desc_scroll_speed"
LOCKING_MODE = "locking_mode"
UI_LANGUAGE = "ui_language"
LOGO_DURATION = "logo_duration"


Expand Down Expand Up @@ -132,16 +130,6 @@ def enum_to_str(enum: Enum | None) -> str | None:
options=[x.name.lower() for x in LockingMode],
entity_category=EntityCategory.CONFIG,
),
IronOSSelectEntityDescription(
key=PinecilSelect.UI_LANGUAGE,
translation_key=PinecilSelect.UI_LANGUAGE,
characteristic=CharSetting.UI_LANGUAGE,
value_fn=lambda x: enum_to_str(x.get("ui_language")),
raw_value_fn=lambda value: LanguageCode[value.upper()],
options=[x.name.lower() for x in LanguageCode],
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
),
IronOSSelectEntityDescription(
key=PinecilSelect.LOGO_DURATION,
translation_key=PinecilSelect.LOGO_DURATION,
Expand Down
3 changes: 0 additions & 3 deletions homeassistant/components/iron_os/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@
"seconds_5": "5 second",
"loop": "Loop"
}
},
"ui_language": {
"name": "Interface language"
}
},
"sensor": {
Expand Down
2 changes: 0 additions & 2 deletions tests/components/iron_os/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
AutostartMode,
BatteryType,
DeviceInfoResponse,
LanguageCode,
LatestRelease,
LiveDataResponse,
LockingMode,
Expand Down Expand Up @@ -182,7 +181,6 @@ def mock_pynecil() -> Generator[AsyncMock]:
autostart_mode=AutostartMode.IDLE,
temp_unit=TempUnit.CELSIUS,
desc_scroll_speed=ScrollSpeed.FAST,
ui_language=LanguageCode.DE,
logo_duration=LogoDuration.LOOP,
locking_mode=LockingMode.FULL_LOCKING,
)
Expand Down
119 changes: 0 additions & 119 deletions tests/components/iron_os/snapshots/test_select.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -237,125 +237,6 @@
'state': 'right_handed',
})
# ---
# name: test_state[select.pinecil_interface_language-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'be',
'bg',
'cs',
'da',
'de',
'el',
'en',
'es',
'et',
'fi',
'fr',
'hr',
'hu',
'it',
'ja_jp',
'lt',
'nb',
'nl',
'nl_be',
'pl',
'pt',
'ro',
'ru',
'sk',
'sl',
'sr_cyrl',
'sr_latn',
'sv',
'tr',
'uk',
'vi',
'yue_hk',
'zh_cn',
'zh_tw',
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.pinecil_interface_language',
'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': 'Interface language',
'platform': 'iron_os',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': <PinecilSelect.UI_LANGUAGE: 'ui_language'>,
'unique_id': 'c0:ff:ee:c0:ff:ee_ui_language',
'unit_of_measurement': None,
})
# ---
# name: test_state[select.pinecil_interface_language-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Pinecil Interface language',
'options': list([
'be',
'bg',
'cs',
'da',
'de',
'el',
'en',
'es',
'et',
'fi',
'fr',
'hr',
'hu',
'it',
'ja_jp',
'lt',
'nb',
'nl',
'nl_be',
'pl',
'pt',
'ro',
'ru',
'sk',
'sl',
'sr_cyrl',
'sr_latn',
'sv',
'tr',
'uk',
'vi',
'yue_hk',
'zh_cn',
'zh_tw',
]),
}),
'context': <ANY>,
'entity_id': 'select.pinecil_interface_language',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'de',
})
# ---
# name: test_state[select.pinecil_power_source-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
Expand Down
6 changes: 0 additions & 6 deletions tests/components/iron_os/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
BatteryType,
CharSetting,
CommunicationError,
LanguageCode,
LockingMode,
LogoDuration,
ScreenOrientationMode,
Expand Down Expand Up @@ -101,11 +100,6 @@ async def test_state(
"full_locking",
(CharSetting.LOCKING_MODE, LockingMode.FULL_LOCKING),
),
(
"select.pinecil_interface_language",
"de",
(CharSetting.UI_LANGUAGE, LanguageCode.DE),
),
(
"select.pinecil_boot_logo_duration",
"loop",
Expand Down

0 comments on commit 71017da

Please sign in to comment.