-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# Thermia Online API | ||
### A Python API for Thermia heat pumps using https://online.thermia.se | ||
|
||
## Available properties within ThermiaWaterHeater class: | ||
## Available properties within ThermiaHeatPump class: | ||
| Property | Description | | ||
| --- | --- | | ||
| `name` | Name of the Water Heater | | ||
| `id` | Unique ID of the Water Heater Thermia generates | | ||
| `is_online` | Boolean value indicating if the Water Heater is online or not | | ||
| `last_online` | DateTime string indicating the last time the Water Heater was online | | ||
| `has_indoor_temperature_sensor` | Boolean value indicating if the Water Heater has an indoor temperature sensor | | ||
| `name` | Name of the Heat Pump | | ||
| `id` | Unique ID of the Heat Pump Thermia generates | | ||
| `is_online` | Boolean value indicating if the Heat Pump is online or not | | ||
| `last_online` | DateTime string indicating the last time the Heat Pump was online | | ||
| `has_indoor_temperature_sensor` | Boolean value indicating if the Heat Pump has an indoor temperature sensor | | ||
| `indoor_temperature` | Indoor temperature in Celsius, if `has_indoor_temperature_sensor` is False, this value is the same as `heat_temperature` | | ||
| `is_outdoor_temp_sensor_functioning` | Boolean value indicating if the Water Heater has an outdoor temperature sensor | | ||
| `is_outdoor_temp_sensor_functioning` | Boolean value indicating if the Heat Pump has an outdoor temperature sensor | | ||
| `outdoor_temperature` | Outdoor temperature in Celsius | | ||
| `is_hot_water_active` | Boolean value indicating if the Water Heater is heating water | | ||
| `is_hot_water_active` | Boolean value indicating if the Heat Pump is heating water | | ||
| `hot_water_temperature` | Hot water temperature in Celsius | | ||
| `heat_temperature` | Water Pump heating target temperature in Celsius | | ||
| `heat_min_temperature_value` | Minimum temperature value possible for Water Heater to set | | ||
| `heat_max_temperature_value` | Maximum temperature value possible for Water Heater to set | | ||
| `heat_temperature` | Heat Pump heating target temperature in Celsius | | ||
| `heat_min_temperature_value` | Minimum temperature value possible for Heat Pump to set | | ||
| `heat_max_temperature_value` | Maximum temperature value possible for Heat Pump to set | | ||
| `heat_temperature_step` | Step value for temperature setting | | ||
| `operation_mode` | Current operation mode of the Water Heater | | ||
| `available_operation_modes` | List of available operation modes for the Water Heater | | ||
| `operation_mode` | Current operation mode of the Heat Pump | | ||
| `available_operation_modes` | List of available operation modes for the Heat Pump | | ||
|
||
## Available functions within ThermiaWaterHeater class: | ||
## Available functions within ThermiaHeatPump class: | ||
| Function | Description | | ||
| --- | --- | | ||
| `refetch_data` | Refetch all data from Thermia for Water Heater | | ||
| `set_temperature` | Set the target temperature for the Water Heater | | ||
| `set_operation_mode` | Set the operation mode for the Water Heater | | ||
| `refetch_data` | Refetch all data from Thermia for Heat Pump | | ||
| `set_temperature` | Set the target temperature for the Heat Pump | | ||
| `set_operation_mode` | Set the operation mode for the Heat Pump | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
from ThermiaOnlineAPI.api.ThermiaAPI import ThermiaAPI | ||
from ThermiaOnlineAPI.model.WaterHeater import ThermiaWaterHeater | ||
from ThermiaOnlineAPI.model.HeatPump import ThermiaHeatPump | ||
|
||
class Thermia(): | ||
def __init__(self, username, password): | ||
self.api_interface = ThermiaAPI(username, password) | ||
self.connected = self.api_interface.authenticated | ||
self.water_heaters = self.__get_water_heaters() | ||
self.heat_pumps = self.__get_heat_pumps() | ||
|
||
def __get_water_heaters(self): | ||
def __get_heat_pumps(self): | ||
devices = self.api_interface.get_devices() | ||
water_heaters = [] | ||
heat_pumps = [] | ||
|
||
for device in devices: | ||
water_heaters.append(ThermiaWaterHeater(device, self.api_interface)) | ||
heat_pumps.append(ThermiaHeatPump(device, self.api_interface)) | ||
|
||
return water_heaters | ||
return heat_pumps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
"""Water Heater Model""" | ||
"""Heat Pump Model""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters