Esp8266 fake temp sensor


Im trying to ”fake” a temp sensor.

I want to use an esp8266 to send out a ”fake” temp reading that i will be sending via home assistant.

The temp input is a normal 2 wire, im really a hardcore newbie when it comes to esp8266 so if anyone could help me with the wiring and code snippets that would be amazing!

Dont even know if this is possible so be patient with me.

I am confused - is it fake or not? Why do you need a temperature input if you want to send fake readings?

Sorry for the bad explaination.

I need to send the ”fake” temp signal into a master that is currently using a thermistor for temp readings. 2 wire input on the master.

Still not sure what you want to do.

If you want a random value as a sensor, add a template sensor in ESPHome. The example below will output a random value between -30 and 50:

  - platform: template
    name: "Random temperature"
    lambda: |-
      return std::rand() % 81 - 30;
    update_interval: 15s
    unit_of_measurement: "°C"
    device_class: "temperature"