Skip to content
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
23 changes: 16 additions & 7 deletions .github/workflows/detect-non-english-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,19 @@ jobs:
You are a language detection system. Your task is to determine if the provided text is written in English or another language.

Rules:
1. Analyze the text and determine the primary language
1. Analyze the text and determine the primary language of the USER'S DESCRIPTION only
2. IGNORE markdown headers (lines starting with #, ##, ###, etc.) as these are from issue templates, not user input
3. IGNORE all code blocks (text between ``` or ` markers) as they may contain system-generated error messages in other languages
4. Consider technical terms, code snippets, and URLs as neutral (they don't indicate non-English)
5. Focus on the actual sentences and descriptions written by the user
6. Return ONLY a JSON object with two fields:
- "is_english": boolean (true if the text is primarily in English, false otherwise)
4. IGNORE error messages, logs, and system output even if not in code blocks - these often appear in the user's system language
5. Consider technical terms, code snippets, URLs, and file paths as neutral (they don't indicate non-English)
6. Focus ONLY on the actual sentences and descriptions written by the user explaining their issue
7. If the user's explanation/description is in English but includes non-English error messages or logs, consider it ENGLISH
8. Return ONLY a JSON object with two fields:
- "is_english": boolean (true if the user's description is primarily in English, false otherwise)
- "detected_language": string (the name of the detected language, e.g., "English", "Spanish", "Chinese", etc.)
7. Be lenient - if the text is mostly English with minor non-English elements, consider it English
8. Common programming terms, error messages, and technical jargon should not be considered as non-English
9. Be lenient - if the user's explanation is in English with non-English system output, it's still English
10. Common programming terms, error messages, and technical jargon should not be considered as non-English
11. If you cannot reliably determine the language, set detected_language to "undefined"

Example response:
{"is_english": false, "detected_language": "Spanish"}
Expand Down Expand Up @@ -122,6 +125,12 @@ jobs:
return;
}

// If language is undefined or not detected, skip processing
if (!languageResult.detected_language || languageResult.detected_language === 'undefined') {
console.log('Language could not be determined, skipping processing');
return;
}

console.log(`Issue detected as non-English: ${languageResult.detected_language}`);

// Post comment explaining the language requirement
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"documentation": "https://www.home-assistant.io/integrations/frontend",
"integration_type": "system",
"quality_scale": "internal",
"requirements": ["home-assistant-frontend==20250531.2"]
"requirements": ["home-assistant-frontend==20250531.3"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/jewish_calendar/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/jewish_calendar",
"iot_class": "calculated",
"loggers": ["hdate"],
"requirements": ["hdate[astral]==1.1.1"],
"requirements": ["hdate[astral]==1.1.2"],
"single_config_entry": true
}
10 changes: 3 additions & 7 deletions homeassistant/components/jewish_calendar/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class JewishCalendarTimestampSensorDescription(JewishCalendarBaseSensorDescripti
translation_key="weekly_portion",
device_class=SensorDeviceClass.ENUM,
options_fn=lambda _: [str(p) for p in Parasha],
value_fn=lambda results: str(results.after_tzais_date.upcoming_shabbat.parasha),
value_fn=lambda results: results.after_tzais_date.upcoming_shabbat.parasha,
),
JewishCalendarSensorDescription(
key="holiday",
Expand All @@ -98,17 +98,13 @@ class JewishCalendarTimestampSensorDescription(JewishCalendarBaseSensorDescripti
key="omer_count",
translation_key="omer_count",
entity_registry_enabled_default=False,
value_fn=lambda results: (
results.after_shkia_date.omer.total_days
if results.after_shkia_date.omer
else 0
),
value_fn=lambda results: results.after_shkia_date.omer.total_days,
),
JewishCalendarSensorDescription(
key="daf_yomi",
translation_key="daf_yomi",
entity_registry_enabled_default=False,
value_fn=lambda results: str(results.daytime_date.daf_yomi),
value_fn=lambda results: results.daytime_date.daf_yomi,
),
)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lcn/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"documentation": "https://www.home-assistant.io/integrations/lcn",
"iot_class": "local_push",
"loggers": ["pypck"],
"requirements": ["pypck==0.8.6", "lcn-frontend==0.2.5"]
"requirements": ["pypck==0.8.7", "lcn-frontend==0.2.5"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/linkplay/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["linkplay"],
"requirements": ["python-linkplay==0.2.11"],
"requirements": ["python-linkplay==0.2.12"],
"zeroconf": ["_linkplay._tcp.local."]
}
1 change: 1 addition & 0 deletions homeassistant/components/reolink/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class ReolinkSmartAIBinarySensorEntityDescription(
cmd_id=33,
device_class=BinarySensorDeviceClass.MOTION,
value=lambda api, ch: api.motion_detected(ch),
supported=lambda api, ch: api.supported(ch, "motion_detection"),
),
ReolinkBinarySensorEntityDescription(
key=FACE_DETECTION_TYPE,
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/reolink/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,27 @@ class ReolinkCameraEntityDescription(
key="sub",
stream="sub",
translation_key="sub",
supported=lambda api, ch: api.supported(ch, "stream"),
),
ReolinkCameraEntityDescription(
key="main",
stream="main",
translation_key="main",
supported=lambda api, ch: api.supported(ch, "stream"),
entity_registry_enabled_default=False,
),
ReolinkCameraEntityDescription(
key="snapshots_sub",
stream="snapshots_sub",
translation_key="snapshots_sub",
supported=lambda api, ch: api.supported(ch, "snapshot"),
entity_registry_enabled_default=False,
),
ReolinkCameraEntityDescription(
key="snapshots",
stream="snapshots_main",
translation_key="snapshots_main",
supported=lambda api, ch: api.supported(ch, "snapshot"),
entity_registry_enabled_default=False,
),
ReolinkCameraEntityDescription(
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/reolink/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ async def async_get_config_entry_diagnostics(
"firmware version": api.sw_version,
"HTTPS": api.use_https,
"HTTP(S) port": api.port,
"Baichuan port": api.baichuan.port,
"Baichuan only": api.baichuan_only,
"WiFi connection": api.wifi_connection,
"WiFi signal": api.wifi_signal,
"RTMP enabled": api.rtmp_enabled,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/reolink/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def __init__(
via_device=(DOMAIN, self._host.unique_id),
name=self._host.api.camera_name(dev_ch),
model=self._host.api.camera_model(dev_ch),
model_id=self._host.api.item_number(dev_ch),
manufacturer=self._host.api.manufacturer,
hw_version=self._host.api.camera_hardware_version(dev_ch),
sw_version=self._host.api.camera_sw_version(dev_ch),
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ habluetooth==3.49.0
hass-nabucasa==0.101.0
hassil==2.2.3
home-assistant-bluetooth==1.13.1
home-assistant-frontend==20250531.2
home-assistant-frontend==20250531.3
home-assistant-intents==2025.6.10
httpx==0.28.1
ifaddr==0.2.0
Expand Down
8 changes: 4 additions & 4 deletions requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/components/reolink/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def reolink_connect_class() -> Generator[MagicMock]:

# Baichuan
host_mock.baichuan = create_autospec(Baichuan)
host_mock.baichuan_only = False
# Disable tcp push by default for tests
host_mock.baichuan.port = TEST_BC_PORT
host_mock.baichuan.events_active = False
Expand Down
2 changes: 2 additions & 0 deletions tests/components/reolink/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
'pushAlarm': 7,
}),
}),
'Baichuan only': False,
'Baichuan port': 5678,
'Chimes': dict({
'12345678': dict({
'channel': 0,
Expand Down
15 changes: 10 additions & 5 deletions tests/components/reolink/test_media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,14 @@ async def test_browsing_rec_playback_unsupported(
config_entry: MockConfigEntry,
) -> None:
"""Test browsing a Reolink camera which does not support playback of recordings."""
reolink_connect.supported.return_value = 0

def test_supported(ch, key):
"""Test supported function."""
if key == "replay":
return False
return True

reolink_connect.supported = test_supported

with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
assert await hass.config_entries.async_setup(config_entry.entry_id)
Expand All @@ -347,15 +354,15 @@ async def test_browsing_rec_playback_unsupported(
assert browse.identifier is None
assert browse.children == []

reolink_connect.supported = lambda ch, key: True # Reset supported function


async def test_browsing_errors(
hass: HomeAssistant,
reolink_connect: MagicMock,
config_entry: MockConfigEntry,
) -> None:
"""Test browsing a Reolink camera errors."""
reolink_connect.supported.return_value = 1

with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
Expand All @@ -373,8 +380,6 @@ async def test_browsing_not_loaded(
config_entry: MockConfigEntry,
) -> None:
"""Test browsing a Reolink camera integration which is not loaded."""
reolink_connect.supported.return_value = 1

with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
Expand Down
Loading
Loading