Fixed typo that was causing dew point errors.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import CoreUnitTypes
|
||||
import Logging
|
||||
import Models
|
||||
import MQTTNIO
|
||||
import NIO
|
||||
@@ -55,7 +56,7 @@ extension MQTTNIO.MQTTClient {
|
||||
let subscription = MQTTSubscribeInfoV5.init(
|
||||
topicFilter: sensor.topic,
|
||||
qos: .atLeastOnce,
|
||||
retainAsPublished: true,
|
||||
retainAsPublished: false,
|
||||
retainHandling: .sendAlways
|
||||
)
|
||||
return v5.subscribe(to: [subscription])
|
||||
@@ -137,3 +138,13 @@ extension EventLoopFuture where Value == Temperature {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension EventLoopFuture {
|
||||
|
||||
func debug(logger: Logger?) -> EventLoopFuture<Value> {
|
||||
map { value in
|
||||
logger?.debug("Value: \(value)")
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user