Context:
I’m building a HA wireless yoghurt maker as a project. 97% finished but I’m struggling with a step.
I have set up a climate entity in HA where I can set the desired temp for the maker to hold at and a timer.
The climate entity is ‘climate.yoghurtmaker’ and I need to pull the temperature value that is set in the dashboard. I am trying to display the set temp and the actual temp on the OLED screen.
I understand that I need to use the -platform: homeassistant code to pull in the sensor data to the ESP8266 that will run the code on the device. What I can’t figure out is where that code goes.
If I add the following under the configuration.yaml, I get an error;
There is no climate platform for homeassistant in esphome, like there is for sensor.
You could break the HA climate entity out into current_temperature and temperature with HA template sensors, then import them to esphome via homeassistant sensors.
OK, that was a great tip. thank you. I now have the Developer Tools showing the value that is set in the dashboard.
On teh yaml for the ESP8266, it is throwing an error and although I have spent some time reading the it.printf manual, I can’t figure out if this is a HA error or not.
In Dev Tools, the sensor is shown as ‘sensor.yoghurt_settemp’. Lets say the value is 104.
Where the ?? are, I can’t figure out what needs to go there. Line above works OK but that is pulling temp data directly from the dallas connected to the board. The bottom line is trying to pull the data from the HA template sensor but ‘id’ creates an error that the id cannot be found (I created a unique_id: entry in the template) and neither does ‘sensor(yoghurt_settemp).state);’
No apologies, please. You are a superstar in this community and you helped me to overcome the frustration and push forward and learn new stuff.
I’m almost done with this project so I might see if I can figure out blueprints so I can share. Seems there are no decent yoghurt makers out there with decent functionality.
I didn’t realise you could do that, I thought it had to be an attribute of a ha sensor, didn’t realse you could use the attribute from a different domain. Obviously my reading skills let me down.
Sorry for the delay, I got dragged off on other stuff.
So, am I interpreting correctly here that the climate yaml can now go in the ESPhome yaml file and I then access that from a climate card in the HA dashboard?
That would make things way easier but then, when the device is offline, would throw a ‘device not found’ error but somewhere in the back of my mind I think there is a conditional card that I may be able to use to only show that control when the device is online.
Well, I could go back and delete that last post but I think it might help someone else with the same thought to leave it there.
Climate stays in the configuration.yaml but no need to break out the sensors with templates in the configuration.yaml. THAT is the part that ESPhome can do directly now.
hi mark , i am trying to do similar thing , i have the voltage reading of my solar cell in home assistant and i am using the following to get the data displayed on a display but its not picking up any data , if i put a static value it prints, any thoughts
i2c:
sda: D2
scl: D1
scan: true
font:
file: “Roboto-Regular.ttf” # Ensure this path is correct
id: my_font12 # Font size 12
size: 12
file: “Roboto-Regular.ttf”
id: my_font16 # Font size 16
size: 16
I suspect that the issue lies in the representation of the id(volt).state variable as I cannot see anything out of place in the rest of the code based on your statement that it works with a static variable.
Take a look at the value AND the type of data that is coming off the volts sensor. It may be that you need to run it through a template and then utilise that template sensor for the display variable. I had to do this with displayed values for uptime metrics when others like temperature and humidity represented directly and correctly.
I removed the D1 mini from home assistant and flashed it add it to home assistant and it started working , so i am thinking, although I was not seeing any API errors it was not properly connected, anyway i am glad its working , that was a 2 month pending project
Cheers