I really loathe the deployment method for #HomeAssistant template sensors (for sensors based on expressions): it's basically "fuck around and find out" every time...

I wonder if nixifying the setup would make it more bearable, or if there's a better way to deploy sensors as small code units that can be verified in isolation...

A YAML-less solution would be best...

@ocramius i guess you’re aware you can test your templates in “Developer Tools->Templates”. This in combination with setting the state of the upstream sensor manually, also in Dev Tools usually works pretty well for me
@wmr72 aware of it, but then you still have to delicately transplant the result into a YAML config file, and in the correct section/nesting too, considering quoting semantics in the process
@ocramius I guess you could use the Developer Tools -> Template page to pefect your template first before adding it. I've done that a few times to check or correct and incorrect template.
@anxiumer18539 yeah, done it a lot of times, and it's too fragile to work that way (especially the final move to config file)