tessl install tessl/pypi-homeassistant@2025.9.0Open-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%
Create a home automation system that manages a smart room's lighting and climate using multiple triggers and conditions.
Your system should implement an automation that:
Controls evening lighting when:
Manages climate when:
Responds to manual override events by:
The automation must use multiple trigger types (state change, time, event), apply conditions before executing actions, and handle concurrent triggers appropriately.
@generates
def setup_smart_room_automation(
hass,
room_motion_sensor: str,
room_light_sensor: str,
room_temp_sensor: str,
lights_entity: str,
climate_entity: str,
config: dict
) -> dict:
"""
Set up a smart room automation with multi-trigger support.
Args:
hass: Home Assistant instance
room_motion_sensor: Entity ID of the motion sensor (e.g., 'binary_sensor.room_motion')
room_light_sensor: Entity ID of the light sensor (e.g., 'sensor.room_light_level')
room_temp_sensor: Entity ID of the temperature sensor (e.g., 'sensor.room_temperature')
lights_entity: Entity ID of the lights (e.g., 'light.room_lights')
climate_entity: Entity ID of the climate control (e.g., 'climate.room_hvac')
config: Configuration dictionary containing thresholds and settings
- light_threshold: Numeric light level threshold (lux)
- temp_threshold: Temperature threshold (°C)
- override_delay: Delay in seconds before re-enabling automation
- automation_mode: Mode for handling concurrent triggers
Returns:
Dictionary containing the automation configuration
"""
passProvides home automation framework with automation engine, multi-trigger support, and state management.