Skip to content

New API url

New API url #27

Triggered via pull request January 26, 2024 22:17
@flopp999flopp999
synchronize #30
newAPiURl
Status Success
Total duration 22s
Artifacts

linting.yml

on: pull_request
Run linting
12s
Run linting
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 2 warnings
pycheckwatt/__init__.py#L326
Trailing whitespace (W291)
/home/runner/work/pyCheckwatt/pyCheckwatt/pycheckwatt/const.py#L1
"""Docstring.""" + SENSOR = "SENSOR" class Device: """Docstring."""
pycheckwatt/__init__.py#L327
Continuation line under-indented for visual indent (E128)
/home/runner/work/pyCheckwatt/pyCheckwatt/setup.py#L1
"""Setup script for pyCheckwatt module.""" + from setuptools import find_packages, setup MIN_PY_VERSION = "3.10" PACKAGES = find_packages() VERSION = "0.1.10"
/home/runner/work/pyCheckwatt/pyCheckwatt/examples/main.py#L1
"""Test-module for pyCheckwatt.""" + import argparse import json import os from dotenv import load_dotenv
/home/runner/work/pyCheckwatt/pyCheckwatt/pycheckwatt/__init__.py#L1
"""CheckWatt module.""" + from __future__ import annotations import base64 import json import logging
/home/runner/work/pyCheckwatt/pyCheckwatt/pycheckwatt/__init__.py#L289
try: from_date = datetime.now().strftime("%Y-%m-01") to_date = datetime.now() + timedelta(days=1) to_date = to_date.strftime("%Y-%m-%d") lastday_date = datetime.now() + relativedelta(months=1) - lastday_date = datetime(year=lastday_date.year, - month=lastday_date.month, day=1) + lastday_date = datetime( + year=lastday_date.year, month=lastday_date.month, day=1 + ) lastday_date = lastday_date - timedelta(days=1) lastday = lastday_date.strftime("%d")
/home/runner/work/pyCheckwatt/pyCheckwatt/pycheckwatt/__init__.py#L321
if each["NetRevenue"] == 0: misseddays += 1 dayswithmoney = int(dayssofar) - int(misseddays) if response.status == 200: self.dailyaverage = self.revenuemonth / int(dayswithmoney) - self.monthestimate = ((self.dailyaverage * daysleft) - + self.revenuemonth) + self.monthestimate = ( + self.dailyaverage * daysleft + ) + self.revenuemonth return True _LOGGER.error( "Obtaining data from URL %s failed with status code %d", self.base_url + endpoint,
/home/runner/work/pyCheckwatt/pyCheckwatt/pycheckwatt/__init__.py#L776
if "NetRevenue" in self.revenue[0]: revenue = self.revenue[0]["NetRevenue"] return revenue -# @Property -# def tomorrow_revenue(self): -# """Property for tomorrow's revenue.""" -# revenue = 0 -# if self.revenue is not None: -# if len(self.revenue) > 1: -# if "NetRevenue" in self.revenue[1]: -# revenue = self.revenue[1]["NetRevenue"] - -# return revenue + # @Property + # def tomorrow_revenue(self): + # """Property for tomorrow's revenue.""" + # revenue = 0 + # if self.revenue is not None: + # if len(self.revenue) > 1: + # if "NetRevenue" in self.revenue[1]: + # revenue = self.revenue[1]["NetRevenue"] + + # return revenue def _get_meter_total(self, meter_type): """Solar, Charging, Discharging, EDIEL_E17, EDIEL_E18, Soc meter summary.""" meter_total = 0 meters = self.power_data.get("Meters", [])
Run linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Run linting
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, wearerequired/lint-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.