In looking at this, I am not sure you can get a state of “charging” … I kinda made that up. It really is either:
Fully Charged (battery_level > 100)
or Discharging (battery_level < 100)
There is no state information really that it is plugged in and charging. At the very least you can do what I did which is warning you if the battery goes below 25%
I take that back. I just let my device get down to like 50% and it showed 50% as the battery level. I plugged it in and it says “charging” … what it does not do (which I am sure you could do) is say
charging (50%)
Now, just because … If you look at the state you get something like this:
just letting you know you can do battery with battery-state-entity card.
also in the tuya integration you can set scaling factor to 0.001 so you dont have to do /1000 calculations
im using a IBBQ-4BQ so not sure if code applies to you
Thanks but not sure it applies but I guess I could test. Simply put there is only one attribute … the value is like “6300” or “63” … “6300” if it is charging and at “63%” or “63” if not-charging and at “63%”
Looks great!
One question:
Will it flood the logs when the iBBQ is offline. Let me say my iBBQ is online for round about 3 hours per week so it makes no sense when it floods the log in the rest of the time.
Getting the correct °F or °C no longer seems to work (perhaps since 2022.4 and the unit change?
I think it might be this https://github.com/rospogrigio/localtuya/issues/794 (native_unit_of_measurement).
Anyone else have this problem?
Hi All - Sorry to revive this however I am trying to add the Inkbird IBBQ4T to my home assistant via LocalTuya however I am having a strange issue. I have added the Inkbird to Tuya Smart no problem and I have done all the necessary work in IOT Tuya. However when I go to add the device in HA, it gives me a list of all the IDs from 1 to 111 however it completely misses 106-110 inclusive, where the temp values are.
Has anyone experienced this before? I know my localtuya is setup correctly in iottuya as I have a tuya dimmer working through it no problems. However for the life of me I can’t work out why it is not providing ID 106-110? All I can think of is problems being added to the tuya smart app properly - this is how the data is providing in the app which seems off. Doesn’t display any temp data.
Dear all,
i got my IBBQ-4BW working with Home assistant. Installed it first via tuya app on the android phone the i implemted it with local tuya in HA. I got all sensors/sitches. My issue is the automatic conversion of F to C. I tried with °F as i have a metric system. But HA always displays F (i even used/copied ‘°’ from the thread, As pointed out above: is this an issue of HA (so i would try to configure template sensors for C). Or is this a mistake/misunderstanding on my side? Thanks for any hints. fred
Hi @lockytaylor - im having exactly the same issue - only had mine for <48hours…so working thorugh it… anyone knows the answer please post - also now having the temp scale issue since updating thismorning so more on that going to try °F & °C
seems like LocalTuya and 2023.5.2 doesnt want to save the last entity change, regadless of the type - i thought it was the °F & °C turns out it was any change and wouldnt commit the last ID change - i rolled back to 2023.4.6 and it was ok.
On the “missing” entities IDs 107,108,109,110… I added uting the manual DPS option and now have probe_one (107) showing a string of all sensors rather than individual probes as i expected to see when i got all 11 known entities to show up. I dont have the protocol or have searched much on using this string.
I have been investigiating the changing of instruction from standard to DP instruction - although looked like I was getting somewhere…doesnt seem to make much difference to whats being accessed in LocalTuya
Hi @DJL9999 , did you have any luck with resolving this? Mine seems to be doing a similar thing with the 107 DPS except it’s showing a value of ‘aBoAAZYeAAH2/wkB9v8JAQ==’. I can’t seem to get any temperatures out of the device via the localtuya integration.
Hey all! This thread seems to be the best source of information on how this thermometer is set up, so I thought I’d add some information on how DPS/datapoints 120 through 123 function.
These are the thermometer alarm mode and setpoints set in hex, with a bit of rearranging. I’ll do my best to explain…
Flip the first and second byte values to get the temp value in HEX
Example: Set a Temp Range of Min 32F to Max 590F
Use an alarm mode of Temp Range (11)
32F
Decimal integer x10 is 320
Hex is 0140
Flip the 01 and 40 byte values: 40.01
590F
Decimal integer x10 is 5900
Hex is 170C
Flip the 17 and 0C byte values: 0C.17
Resulting datapoint value: 11.0C.17.40.01
I’ve been busy converting all my Tuya devices over to ESPHome (both native esp8266 and BK7231-based libretiny), and this thermometer is one of my last remaining devices to convert. When I finish setting up the ESPHome yaml for it, I’ll dump the config here.