Skip to content

Commit

Permalink
Fix Sinope custom attribute values (#2963)
Browse files Browse the repository at this point in the history
* Fix wrong definition for attribute values

* Add Partial_lock value for keypadLock

* Add battery_type attribute

* Add Partial_lock and Bedroom attributes values
  • Loading branch information
claudegel committed Feb 4, 2024
1 parent 1f29b72 commit ab0d248
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions zhaquirks/sinope/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class SinopeManufacturerCluster(CustomCluster):
0x0032: ("min_temperature_limit", t.int16s, True),
0x0033: ("max_temperature_limit", t.int16s, True),
0x0034: ("device_status", t.bitmap8, True),
0x0036: ("battery_type", t.uint16_t, True),
0x0200: ("status", t.bitmap32, True),
0xFFFD: ("cluster_revision", t.uint16_t, True),
}
Expand Down
1 change: 1 addition & 0 deletions zhaquirks/sinope/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class KeypadLock(t.enum8):

Unlocked = 0x00
Locked = 0x01
Partial_lock = 0x02

class FlowAlarm(t.enum8):
"""Abnormal flow alarm."""
Expand Down
6 changes: 4 additions & 2 deletions zhaquirks/sinope/thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class KeypadLock(t.enum8):

Unlocked = 0x00
Locked = 0x01
Partial_lock = 0x02

class Display(t.enum8):
"""config_2nd_display values."""
Expand Down Expand Up @@ -157,14 +158,15 @@ class SinopeTechnologiesThermostatCluster(CustomCluster, Thermostat):
class Occupancy(t.enum8):
"""set_occupancy values."""

Home = 0x00
Away = 0x01
Away = 0x00
Home = 0x01

class Backlight(t.enum8):
"""backlight_auto_dim_param values."""

On_demand = 0x00
Always_on = 0x01
Bedroom = 0x02

class CycleOutput(t.uint16_t):
"""main and aux cycle period values."""
Expand Down

0 comments on commit ab0d248

Please sign in to comment.