Skip to content

Commit

Permalink
rename cli.py to example.py and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
LavermanJJ committed Oct 16, 2022
1 parent 33fb8c7 commit 1cfdbfd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
33 changes: 0 additions & 33 deletions cli.py

This file was deleted.

25 changes: 25 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pymodbus.client import ModbusTcpClient as ModbusClient
from pysolarfocus import SolarfocusAPI
from pysolarfocus import PORT,Systems

# Create a Modbus client
# TODO: Adapt IP-Address
client = ModbusClient("IP-Address", port=PORT)
client.connect()

# Create the Solarfocus API client
solarfocus = SolarfocusAPI(client, Systems.Vampair)

# Fetch the values
solarfocus.update()

# Print the values
print(solarfocus.heating_circuit)
print("\n")
print(solarfocus.boiler)
print("\n")
print(solarfocus.buffer)
print("\n")
print(solarfocus.heatpump)
print("\n")
print(solarfocus.photovoltaic)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pysolarfocus"
version = "1.3.0"
version = "2.0.0"
description = "Unofficial, local Solarfocus client"
authors = ["Jeroen Laverman <jjlaverman@web.de>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion pysolarfocus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Python client lib for Solarfocus"""
__version__ = "1.3.0"
__version__ = "2.0.0"

import logging
from enum import Enum
Expand Down

0 comments on commit 1cfdbfd

Please sign in to comment.