Skip to content

mickeyschwab/haven-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haven Lighting API Client

A Python client library for interacting with the Haven Lighting API.

Installation

pip install havenlighting

Usage

from havenlighting import HavenClient

# Initialize the client
client = HavenClient()

# Authenticate
authenticated = client.authenticate(
    email="[email protected]",
    password="your-password"
)

if authenticated:
    # Discover locations
    locations = client.discover_locations()
    
    # Print available locations and lights
    for location_id, location in locations.items():
        print(f"Location: {location.name}")
        
        # Get lights for this location
        lights = location.get_lights()
        
        # Control lights
        for light_id, light in lights.items():
            print(f"Light: {light.name}")
            light.turn_on()   # Turn light on
            light.turn_off()  # Turn light off

Development

  1. Clone the repository
  2. Copy .env.example to .env and fill in your credentials:
cp .env.example .env
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages