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

Setting Fan speed settings or mode does not turn on fan even with sendStateWith option set to true #37

Open
hooverds54 opened this issue Jan 13, 2023 · 2 comments

Comments

@hooverds54
Copy link

I am having some basic issues using the fan-percent-button-row in that while the speed setting is being set properly he fan state is off so there seems to be no way to turn fan on. I can see he speed setting changing because I also have the Tuya SMart App and can see the speed changing. Further the speed setting is visible using the custom row if the fan is turned on. I am using 10 50 and 100 because in diagnostics below there are 3 speeds and they are set as 1,2, or 3.

In theory I think I should be using the fan-mode-button-row but I was having issues there as well.

Setting the speed does not turn on the fan for either custom row type.

Here is configuration followed by the diagnostics of the device.

  • type: custom:fan-percent-button-row
    entity: fan.smart_fan_table
    name: Table Fan
    icon: mdi:ceiling-fan
    lowPercentage: 10
    medPercentage: 50
    hiPercentage: 100
    sendStateWithspeed: true
  • type: custom:fan-mode-button-row
    entity: fan.smart_fan_doorway
    name: Doorway Fan
    icon: mdi:ceiling-fan
    sendStateWithMode: true

Here is the diagnostics for the fan device. and in the fan speed section you can see there are three settings for speed 1,2,3

"data": {
"endpoint": "https://openapi.tuyaus.com",
"auth_type": 0,
"country_code": "1",
"app_type": "smartlife",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "Smart Fan Doorway",
"model": "JF-068",
"category": "fsd",
"product_id": "bympa4fk5gsapyr1",
"product_name": "Smart Fan",
"online": true,
"sub": false,
"time_zone": "-04:00",
"active_time": "2022-09-12T14:57:38+00:00",
"create_time": "2022-09-12T14:57:38+00:00",
"update_time": "2023-01-06T23:38:15+00:00",
"function": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"white",
"colour",
"scene",
"music"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "String",
"value": {
"maxlen": 255
}
},
"countdown": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"fan_switch": {
"type": "Boolean",
"value": {}
},
"fan_speed": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 3,
"scale": 0,
"step": 1
}
},
"countdown_left_fan": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 540,
"scale": 0,
"step": 1
}
},
"fan_beep": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"white",
"colour",
"scene",
"music"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "String",
"value": {
"maxlen": 255
}
},
"countdown": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"fan_switch": {
"type": "Boolean",
"value": {}
},
"fan_speed": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 3,
"scale": 0,
"step": 1
}
},
"countdown_left_fan": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 540,
"scale": 0,
"step": 1
}
},
"fan_beep": {
"type": "Boolean",
"value": {}
},
"fault": {
"type": "Bitmap",
"value": {
"label": [
"motor_fault"
]
}
}
},
"status": {
"switch_led": true,
"work_mode": "white",
"bright_value": 208,
"scene_data": "",
"countdown": 0,
"fan_switch": false,
"fan_speed": 2,
"countdown_left_fan": 0,
"fan_beep": false,
"fault": 0
},

@hooverds54
Copy link
Author

It feels like I am just not sending or receiving the correct mode "string" my device appears to be expecting 1,2,or 3 but am I sending "low", "medium" and "high" for the fan-mode-button row when I click on any of the speed buttons the fan starts but the speed is not being set.

For the fan-percent-button-row the speed is set correctly if the off is off but the fan does not start and if the fan is on then it is only possible to set the speed to high or medium but setting the speed never turns on the fan.

I am perplexed.

@hooverds54
Copy link
Author

After further tweaking I am now using the fan-percent-button-row with limited success. It appears all hte button are correctly setting the speed but there remains an issue with the display of the buttons. The "High" setting is always right but the "Med" setting is never highlighted even though the speed is set properly and when it is in the "med" setting the "low" button is highlighted. The off button is mostly working but sometimes does not work when the fan is on "low" I first have to switch to high to turn off. Still quirky in some sense.

Part of the issue is that my fan control has setting of 1 , and 3 but it seems that setting percentage of anything over 52 will set the medium speed and setting the high as 100 sets the high speed. anything under 51 is set to low speed . Here is abbreviated setup

  • type: custom:fan-percent-button-row
    entity: fan.smart_fan_table
    name: Table Fan
    allowDisablingButtons: false
    customSetpoint: true
    customThemes: true
    offPercentage: 0
    lowPercentage: 33
    medPercentage: 66
    hiPercentage: 100
    sendStateWithSpeed: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant