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

Fix AMS humidity values to match new Bambu Handy/Studio values #502

Merged
merged 1 commit into from
Apr 20, 2024
Merged
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
3 changes: 2 additions & 1 deletion custom_components/bambu_lab/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ class BambuLabBinarySensorEntityDescription(BinarySensorEntityDescription, Bambu
translation_key="humidity_index",
icon="mdi:water-percent",
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda self: self.coordinator.get_model().ams.data[self.index].humidity_index
value_fn=lambda self: 6 - self.coordinator.get_model().ams.data[self.index].humidity_index
# We subtract from 6 to match the new Bambu Handy/Studio presentation of 1 = dry, 5 = wet while the printer sends 1 = wet, 5 = dry
),
BambuLabSensorEntityDescription(
key="temperature",
Expand Down
Loading