Skip to content

Commit

Permalink
Fix linting and refactor to entities
Browse files Browse the repository at this point in the history
  • Loading branch information
akop committed Jan 4, 2025
1 parent 45fa0c2 commit aa3148a
Showing 1 changed file with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,41 @@ products:
# https://github.com/FlagX/ha-ledvance-tuya-resync-localkey
#
# https://github.com/rospogrigio/localtuya/wiki/HOWTO-get-a-DPs-dump
#DEBUG:localtuya.pytuya:[bfa...aly] Deciphered data = '{"dps":{"20":false,"22":410,"23":1000,"24":"004803e8018f","26":0,"41":true}}'
#AVAILABLE DPS ARE [{'20': False, '22': 410, '23': 1000, '24': '004803e8018f', '26': 0, '41': True}]
#
# DPS [20] VALUE [False] on off switch
# DPS [21] VALUE [scene] ?
# DPS [22] VALUE [400] main led brightness
# DPS [23] VALUE [200] main led color temp
# DPS [24] VALUE [0136019a0348] rgb led color
# DPS [26] VALUE [0] rgb led brightness
# DPS [41] VALUE [False] ?
primary_entity:
entity: switch
dps:
- id: 20
type: boolean
name: switch
secondary_entities:
entities:
- entity: light
name: Main LED
translation_key: main
dps:
- id: 20
type: boolean
name: switch
- id: 22
name: brightness
type: integer
range:
min: 0
max: 1000
- id: 23
name: color_temp
type: integer
range:
min: 0
max: 500
mapping:
- target_range:
min: 2700
max: 6500
- entity: light
name: RGB LED
translation_key: rgb
category: config
dps:
- id: 20
Expand Down Expand Up @@ -54,26 +71,3 @@ secondary_entities:
range:
min: 0
max: 1000
- entity: light
name: Main LED
category: config
dps:
- id: 20
type: boolean
name: switch
- id: 22
name: brightness
type: integer
range:
min: 0
max: 1000
- id: 23
name: color_temp
type: integer
range:
min: 0
max: 500
mapping:
- target_range:
min: 2700
max: 6500

0 comments on commit aa3148a

Please sign in to comment.