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
2 changes: 1 addition & 1 deletion .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ jobs:

- name: Generate artifact attestation
if: needs.init.outputs.channel != 'dev' && needs.init.outputs.publish == 'true'
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-name: ${{ env.HASSFEST_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
uses: actions/[email protected]

- name: Initialize CodeQL
uses: github/codeql-action/init@v3.28.19
uses: github/codeql-action/init@v3.29.0
with:
languages: python

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.28.19
uses: github/codeql-action/analyze@v3.29.0
with:
category: "/language:python"
39 changes: 25 additions & 14 deletions .github/workflows/detect-duplicate-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,18 @@ jobs:

// Build search query for issues with any of the current integration labels
const labelQueries = integrationLabels.map(label => `label:"${label}"`);

// Calculate date 6 months ago
const sixMonthsAgo = new Date();
sixMonthsAgo.setMonth(sixMonthsAgo.getMonth() - 6);
const dateFilter = `created:>=${sixMonthsAgo.toISOString().split('T')[0]}`;

let searchQuery;

if (labelQueries.length === 1) {
searchQuery = `repo:${context.repo.owner}/${context.repo.repo} is:issue ${labelQueries[0]}`;
searchQuery = `repo:${context.repo.owner}/${context.repo.repo} is:issue ${labelQueries[0]} ${dateFilter}`;
} else {
searchQuery = `repo:${context.repo.owner}/${context.repo.repo} is:issue (${labelQueries.join(' OR ')})`;
searchQuery = `repo:${context.repo.owner}/${context.repo.repo} is:issue (${labelQueries.join(' OR ')}) ${dateFilter}`;
}

console.log(`Search query: ${searchQuery}`);
Expand Down Expand Up @@ -227,29 +233,34 @@ jobs:
if: steps.extract.outputs.should_continue == 'true' && steps.fetch_similar.outputs.has_similar == 'true'
uses: actions/[email protected]
with:
model: openai/gpt-4o-mini
model: openai/gpt-4o
system-prompt: |
You are a Home Assistant issue duplicate detector. Your task is to identify potential duplicate issues based on their content.
You are a Home Assistant issue duplicate detector. Your task is to identify TRUE DUPLICATES - issues that report the EXACT SAME problem, not just similar or related issues.

CRITICAL: An issue is ONLY a duplicate if:
- It describes the SAME problem with the SAME root cause
- Issues about the same integration but different problems are NOT duplicates
- Issues with similar symptoms but different causes are NOT duplicates

Important considerations:
- Open issues are more relevant than closed ones for duplicate detection
- Recently updated issues may indicate ongoing work or discussion
- Issues with more comments are generally more relevant and active
- Higher comment count often indicates community engagement and importance
- Older closed issues might be resolved differently than newer approaches
- Consider the time between issues - very old issues may have different contexts

Rules:
1. Compare the current issue with the provided similar issues
1. ONLY mark as duplicate if the issues describe IDENTICAL problems
2. Look for issues that report the same problem or request the same functionality
3. Consider different wording but same underlying issue as duplicates
3. Different error messages = NOT a duplicate (even if same integration)
4. For CLOSED issues, only mark as duplicate if they describe the EXACT same problem
5. For OPEN issues, use a lower threshold (70%+ similarity)
5. For OPEN issues, use a lower threshold (90%+ similarity)
6. Prioritize issues with higher comment counts as they indicate more activity/relevance
7. Return ONLY a JSON array of issue numbers that are potential duplicates
8. If no duplicates are found, return an empty array: []
9. Maximum 5 potential duplicates, prioritize open issues with comments
10. Consider the age of issues - prefer recent duplicates over very old ones
7. When in doubt, do NOT mark as duplicate
8. Return ONLY a JSON array of issue numbers that are duplicates
9. If no duplicates are found, return an empty array: []
10. Maximum 5 potential duplicates, prioritize open issues with comments
11. Consider the age of issues - prefer recent duplicates over very old ones

Example response format:
[1234, 5678, 9012]
Expand All @@ -259,10 +270,10 @@ jobs:
Title: ${{ steps.extract.outputs.current_title }}
Body: ${{ steps.extract.outputs.current_body }}

Similar issues to compare against (each includes state, creation date, last update, and comment count):
Other issues to compare against (each includes state, creation date, last update, and comment count):
${{ steps.fetch_similar.outputs.similar_issues }}

Analyze these issues and identify which ones are potential duplicates of the current issue. Consider their state (open/closed), how recently they were updated, and their comment count (higher = more relevant).
Analyze these issues and identify which ones describe IDENTICAL problems and thus are duplicates of the current issue. When sorting them, consider their state (open/closed), how recently they were updated, and their comment count (higher = more relevant).

max-tokens: 100

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/fritz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up fritzboxtools integration."""
await async_setup_services(hass)
async_setup_services(hass)
return True


Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/fritz/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from fritzconnection.lib.fritzwlan import DEFAULT_PASSWORD_LENGTH
import voluptuous as vol

from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.core import HomeAssistant, ServiceCall, callback
from homeassistant.exceptions import HomeAssistantError, ServiceValidationError
from homeassistant.helpers.service import async_extract_config_entry_ids

Expand Down Expand Up @@ -64,7 +64,8 @@ async def _async_set_guest_wifi_password(service_call: ServiceCall) -> None:
) from ex


async def async_setup_services(hass: HomeAssistant) -> None:
@callback
def async_setup_services(hass: HomeAssistant) -> None:
"""Set up services for Fritz integration."""

hass.services.async_register(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homematicip_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
)
)

await async_setup_services(hass)
async_setup_services(hass)

return True

Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/homematicip_cloud/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import voluptuous as vol

from homeassistant.const import ATTR_ENTITY_ID, ATTR_TEMPERATURE
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.core import HomeAssistant, ServiceCall, callback
from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.config_validation import comp_entity_ids
Expand Down Expand Up @@ -120,7 +120,8 @@
)


async def async_setup_services(hass: HomeAssistant) -> None:
@callback
def async_setup_services(hass: HomeAssistant) -> None:
"""Set up the HomematicIP Cloud services."""

@verify_domain_control(hass, DOMAIN)
Expand Down
9 changes: 6 additions & 3 deletions homeassistant/components/lifx/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import asyncio
from collections.abc import Callable
from datetime import timedelta
from typing import Any
from typing import TYPE_CHECKING, Any

import aiolifx_effects
from aiolifx_themes.painter import ThemePainter
Expand All @@ -31,9 +31,12 @@
from homeassistant.helpers.service import async_extract_referenced_entity_ids

from .const import _ATTR_COLOR_TEMP, ATTR_THEME, DATA_LIFX_MANAGER, DOMAIN
from .coordinator import LIFXUpdateCoordinator, Light
from .coordinator import LIFXUpdateCoordinator
from .util import convert_8_to_16, find_hsbk

if TYPE_CHECKING:
from aiolifx.aiolifx import Light

SCAN_INTERVAL = timedelta(seconds=10)

SERVICE_EFFECT_COLORLOOP = "effect_colorloop"
Expand Down Expand Up @@ -426,8 +429,8 @@ async def _start_effect_sky(
) -> None:
"""Start the firmware-based Sky effect."""
palette = kwargs.get(ATTR_PALETTE)
theme = Theme()
if palette is not None:
theme = Theme()
for hsbk in palette:
theme.add_hsbk(hsbk[0], hsbk[1], hsbk[2], hsbk[3])

Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/mealie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
MealieShoppingListCoordinator,
MealieStatisticsCoordinator,
)
from .services import setup_services
from .services import async_setup_services
from .utils import create_version

PLATFORMS: list[Platform] = [Platform.CALENDAR, Platform.SENSOR, Platform.TODO]
Expand All @@ -34,7 +34,7 @@

async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Mealie component."""
setup_services(hass)
async_setup_services(hass)
return True


Expand Down
Loading
Loading