diff options
author | Daniel Høyer Iversen <mail@dahoiv.net> | 2018-03-31T13·57+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31T13·57+0200 |
commit | 3b6b55ae73dd4fffd3f3e089ca6a7912ff0fdf79 (patch) | |
tree | f437f0ca33ec11b3893515143169692949b9c4ee /broadlink/__init__.py | |
parent | e9f4bb6372705045a723963f13ab51b585304b78 (diff) | |
parent | e9748ff0b4f36da2722ef0f84b812069812634af (diff) |
Merge pull request #164 from horse315/master
fixed Hysen thermostat ctor & added comments
Diffstat (limited to 'broadlink/__init__.py')
-rw-r--r-- | broadlink/__init__.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 5dc29192c75e..a3fadf5dd93e 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -69,7 +69,7 @@ def gendevice(devtype, host, mac): elif devtype == 0x4EB5 or devtype == 0x4EF7: # MP1: 0x4eb5, honyar oem mp1: 0x4ef7 return mp1(host=host, mac=mac, devtype=devtype) elif devtype == 0x4EAD: # Hysen controller - return hysen(host=host, mac=mac) + return hysen(host=host, mac=mac, devtype=devtype) elif devtype == 0x2722: # S1 (SmartOne Alarm Kit) return S1C(host=host, mac=mac, devtype=devtype) elif devtype == 0x4E4D: # Dooya DT360E (DOOYA_CURTAIN_V2) @@ -684,6 +684,15 @@ class hysen(device): # print 'Mode byte: 0x'+ format(mode_byte, '02x') self.send_request(bytearray([0x01,0x06,0x00,0x02,mode_byte,sensor])) + # Advanced settings + # Sensor mode (SEN) sensor = 0 for internal sensor, 1 for external sensor, 2 for internal control temperature, external limit temperature. Factory default: 0. + # Set temperature range for external sensor (OSV) osv = 5..99. Factory default: 42C + # Deadzone for floor temprature (dIF) dif = 1..9. Factory default: 2C + # Upper temperature limit for internal sensor (SVH) svh = 5..99. Factory default: 35C + # Lower temperature limit for internal sensor (SVL) svl = 5..99. Factory default: 5C + # Actual temperature calibration (AdJ) adj = -0.5. Prescision 0.1C + # Anti-freezing function (FrE) fre = 0 for anti-freezing function shut down, 1 for anti-freezing function open. Factory default: 0 + # Power on memory (POn) poweron = 0 for power on memory off, 1 for power on memory on. Factory default: 0 def set_advanced(self, loop_mode, sensor, osv, dif, svh, svl, adj, fre, poweron): input_payload = bytearray([0x01,0x10,0x00,0x02,0x00,0x05,0x0a, loop_mode, sensor, osv, dif, svh, svl, (int(adj*2)>>8 & 0xff), (int(adj*2) & 0xff), fre, poweron]) self.send_request(input_payload) |