Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support Smartlife Plant Sensor SGS01 #1693

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions custom_components/tuya_local/devices/ble_smart_plant_moisture.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Moisture sensor
products:
- id: bfbf6c7bb11573ed23j4ya
name: SGS01
primary_entity:
entity: sensor
name: Soil Moisture
class: humidity
dps:
- id: 3
name: sensor
type: integer
force: true
unit: "%"
secondary_entities:
- entity: sensor
name: Soil Temperature
class: temperature
dps:
- id: 5
name: sensor
type: integer
mapping:
- scale: 10
unit: C
- entity: select
translation_key: temperature_unit
category: config
dps:
- id: 9
name: option
type: string
mapping:
- dps_val: "c"
value: "C"
- dps_val: "f"
value: "F"
- entity: sensor
class: battery
category: diagnostic
dps:
- id: 14
almirus marked this conversation as resolved.
Show resolved Hide resolved
type: string
name: state
- id: 15
type: integer
name: sensor
unit: "%"
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Smart curtain robot
products:
- id: kcy0x4pi
name: Dongguan LY1678-2 Electric Curtain Motor
primary_entity:
entity: cover
name: Curtain
class: curtain
dps:
- id: 1
name: control
type: string
mapping:
- dps_val: open
value: open
- dps_val: close
value: close
- dps_val: stop
value: stop
- id: 3
name: current_position
type: integer
unit: "%"
range:
min: 0
max: 100
mapping:
- invert: true
optional: true
persist: false
- id: 7
name: action
type: string
mapping:
- dps_val: opening
constraint: current_position
conditions:
- dps_val: 0
value: opened
- value: opening
- dps_val: closing
constraint: current_position
conditions:
- dps_val: 100
value: closed
- dps_val: null
value: closed
- value: closing
- id: 12
name: fault_code
type: bitfield
secondary_entities:
- entity: select
category: config
name: Closed position
icon: "mdi:arrow-u-down-left"
dps:
- id: 101
type: string
name: option
mapping:
- dps_val: "left"
value: "left"
- dps_val: "right"
value: "right"
- entity: sensor
class: temperature
dps:
- id: 103
name: sensor
type: integer
unit: C
class: measurement
- entity: sensor
class: illuminance
dps:
- id: 104
name: sensor
type: integer
unit: lx
class: measurement
- entity: sensor
class: battery
category: diagnostic
dps:
- id: 13
type: integer
name: sensor
unit: "%"
Loading
Loading