Template show unavailable

You should format your code properly so it won’t be messed up by the forum, but it seems like your keyboard changed all quotes to curly ones. Those won’t work. If you have this ‘feature’ set to on in keyboard settings, you’d be wise to turn it off. But it could also be the forum doing so. So please format the code properly. See nr 11 here:

Always test your templates in developer tools first, that saves you a ton of trouble.

Also note you are using the old style notation. It is best to switch to the new style, and also add an availability temp,ate for when base sensors are unavailable.