aboutsummaryrefslogtreecommitdiff
path: root/src/entity_sensor.rs
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-12-09 22:43:40 +0000
committerdiogo464 <[email protected]>2025-12-09 22:50:34 +0000
commit9aed552c491aaabc84e3141bc70e4d26c03efa85 (patch)
treefbf614c2c67e631d97b28b97d8d6d8168355b85d /src/entity_sensor.rs
parenta5845673cf052b606f722be10d48c5d963958050 (diff)
fixed warnings/lints
Diffstat (limited to 'src/entity_sensor.rs')
-rw-r--r--src/entity_sensor.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/entity_sensor.rs b/src/entity_sensor.rs
index 1168c37..e221141 100644
--- a/src/entity_sensor.rs
+++ b/src/entity_sensor.rs
@@ -19,7 +19,9 @@ impl StateClass {
19} 19}
20 20
21#[derive(Debug, Clone, Copy, PartialEq, Eq)] 21#[derive(Debug, Clone, Copy, PartialEq, Eq)]
22#[derive(Default)]
22pub enum SensorClass { 23pub enum SensorClass {
24 #[default]
23 Generic, 25 Generic,
24 ApparentPower, 26 ApparentPower,
25 Aqi, 27 Aqi,
@@ -75,11 +77,6 @@ pub enum SensorClass {
75 Other(&'static str), 77 Other(&'static str),
76} 78}
77 79
78impl Default for SensorClass {
79 fn default() -> Self {
80 SensorClass::Generic
81 }
82}
83 80
84impl SensorClass { 81impl SensorClass {
85 pub fn as_str(&self) -> Option<&'static str> { 82 pub fn as_str(&self) -> Option<&'static str> {