Skip to content

Commit c1c7080

Browse files
author
speleolontra
committed
Clean code, License and readme documentation.
1 parent 1df5c11 commit c1c7080

File tree

8 files changed

+702
-45
lines changed

8 files changed

+702
-45
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9671,3 +9671,4 @@ deps/share/man/man1/moggsplit.1
96719671
deps/share/man/man1/mutagen-inspect.1
96729672
deps/share/man/man1/mutagen-pony.1
96739673
custom_components/hacs/validate/README.md
9674+
custom_components/daikin_residential_altherma/NOTELONTRA.txt

LICENSE.TXT

+674
Large diffs are not rendered by default.

custom_components/daikin_residential_altherma/NOTELONTRA.txt

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
* * * * * * INSERIMENTO DI UN NUOVO SENSORE * * * * * *
33

44

5-
6-
7-
85
1) const.py: Aggiungere una costante ATTR battezzandone il nuovo nome, es:
96

107

custom_components/daikin_residential_altherma/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
_LOGGER = logging.getLogger(__name__)
1616

1717
ENTRY_IS_SETUP = "daikin_entry_is_setup"
18-
_LOGGER.debug("DAMIANO daikin_entry_is_setup")
1918

2019
PARALLEL_UPDATES = 0
2120

custom_components/daikin_residential_altherma/const.py

-23
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,6 @@
2323
DAIKIN_DEVICES = "daikin_devices"
2424
DAIKIN_DISCOVERY_NEW = "daikin_discovery_new_{}"
2525

26-
27-
#ATTR_ON_OFF = "on_off"
28-
# ATTR_PRESET_MODE = "preset_mode"
29-
# ATTR_OPERATION_MODE = "operation_mode"
30-
# ATTR_TEMPERATURE = "temperature"
31-
# ATTR_TARGET_TEMPERATURE = "target_temperature"
32-
# ATTR_INSIDE_TEMPERATURE = "inside_temperature"
33-
# ATTR_OUTSIDE_TEMPERATURE = "outside_temperature"
34-
# # ORIG
35-
# ATTR_ENERGY_CONSUMPTION = "energy_consumption"
36-
# ATTR_HUMIDITY = "humidity"
37-
# ATTR_TARGET_HUMIDITY = "target_humidity"
38-
# ATTR_FAN_MODE = "fan_mode"
39-
# ATTR_FAN_SPEED = "fan_speed"
40-
# ATTR_HSWING_MODE = "hswing_mode"
41-
# ATTR_VSWING_MODE = "vswing_mode"
42-
# ATTR_SWING_AUTO = "auto"
43-
# ATTR_SWING_SWING = "swing"
44-
# ATTR_SWING_STOP = "stop"
45-
# ATTR_COOL_ENERGY = "cool_energy"
46-
# ATTR_HEAT_ENERGY = "heat_energy"
47-
48-
4926
# MANAGEMENT POINTS
5027
# ORIG
5128
#MP_CLIMATE = "climateControl"

custom_components/daikin_residential_altherma/sensor.py

-13
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
4242
"""Set up Daikin climate based on config_entry."""
4343
sensors = []
4444
prog = 0
45-
46-
# for dev_id, device in hass.data[DAIKIN_DOMAIN][DAIKIN_DEVICES].items():
47-
# print("DAMIANO %s dev_id = %s", prog, dev_id)
48-
# prog += 1
4945

5046
for dev_id, device in hass.data[DAIKIN_DOMAIN][DAIKIN_DEVICES].items():
5147
sensor = DaikinSensor.factory(device, ATTR_INSIDE_TEMPERATURE)
@@ -54,30 +50,21 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
5450

5551
if device.support_tank_temperature:
5652
sensor = DaikinSensor.factory(device, ATTR_TANK_TEMPERATURE)
57-
#print("DAMIANO append sensor = %s", sensor)
5853
sensors.append(sensor)
5954

6055
if device.support_outside_temperature:
61-
#print("DAMIANO support_outside_temperature TRUE")
6256
sensor = DaikinSensor.factory(device, ATTR_OUTSIDE_TEMPERATURE)
63-
#print("DAMIANO append2 sensor = %s", sensor)
6457
sensors.append(sensor)
6558

