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

Climate React Auto Setup bug fix #122

Merged
merged 2 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion homekit/StateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function sanitize(service, characteristic, value) {
function updateClimateReact(device) {
const smartModeState = device.state.smartMode

smartModeState.enabled = device.state.active && device.state.mode !== 'AUTO'
smartModeState.type = 'temperature'
smartModeState.highTemperatureWebhook = null
smartModeState.lowTemperatureWebhook = null
Expand Down
12 changes: 0 additions & 12 deletions sensibo/StateHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ module.exports = (device, platform) => {
// check for last update and refresh state if needed
if (!platform.setProcessing) {
platform.refreshState()
} else {
log.easyDebug('setProcessing is set to true, skip refreshing state.')
}

// return a function to update state (multiple properties)
Expand Down Expand Up @@ -131,22 +129,12 @@ module.exports = (device, platform) => {
}

const sensiboNewACState = unified.sensiboFormattedACState(device, state)
const sensiboNewClimateReactState = unified.sensiboFormattedClimateReactState(device, state)

log.easyDebug(device.name, ' -> Setting New State:')
log.easyDebug(JSON.stringify(sensiboNewACState, null, 0))

if (platform.enableClimateReactAutoSetup) {
log.easyDebug(JSON.stringify(sensiboNewClimateReactState, null, 0))
}

try {
// send state command to Sensibo

if (platform.enableClimateReactAutoSetup) {
await sensiboApi.setDeviceClimateReactState(device.id, sensiboNewClimateReactState)
benwebbbenwebb marked this conversation as resolved.
Show resolved Hide resolved
}

await sensiboApi.setDeviceACState(device.id, sensiboNewACState)
} catch(err) {
log(`${device.name} - ERROR setting ${prop} to ${value}`)
Expand Down