CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-homeassistant

tessl install tessl/pypi-homeassistant@2025.9.0

Open-source home automation platform running on Python 3.

Agent Success

Agent success rate when using this tile

69%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

58%

task.mdevals/scenario-10/

Historical State Query Service

A service that provides historical state information for Home Assistant entities by querying recorded data.

Capabilities

Query Historical States

  • It retrieves all historical states for a specific entity within a given time range @test
  • It returns an empty list when querying an entity with no recorded history @test
  • It filters states to only include those within the specified start and end timestamps @test

Entity Filtering Configuration

  • It applies include filters to record only specified entities @test
  • It applies exclude filters to prevent recording specified entities @test

Implementation

@generates

API

from typing import List, Optional
from datetime import datetime

def get_entity_history(
    entity_id: str,
    start_time: datetime,
    end_time: Optional[datetime] = None
) -> List[dict]:
    """
    Retrieve historical states for a specific entity within a time range.

    Args:
        entity_id: The entity ID to query (e.g., 'sensor.temperature')
        start_time: The start of the time range
        end_time: The end of the time range (defaults to now if not provided)

    Returns:
        A list of state dictionaries, each containing:
        - state: The state value
        - last_changed: Timestamp of when the state changed
        - attributes: Additional state attributes
    """
    pass

def configure_recorder(
    include_entities: Optional[List[str]] = None,
    exclude_entities: Optional[List[str]] = None
) -> dict:
    """
    Configure which entities should be recorded.

    Args:
        include_entities: List of entity IDs to include (if specified, only these are recorded)
        exclude_entities: List of entity IDs to exclude from recording

    Returns:
        A dictionary with the applied configuration
    """
    pass

Dependencies { .dependencies }

homeassistant { .dependency }

Provides home automation framework with recorder integration support.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/homeassistant@2025.9.x
tile.json