Closed felipecrs closed 1 year ago
Having the same issue here
@felipecrs , @nhailong which version are you on?
v3.6.4
The simplest cause for this I can think of is that the device is either not a gateway or it somehow has DPs - the code now assumes that a gateway does not have DPs so if it finds any the "is gateway" checkbox is basically disregarded. You could eliminate this hypothesis by either going to the next step in the flow and seeing if any DPs are available or in the Tuya Cloud console by checking Device Specification
Makes sense.
This is the output for my bluetooth & zigbee hub:
{
"result": {
"category": "wg2",
"functions": [
{
"code": "switch_alarm_sound",
"lang_config": {
"false": "",
"true": ""
},
"name": "Switch alarmsound",
"type": "Boolean",
"values": "{}"
},
{
"code": "master_state",
"lang_config": {
"alarm": "",
"normal": ""
},
"name": "Master state",
"type": "Enum",
"values": "{\"range\":[\"normal\",\"alarm\"]}"
},
{
"code": "factory_reset",
"lang_config": {
"false": "",
"true": ""
},
"name": "Factory reset",
"type": "Boolean",
"values": "{}"
},
{
"code": "alarm_active",
"lang_config": {
"unit": ""
},
"name": "Alarm active",
"type": "String",
"values": "{\"maxlen\":255}"
}
],
"status": [
{
"code": "switch_alarm_sound",
"lang_config": {
"false": "",
"true": ""
},
"name": "Switch alarmsound",
"type": "Boolean",
"values": "{}"
},
{
"code": "master_state",
"lang_config": {
"alarm": "",
"normal": ""
},
"name": "Master state",
"type": "Enum",
"values": "{\"range\":[\"normal\",\"alarm\"]}"
},
{
"code": "factory_reset",
"lang_config": {
"false": "",
"true": ""
},
"name": "Factory reset",
"type": "Boolean",
"values": "{}"
},
{
"code": "alarm_active",
"lang_config": {
"unit": ""
},
"name": "Alarm active",
"type": "String",
"values": "{\"maxlen\":255}"
}
]
},
"success": true,
"t": 1674572793476,
"tid": "b07b47329bf811ed858bc232723a3483"
}
That's interesting. I assume it makes sense that some gateways would also expose some functions - it seems that this gateway is alarm related. I guess in this case the logic is in order and it should be ok for you to add a entity just to be able to set it up.
Hm... that makes sense, but what if I don't want to add any entity? I think it would be helpful to have an option like Do not prompt for adding entities in this case.
I believe this is the paradigm for LocalTuya in general - I am not sure you can add a non-gateway device without adding any of its entities. So although I see your point, this approach would also make sense in this case.
Hi, @felipecrs ! I added the second gateway I had not used and, concidence, it's the same as yours. So I found an easy way to add an option in the config flow for this. Opened a PR which is referenced above.
@felipecrs, can you test the latest release (3.6.6) and confirm it's ok?
I tried to add my hub today again but for some reason it's failing with Unknown error. Checking the logs it says it timeouts.
It should be a problem with my hub, so let's close this issue. Thanks a lot!
I have a Bluetooth gateway which is a socket with relay and power measurement. ALUSSO Gateway
that might also fix this conflict.
I've tried to is_gateway: false
in configuration.yaml but the BL light becomes unavailable by doing this!
I need to have is_gateway: true
& define entities for the Hub at the same time
I think it was not supposed to do that. Was it?
https://user-images.githubusercontent.com/29582865/212754433-2cae7166-3e24-4d1a-ae30-570477a90bf9.mp4