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.
The library has a reported 100% test coverage. You can find them in __tests__
and run them via the following command:
npm run test
# Using npm
npm i --save forecast-solar-ts
# Using yarn
yarn add forecast-solar-ts
# Using pnpm
pnpm add forecast-solar-ts
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);
});
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);
});
If you find any issues, please report them here.
This project is licensed under the MIT License - see the LICENSE file for details.