Skip to content

Getting data from Home Assistant into Tasmota #20233

Answered by richardsg307
richardsg307 asked this question in Q&A
Discussion options

You must be logged in to vote

I've got it totally working on my breadboard with my old ESP8266 still attached to the boiler and reporting to Home Assistant. So, as promised here's the solution.
The autoexec.be

import haspmota
import string
haspmota.start()

tasmota.add_cmd('BoilerStats',
  def (cmd, idx, payload, raw)
    print(
      cmd,     # command name
      idx,     # index glued on to command name, or 0
      payload,  # payload as string
      raw)     # If payload was in JSON format, a map with the parsed data
    global.p1b35.text = string.format("%5.2fHrs",raw["Hours"])
    global.p1b36.text = string.format("%5.2fL",raw["Oil"])
    global.p1b37.text = string.format("%5.2fKWh",raw["KWh"])
    global.p1b38.t…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
9 replies
@richardsg307
Comment options

@richardsg307
Comment options

@sfromis
Comment options

@richardsg307
Comment options

@sfromis
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by richardsg307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants