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

Linptech Temperature Humidity Sensor KS2 #1539

Open
meineihan opened this issue Jan 10, 2025 · 0 comments
Open

Linptech Temperature Humidity Sensor KS2 #1539

meineihan opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@meineihan
Copy link

from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [{
    21003: ["Linptech", "Temperature Humidity Sensor KS2", "KS2BB", "linp.sensor_ht.ks2bb"],
    "spec": [
        # main sensors
        BLEFloatConv("temperature", "sensor", mi=18433, round=1),  # float
        BLEFloatConv("humidity", "sensor", mi=18440, round=1),  # float
        BLEByteConv("battery", "sensor", mi=20483),  # uint8
        MathConv("temperature", mi="2.p.1001", round=1),
        MathConv("humidity", mi="2.p.1002", round=1),
        BaseConv("battery", mi="4.p.1003", entity=ENTITY_LAZY),
        BaseConv("action", "sensor"),
        ConstConv("action", mi="5.e.1012", value=BUTTON_SINGLE),
        ConstConv("action", mi="5.e.1013", value=BUTTON_DOUBLE),
        ConstConv("action", mi="5.e.1014", value=BUTTON_HOLD),
    ],
}] + DEVICES

QQ图片20250110142239

@AlexxIT AlexxIT added the enhancement New feature or request label Jan 10, 2025
@AlexxIT AlexxIT self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants