I am trying to get my solar battery level to display in the Home app for my other half.
I have created some template sensors i can get it to show up as humidity but its a hassle to get it to display. I also tried a battery sensor but that adds it if i click on a tile for the deye/sunsynk then settings (it shows battery in there). What’s the best way to get a tile that shows the battery %
You must mark the YAML up as code here in the forum, otherwise the indentation will be broken and it is impossible for anyone to correctly interpret the code.
But start by reading the HomeKit Bridge documentation. It explicitly lists configuration variables linked_battery_sensor and low_battery_threshold for your purpose.
Also I wouldn’t expect your first sensor to work, as your value_template returns a string when a number is expected. You need to cast the output of states to a float or int, as you already do in the second sensor.
Thank you for your reply sorry i fixed the code. I am not a expert in code just muddling along but getting there (with chatgpt help)
I did read the homekit docs and i did not want a linked battery (which is what i believe has happened in the second example). I just want tile that she can see (much like a lamp one that says 100% etc but the battery %).