Repository: openviess/PyViCare (language: python)

Issue:
min and max temperature for desired program 
there is function setProgramTemperature to set temperature for certain program 

```python
    def setProgramTemperature(self, program: str, temperature: int):
```

but no way how to find out allowed range and stepping, even though vicare API contains these values 

```text
    {
      'properties': {
        'active': {
          'value': False,
          'type': 'boolean'
        },
        'demand': {
          'value': 'unknown',
          'type': 'string'
        },
        'temperature': {
          'value': 65,
          'unit': 'celsius',
          'type': 'number'
        }
      },
      'commands': {
        'setTemperature': {
          'uri': '.../devices/0/features/heating.circuits.0.operating.programs.normal/commands/setTemperature',
          'name': 'setTemperature',
          'isExecutable': True,
          'params': {
            'targetTemperature': {
              'type': 'number',
              'required': True,
              'constraints': {
                'min': 20, # <--- here
                'max': 82, # <--- here
                'stepping': 1 # <--- here
              }
            }
          }
        }
      },
      'apiVersion': 1,
      'uri': '../devices/0/features/heating.circuits.0.operating.programs.normal',
      'gatewayId': '...',
      'feature': 'heating.circuits.0.operating.programs.normal',
      'timestamp': '2022-09-25T13:48:31.938Z',
      'isEnabled': True,
      'isReady': True,
      'deviceId': '0'
    },
```
A similar function exists in pyvicare for DWH part getDomesticHotWaterMinTemperature. getDomesticHotWaterMaxTemperature


Discussion / hints:

Fix patch:
diff --git a/PyViCare/PyViCareHeatingDevice.py b/PyViCare/PyViCareHeatingDevice.py
index e68be11a..13e75df0 100644
--- a/PyViCare/PyViCareHeatingDevice.py
+++ b/PyViCare/PyViCareHeatingDevice.py
@@ -432,31 +432,44 @@ def setNormalTemperature(self, temperature):
     @handleNotSupported
     def getActiveProgramMinTemperature(self):
         active_program = self.getActiveProgram()
-        if active_program in ['standby']:
+        return self.getProgramMinTemperature(active_program)
+
+    @handleNotSupported
+    def getActiveProgramMaxTemperature(self):
+        active_program = self.getActiveProgram()
+        return self.getProgramMaxTemperature(active_program)
+
+    @handleNotSupported
+    def getActiveProgramStepping(self):
+        active_program = self.getActiveProgram()
+        return self.getProgramStepping(active_program)
+
+    @handleNotSupported
+    def getProgramMinTemperature(self, program: str):        
+        if program in ['standby']:
             return None
         
-        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{active_program}")[
+        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}")[
             "commands"]["setTemperature"]["params"]["targetTemperature"]["constraints"]["min"]
 
     @handleNotSupported
-    def getActiveProgramMaxTemperature(self):
-        active_program = self.getActiveProgram()
-        if active_program in ['standby']:
+    def getProgramMaxTemperature(self, program: str):        
+        if program in ['standby']:
             return None
-       
-        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{active_program}")[
+        
+        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}")[
             "commands"]["setTemperature"]["params"]["targetTemperature"]["constraints"]["max"]
 
     @handleNotSupported
-    def getActiveProgramStepping(self):
-        active_program = self.getActiveProgram()
-        if active_program in ['standby']:
+    def getProgramStepping(self, program: str):        
+        if program in ['standby']:
             return None
-       
-        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{active_program}")[
+        
+        return self.service.getProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}")[
             "commands"]["setTemperature"]["params"]["targetTemperature"]["constraints"]["stepping"]
 
 
+
     """ Activate a program
         NOTE
         DEVICE_COMMUNICATION_ERROR can just mean that the program is already on


Test patch:
diff --git a/tests/test_Vitocal200.py b/tests/test_Vitocal200.py
index 2411726f..39edcf1b 100644
--- a/tests/test_Vitocal200.py
+++ b/tests/test_Vitocal200.py
@@ -100,4 +100,13 @@ def test_getActiveProgramMaxTemperature(self):
         self.assertEqual(self.device.getCircuit(0).getActiveProgramMaxTemperature(), 30)
 
     def test_getActiveProgramMaxTemperature(self):
-        self.assertEqual(self.device.getCircuit(0).getActiveProgramStepping(), 1)
\ No newline at end of file
+        self.assertEqual(self.device.getCircuit(0).getActiveProgramStepping(), 1)
+
+    def test_getNormalProgramMinTemperature(self):
+        self.assertEqual(self.device.getCircuit(0).getProgramMinTemperature("normal"), 10)
+
+    def test_getNormalProgramMaxTemperature(self):
+        self.assertEqual(self.device.getCircuit(0).getProgramMaxTemperature("normal"), 30)
+        
+    def test_getNormalProgramStepping(self):
+        self.assertEqual(self.device.getCircuit(0).getProgramStepping("normal"), 1)
\ No newline at end of file