6659
if device.support_energy_consumption:
67-
#print("DAMIANO support_energy_consumption TRUE")
6860
for period in SENSOR_PERIODS:
69-
#print("DAMIANO period = %s", period)
70-
7161
sensor = DaikinSensor.factory(device, ATTR_COOL_ENERGY, period)
72-
#print("DAMIANO append3 sensor = %s", sensor)
7362
sensors.append(sensor)
7463

7564
sensor = DaikinSensor.factory(device, ATTR_HEAT_ENERGY, period)
76-
#print("DAMIANO append4 sensor = %s", sensor)
7765
sensors.append(sensor)
7866

7967
sensor = DaikinSensor.factory(device, ATTR_HEAT_TANK_ENERGY, period)
80-
#print("DAMIANO append4 sensor = %s", sensor)
8168
sensors.append(sensor)
8269

8370
#print("DAMIANO add_entities: %s", sensors)

custom_components/daikin_residential_altherma/switch.py

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
_LOGGER = logging.getLogger(__name__)
2222

2323

24-
25-
2624
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
2725
"""Old way of setting up the platform.
2826

readme.md

+27-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,27 @@
22

33
This work is inspired from Rospogrigio "daikin_residential" repository (https://github.com/rospogrigio/daikin_residential) and modified to support Daikin Altherma 3 Heat Pump.
44

5-
# Installation:
5+
# WARNING
6+
This is a first experimental release, tested on my Daikin Altherma 3 (BRP069A78) (installed in July 2021) and Home assistant Portable version for Windows.
7+
The HA Integration was cloned by Rospogrigio's work, i'm not sure at 100% that is correct and i think that this integrations cannot be cannot coexist in the same home assistant. This can be a goal of next releases...
68

7-
Copy the daikin_residential folder and all of its contents into your Home Assistant's custom_components folder. This is often located inside of your /config folder. If you are running Hass.io, use SAMBA to copy the folder over. If you are running Home Assistant Supervised, the custom_components folder might be located at /usr/share/hassio/homeassistant. It is possible that your custom_components folder does not exist. If that is the case, create the folder in the proper location, and then copy the daikin_residential folder and all of its contents inside the newly created custom_components folder.
9+
# Installation using HACS:
810

9-
# YAML config files
11+
Open "HACS" section then "Integrations" and click on three points menu at top right. Click on "custom reporitories" and add "https://github.com/speleolontra/daikin_residential_altherma" as integration category.
12+
this will copy the "daikin_residential_altherma" folder in the "custom_components" folder of Home Assistant.
13+
Make sure tu restart home Assistant, then go to "Using config flow" chapter.
14+
15+
# Manual Installation
16+
17+
Copy the "daikin_residential_altherma" folder and all of its contents into your Home Assistant's "custom_components" folder. This is often located inside of your "/config" folder. If you are running Hass.io, use SAMBA to copy the folder over. If you are running Home Assistant Supervised, the "custom_components" folder might be located at "/usr/share/hassio/homeassistant". It is possible that your "custom_components" folder does not exist. If that is the case, create the folder in the proper location, and then copy the "daikin_residential_altherma" folder and all of its contents inside the newly created "custom_components" folder.
18+
19+
# Using config flow
20+
21+
Start by going to Configuration - Integration and pressing the "+ ADD INTEGRATION" button to create a new Integration, then select Daikin Residential Controller in the drop-down menu.
22+
23+
Follow the instructions, you just have to type the email and password used in the Daikin Residential App. After pressing the "Submit" button, the integration will be added, and the Daikin devices connected to your cloud account will be created.
24+
25+
# YAML config files (not tested)
1026

1127
Just add the following lines to your configuration.yaml file specifying the email and password used in the Daikin Residential App, and the Daikin devices connected to your cloud account will be created.
1228

@@ -20,3 +36,11 @@ daikin_residential_altherma:
2036
# Thanks to:
2137

2238
This code is based on @Rospogrigio's work that in turn is based on @Apollon77 's work, in finding a way to retrieve the token set, and to send the HTTP commands over the cloud. This integration would not exist without their precious job, my job was to try and debug Rospogrigio's code to adapt at JSON from Altherma 3 controlled by Daikin Residential App.
39+
40+
# Next steps
41+
42+
- Evaluate an unique integration with @Rospogrigio for both device Air Conditioning and Heat Punp.
43+
- Better manage of climate entity (Target temperature doesn't exist on Heat Pumps)
44+
- Insert other read only parameter
45+
- Way to measure COP and SCOP.
46+
- other ideas?

0 commit comments

Comments
 (0)