mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Fixes
This commit is contained in:
		| @@ -19,9 +19,9 @@ class Servo : public Component { | |||||||
|  |  | ||||||
|     float level; |     float level; | ||||||
|     if (value < 0.0) |     if (value < 0.0) | ||||||
|       level = lerp(this->idle_level_, this->min_level_, -value); |       level = lerp(-value, this->idle_level_, this->min_level_); | ||||||
|     else |     else | ||||||
|       level = lerp(this->idle_level_, this->max_level_, value); |       level = lerp(value, this->idle_level_, this->max_level_); | ||||||
|  |  | ||||||
|     this->output_->set_level(level); |     this->output_->set_level(level); | ||||||
|     this->save_level_(level); |     this->save_level_(level); | ||||||
|   | |||||||
| @@ -577,11 +577,10 @@ def _format_vol_invalid(ex, config): | |||||||
|  |  | ||||||
|  |  | ||||||
| class InvalidYAMLError(EsphomeError): | class InvalidYAMLError(EsphomeError): | ||||||
|     def __init__(self, path, base_exc): |     def __init__(self, base_exc): | ||||||
|         message = u"Invalid YAML at {}. Please see YAML syntax reference or use an " \ |         message = u"Invalid YAML syntax. Please see YAML syntax reference or use an " \ | ||||||
|                   u"online YAML syntax validator. ({})".format(path, base_exc) |                   u"online YAML syntax validator:\n\n{}".format(base_exc) | ||||||
|         super(InvalidYAMLError, self).__init__(message) |         super(InvalidYAMLError, self).__init__(message) | ||||||
|         self.path = path |  | ||||||
|         self.base_exc = base_exc |         self.base_exc = base_exc | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -589,7 +588,7 @@ def _load_config(): | |||||||
|     try: |     try: | ||||||
|         config = yaml_util.load_yaml(CORE.config_path) |         config = yaml_util.load_yaml(CORE.config_path) | ||||||
|     except EsphomeError as e: |     except EsphomeError as e: | ||||||
|         raise InvalidYAMLError(CORE.config_path, e) |         raise InvalidYAMLError(e) | ||||||
|     CORE.raw_config = config |     CORE.raw_config = config | ||||||
|  |  | ||||||
|     try: |     try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user