Skip to content

Commit

Permalink
Add fahrenheit threehold
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Feb 9, 2024
1 parent 4413cda commit 9121358
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/domoticz.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def getAog(device, user_id=None):
aog.traits.append('action.devices.traits.TemperatureSetting')
aog.attributes = {'thermostatTemperatureUnit': dbsettings.tempunit,
'thermostatTemperatureRange': {
'minThresholdCelsius': (minThreehold if dbsettings.tempunit == 'C' else (minThreehold-32) * 5/9),
'maxThresholdCelsius': (maxThreehold if dbsettings.tempunit == 'C' else (maxThreehold-32) * 5/9)},
'minThresholdCelsius': (minThreehold if dbsettings.tempunit == 'C' else (minThreehold-32)/1.8),
'maxThresholdCelsius': (maxThreehold if dbsettings.tempunit == 'C' else (maxThreehold-32)/1.8)},
'availableThermostatModes': ['heat', 'cool'],
}
if 'selector_modes_idx' in aog.customData:
Expand Down Expand Up @@ -359,8 +359,8 @@ def getAog(device, user_id=None):
aog.traits.append('action.devices.traits.TemperatureControl')
aog.attributes['temperatureUnitForUX'] = dbsettings.tempunit
aog.attributes['temperatureRange'] = {
'minThresholdCelsius': (minThreehold if dbsettings.tempunit == 'C' else (minThreehold-32) * 5/9),
'maxThresholdCelsius': (maxThreehold if dbsettings.tempunit == 'C' else (maxThreehold-32) * 5/9)}
'minThresholdCelsius': (minThreehold if dbsettings.tempunit == 'C' else (minThreehold-32)/1.8),
'maxThresholdCelsius': (maxThreehold if dbsettings.tempunit == 'C' else (maxThreehold-32)/1.8)}
aog.attributes['temperatureStepCelsius'] = (5 if dbsettings.tempunit == 'C' else 2.778)

if domain in ['OnOff', 'Dimmer', 'ColorSwitch']:
Expand Down

0 comments on commit 9121358

Please sign in to comment.