mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 00:51:49 +00:00 
			
		
		
		
	Compare commits
	
		
			12 Commits
		
	
	
		
			2022.6.0b1
			...
			2022.1.3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					c0523590b4 | ||
| 
						 | 
					c7f091ab10 | ||
| 
						 | 
					7479e0aada | ||
| 
						 | 
					5bbee1a1fe | ||
| 
						 | 
					bdb9546ca3 | ||
| 
						 | 
					46af4cad6e | ||
| 
						 | 
					76a238912b | ||
| 
						 | 
					909a526967 | ||
| 
						 | 
					cd6f4fb93f | ||
| 
						 | 
					c19458696e | ||
| 
						 | 
					318b930e9f | ||
| 
						 | 
					9296a078a7 | 
@@ -4,4 +4,5 @@ include requirements.txt
 | 
			
		||||
include esphome/dashboard/templates/*.html
 | 
			
		||||
recursive-include esphome/dashboard/static *.ico *.js *.css *.woff* LICENSE
 | 
			
		||||
recursive-include esphome *.cpp *.h *.tcc
 | 
			
		||||
recursive-include esphome *.py.script
 | 
			
		||||
recursive-include esphome LICENSE.txt
 | 
			
		||||
 
 | 
			
		||||
@@ -235,7 +235,7 @@ float DallasTemperatureSensor::get_temp_c() {
 | 
			
		||||
 | 
			
		||||
  return temp / 128.0f;
 | 
			
		||||
}
 | 
			
		||||
std::string DallasTemperatureSensor::unique_id() { return "dallas-" + str_upper_case(format_hex(this->address_)); }
 | 
			
		||||
std::string DallasTemperatureSensor::unique_id() { return "dallas-" + str_lower_case(format_hex(this->address_)); }
 | 
			
		||||
 | 
			
		||||
}  // namespace dallas
 | 
			
		||||
}  // namespace esphome
 | 
			
		||||
 
 | 
			
		||||
@@ -57,9 +57,11 @@ void ModbusNumber::control(float value) {
 | 
			
		||||
  // Create and send the write command
 | 
			
		||||
  ModbusCommandItem write_cmd;
 | 
			
		||||
  if (this->register_count == 1 && !this->use_write_multiple_) {
 | 
			
		||||
    write_cmd = ModbusCommandItem::create_write_single_command(parent_, this->start_address + this->offset, data[0]);
 | 
			
		||||
    // since offset is in bytes and a register is 16 bits we get the start by adding offset/2
 | 
			
		||||
    write_cmd =
 | 
			
		||||
        ModbusCommandItem::create_write_single_command(parent_, this->start_address + this->offset / 2, data[0]);
 | 
			
		||||
  } else {
 | 
			
		||||
    write_cmd = ModbusCommandItem::create_write_multiple_command(parent_, this->start_address + this->offset,
 | 
			
		||||
    write_cmd = ModbusCommandItem::create_write_multiple_command(parent_, this->start_address + this->offset / 2,
 | 
			
		||||
                                                                 this->register_count, data);
 | 
			
		||||
  }
 | 
			
		||||
  // publish new value
 | 
			
		||||
 
 | 
			
		||||
@@ -104,7 +104,6 @@ async def to_code(config):
 | 
			
		||||
            )
 | 
			
		||||
            light_state = cg.new_Pvariable(conf[CONF_LIGHT_ID], "", wrapper)
 | 
			
		||||
            await cg.register_component(light_state, conf)
 | 
			
		||||
            cg.add(cg.App.register_light(light_state))
 | 
			
		||||
            segments.append(AddressableSegment(light_state, 0, 1, False))
 | 
			
		||||
 | 
			
		||||
        else:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
"""Constants used by esphome."""
 | 
			
		||||
 | 
			
		||||
__version__ = "2022.1.0b4"
 | 
			
		||||
__version__ = "2022.1.3"
 | 
			
		||||
 | 
			
		||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -316,8 +316,8 @@ template<int (*fn)(int)> std::string str_ctype_transform(const std::string &str)
 | 
			
		||||
  std::transform(str.begin(), str.end(), result.begin(), [](unsigned char ch) { return fn(ch); });
 | 
			
		||||
  return result;
 | 
			
		||||
}
 | 
			
		||||
std::string str_lower_case(const std::string &str) { return str_ctype_transform<std::toupper>(str); }
 | 
			
		||||
std::string str_upper_case(const std::string &str) { return str_ctype_transform<std::tolower>(str); }
 | 
			
		||||
std::string str_lower_case(const std::string &str) { return str_ctype_transform<std::tolower>(str); }
 | 
			
		||||
std::string str_upper_case(const std::string &str) { return str_ctype_transform<std::toupper>(str); }
 | 
			
		||||
std::string str_snake_case(const std::string &str) {
 | 
			
		||||
  std::string result;
 | 
			
		||||
  result.resize(str.length());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user