1.2.0 • Published 6 months ago

forecast-solar-ts v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

forecast-solar-ts

GitHub License GitHub issues NPM Version NPM Downloads Continuous Integration

This library is a typescript implementation of the forecast_solar library that is used in Home Assistant. It provides functionality to get solar power estimates from the API provided by forecast.solar.

Testing

The library has a reported 100% test coverage. You can find them in __tests__ and run them via the following command:

npm run test

Installation

# Using npm
npm i --save forecast-solar-ts

# Using yarn
yarn add forecast-solar-ts

# Using pnpm
pnpm add forecast-solar-ts

Usage

Usage in ESM

import ForecastSolar from 'forecast-solar-ts';

const forecast = new ForecastSolar({
  latitude: 48.21,
  longitude: 16.36,
  azimuth: 180,
  declination: 23.44,
  kwp: 5,
});

forecast.estimate().then((estimate) => {
  console.log(estimate);
});

Usage in CJS

const ForecastSolar = require('forecast-solar-ts');

const forecast = new ForecastSolar({
  latitude: 48.21,
  longitude: 16.36,
  azimuth: 180,
  declination: 23.44,
  kwp: 5,
});

forecast.estimate().then((estimate) => {
  console.log(estimate);
});

Issues

If you find any issues, please report them here.

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.2.0

6 months ago

1.1.0

9 months ago

1.0.2

12 months ago

1.0.1

1 year ago

1.0.0-1

1 year ago

1.0.0

1 year ago