Skip to content

Commit 1a938af

Browse files
chore: add measure unit to temperature and luminosity
1 parent 45d4592 commit 1a938af

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/main/kotlin/entities/environment/EnvironmentData.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,30 @@ object EnvironmentData {
2222
/**
2323
* The temperature of the room.
2424
* @param temperatureValue the temperature of the room.
25+
* @param temperatureUnit the temperature unit.
2526
*/
26-
data class Temperature(val temperatureValue: Double)
27+
data class Temperature(val temperatureValue: Double, val temperatureUnit: TemperatureUnit)
2728

2829
/**
2930
* The luminosity of the room.
3031
* @param luminosityValue the luminosity value of the room.
32+
* @param luminosityUnit the luminosity unit.
3133
*/
32-
data class Luminosity(val luminosityValue: Double)
34+
data class Luminosity(val luminosityValue: Double, val luminosityUnit: LuminosityUnit)
3335

3436
/**
3537
* The presence of a person inside the room.
3638
* @param presenceDetected true if is a person detection event, false otherwise.
3739
*/
3840
data class Presence(val presenceDetected: Boolean)
41+
42+
/** The temperature unit. **/
43+
enum class TemperatureUnit {
44+
CELSIUS
45+
}
46+
47+
/** The luminosity unit. **/
48+
enum class LuminosityUnit {
49+
LUX
50+
}
3951
}

0 commit comments

Comments
 (0)