Skip to main content

Client for retrieving data from the La Crosse View cloud

Project description

La Crosse View

A library for retrieving data from La Crosse View-connected sensors.

Disclaimer

This library is NOT for the Jeelink LaCrosse sensors. You can find that library here. There is also a Home Assistant integration for the Jeelink LaCrosse sensors.

Installation

Run this in your terminal:

pip install lacrosse_view

Usage

This example shows how to get the latest data from every sensor connected to the first location on your account.

from lacrosse_view import LaCrosse
import asyncio

async def get_data():
    api = LaCrosse()
    # Log in to your LaCrosse View account
    await api.login('paulus@home-assistant.io', 'password')
    # Get the sensors from the first location on the account
    locations = await api.get_locations()
    sensors = await api.get_sensors(locations[0], tz="America/New_York", start=datetime.now() - timedelta(minutes=1), end=datetime.now())
 
    for sensor in sensors:
        for field in sensor.sensor_field_names:
            # Each value is a dictionary with keys "s" and "u". "s" is the value and "u" is the Unix timestamp for it.
            print(
                f"{sensor.name} {field}: {sensor.data[field]["values"][-1]["s"]}"
            )
    
    await api.logout()

asyncio.run(get_data())

Questions?

If you have any questions, please, don't hesitate to open an issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lacrosse_view-0.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lacrosse_view-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file lacrosse_view-0.0.1.tar.gz.

File metadata

  • Download URL: lacrosse_view-0.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for lacrosse_view-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ca76087ccdf5945b4bc5a4c26dd84cf5f40013a7cd01bb4716ca8f9ff696a84d
MD5 2f14bdb08956f513afda46775b4b2981
BLAKE2b-256 7b9f6814ee66a11d4a9329540ac620067a5656b7907a5f8d0cbbe5028a1a5085

See more details on using hashes here.

File details

Details for the file lacrosse_view-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: lacrosse_view-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for lacrosse_view-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 813a550dfe750f4fc524e431da283389eee435283faaa0e30426209c94535fe3
MD5 6b89067b125ad4338b2ea524a730d3b1
BLAKE2b-256 ab8a80ef3d52f277b5775a3b431e1dba93636f01b570a409df20bb6626ff3cf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page