To me it seems, that this is correct YAML-code, but I cannot find the reason for the error “Invalid config for [template]: expected dictionary for dictionary value @ data[‘sensors’].” Can someone please help me ?!
Remove the friendly_name option; it’s not supported.
Supply the float filter with a default value. For example, if the states() function doesn’t report a string value that can be converted to a number, float(0) will report 0. If you don’t specify a default value and float is unable to convert the supplied string value, it will produce an error.
Thanks, now the error doesn’t show up but I cannot find my new sensor.
Maybe it is a stupid question, I’m just started to work with template sensors …but were could I find the sensors?
It doesn’t show up in my Entities, Integrations or Devices
After you modify configuration.yaml, execute Developer Tools > YAML > Check Configuration. If it passes that test, execute Developer Tools > YAML > Reload Template Entities. Errors will be reported in the Log and sometimes as a Persistent Notification.
If there’s an error, you’ll need to correct it.
If there’s no error, look for the entity (sensor.temperature_difference_inout) in Developer Tools > States or in Settings > Devices & Services > Entities (if it exists it will be visible in both places).
Do you have more than one instance of template: in your configuration file?
It’s intended “effect” is to prevent the error I described in my previous post. Its presence or absence doesn’t determine if the sensor entity is created or not.
Does your configuration.yaml file contain more than one instance of the template: key word? Check the file from the beginning to the end (i.e. use a text editor to search the file for template). There should be just one instance of it.
Based on my experience, if you’re creating the very first Template entity, a restart is required. Using “Reload All YAML configuration” doesn’t seem to do the job in this particular case.
After the first Template entity is loaded, any additional Template entities you configure can be loaded using “Reload Template Entities” (or “Reload All YAML configuration”); a restart isn’t needed.