Skip to content

Commit

Permalink
Merge pull request #121 from golles/patch-1
Browse files Browse the repository at this point in the history
Set `device_class: occupancy` for `Zone X Occupancy` sensors
  • Loading branch information
EverythingSmartHome authored Jul 21, 2024
2 parents 6d67ae0 + a594fe5 commit 20f8377
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/ld2450-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,27 @@ binary_sensor:
|| id(target3_distance).state != 0);
- platform: template
name: "Zone 1 Occupancy"
device_class: occupancy
id: zone1_occupancy
filters:
- delayed_off: !lambda return (id(zone_1_off_delay).state * 1000);
- platform: template
name: "Zone 2 Occupancy"
device_class: occupancy
id: zone2_occupancy
filters:
- delayed_off: !lambda return (id(zone_2_off_delay).state * 1000);
disabled_by_default: true
- platform: template
name: "Zone 3 Occupancy"
device_class: occupancy
id: zone3_occupancy
filters:
- delayed_off: !lambda return (id(zone_3_off_delay).state * 1000);
disabled_by_default: true
- platform: template
name: "Zone 4 Occupancy"
device_class: occupancy
id: zone4_occupancy
filters:
- delayed_off: !lambda return (id(zone_4_off_delay).state * 1000);
Expand Down Expand Up @@ -871,4 +875,4 @@ uart:
id(zone4_occupancy).publish_state(false);
if (id(zone4_target_count).state != 0)
id(zone4_target_count).publish_state(0);
}
}

0 comments on commit 20f8377

Please sign in to comment.