Fixes https://github.com/esphome/issues/issues/564 partly. At least the error message will now be a better one.