Hi! This is my first post on the Community forum. I’ve learned a lot over the last year or so as I’ve been getting into HA properly. Also, the Kogan Kettle was my first device that was flashable with Tasmota, which was quite an interesting experience. I got it a few months ago, and had it working in HA fairly swiftly, not least thanks to posts in this thread. However, I’ve also also worked out a few other things separately, which I wanted to share.
In the Tasmota settings for the kettle, I’ve got setOption19
turned on, of course, for easy Home Assistant discovery. I’ve also got setOption 66
enabled, which means that the full TuyaReceived stack is published to MQTT. I think that then solves the problem that @myle and @thecrane seem to be having with the state of the kettle not getting reported back to Home Assistant when you change settings on the device itself.
Temperature sensor
I don’t know if it’s because of setOption 66
, but I noticed that in my MQTT, I in fact have an ordinary decimal report of the live temperature, in TuyaReceived.DpType2Id5
. No conversion from base-16 required! Therefore, I have the following in my configuration.yaml
for the kettle temperature sensor:
- platform: mqtt
name: "Kettle temperature"
state_topic: "tele/kettle/RESULT"
unique_id: "kettle_temperature"
value_template: >
{% if 0 <= value_json.TuyaReceived.DpType2Id5 <= 100 %}
{{ value_json.TuyaReceived.DpType2Id5 }}
{% else %}
{{ states('sensor.kettle_temperature') }}
{% endif %}
unit_of_measurement: '°'
The if
…else
helps to deal with the occasional wild reading returned in that JSON element. I have the unit_of_measurement
as just ‘º’ rather than ‘ºC’ because my main installation’s unit system is imperial, but I don’t want this particular temperature reading to be converted to Fahrenheit.
Mode: keep-warm and boil
As suggested in this thread, I’ve set up an input_select
to use to control the kettle. I was using the automation proposed by @myle and then refined by rabbit-aaron, but in the last few days I’ve moved it over to Node-Red (where I have a lot of automations, although I do not claim to be an expert!). In so doing, I’ve added in some more functionality:
You can find the code for this flow on Pastebin.
Basically, what it does is to watch for changes to the input_select
(which has the options of Off, 40ºC, 50ºC, 60ºC, 80ºC, 90ºC, and Boil), and then to send the relevant command to the kettle either by MQTT, or turning on the kettle switch in Home Assistant. Meanwhile, the bottom message flow watches for changes coming in on MQTT, and updates the input_select
accordingly: changing the mode on the kettle itself is updated instantaneously in the UI.
I was aiming to slightly change the usage model for the kettle, so that the ‘keep-warm’ temperature is really now just a temperature target for the kettle: things are set so that if you set a keep-warm temperature, the kettle itself is turned off. This makes more sense with the way we use the kettle, with the different temperatures for different types of tea.