From e5416e848c8caeed59e8aca6fb3e191fbc621b1b Mon Sep 17 00:00:00 2001 From: diogo464 Date: Sat, 6 Dec 2025 14:31:54 +0000 Subject: Refactor sensor API to support generic sensor types with configurable display precision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced TemperatureSensor with a generic Sensor type that accepts sensor class, state class, unit, and display precision to support various sensor types. Added suggested_display_precision field to control decimal places in Home Assistant UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/entity.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/entity.rs') diff --git a/src/entity.rs b/src/entity.rs index ac15921..ef2b9ad 100644 --- a/src/entity.rs +++ b/src/entity.rs @@ -33,4 +33,5 @@ pub struct EntityConfig { pub max: Option, pub step: Option, pub mode: Option<&'static str>, + pub suggested_display_precision: Option, } -- cgit