Skip to content

Add FDS315 Owon fall sensor#9488

Merged
Koenkk merged 9 commits into
Koenkk:masterfrom
Pastor02:add-fs315-owon
Jun 17, 2025
Merged

Add FDS315 Owon fall sensor#9488
Koenkk merged 9 commits into
Koenkk:masterfrom
Pastor02:add-fs315-owon

Conversation

@Pastor02

Copy link
Copy Markdown
Contributor

Add converter together with from and to for OWON FDS315 drop sensor

Comment thread src/converters/toZigbee.ts Outdated
},
};

export const owonFds315SetFallSettings: Tz.Converter = {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move both the fromZigbee and toZigbee changes into owon.ts under a tzLocal/fzLocal, example:

Comment thread src/converters/fromZigbee.ts Outdated
0: "Unoccupied",
1: "Occupied",
2: "Sitting",
3: "On the bed",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3: "On the bed",
3: "on_the_bed",

Make all snake_case

Comment thread src/converters/fromZigbee.ts Outdated
const code = data.status;
result.status = statusMapping[code] || `Unknown (${code})`;
}
if (data.breathingRate !== undefined) result.breathingRate = data.breathingRate;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (data.breathingRate !== undefined) result.breathingRate = data.breathingRate;
if (data.breathingRate !== undefined) result.breathing_rate = data.breathingRate;

Also make all of these snake_case

Comment thread src/devices/owon.ts Outdated
exposes: [
e.enum("status", ea.STATE, ["unoccupied", "occupied", "sitting", "on_the_bed", "low_posture", "falling"]),
e.numeric("breathing_rate", ea.STATE).withUnit("breaths/min").withDescription("Breathing rate."),
e.numeric("locationX", ea.STATE).withUnit("cm").withDescription("X coordinate of human activity."),

@Koenkk Koenkk Jun 16, 2025

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
e.numeric("locationX", ea.STATE).withUnit("cm").withDescription("X coordinate of human activity."),
e.numeric("location_x", ea.STATE).withUnit("cm").withDescription("X coordinate of human activity."),

(same for location Y)

Comment thread src/devices/owon.ts Outdated
result.status = status_mapping[code] || `Unknown (${code})`;
}
if (data.breathing_rate !== undefined) result.breathing_rate = data.breathing_rate;
if (data.locationX !== undefined) result.locationX = data.locationX;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (data.locationX !== undefined) result.locationX = data.locationX;
if (data.locationX !== undefined) result.location_x = data.locationX;

(same for location Y)

@Koenkk Koenkk merged commit fcd75dd into Koenkk:master Jun 17, 2025
3 checks passed
@Koenkk

Koenkk commented Jun 17, 2025

Copy link
Copy Markdown
Owner

Thanks!

rohankapoorcom pushed a commit to rohankapoorcom/zigbee-herdsman-converters that referenced this pull request Jun 20, 2025
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
SimplaHome pushed a commit to SimplaHome/zigbee-herdsman-converters that referenced this pull request Aug 15, 2025
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants