mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	fix climate_ir on receive optional (#897)
* fix climate on receive optional * add climate tests
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							6433da13a3
						
					
				
				
					commit
					0f406c38eb
				
			| @@ -51,6 +51,9 @@ class ClimateIR : public climate::Climate, public Component, public remote_base: | |||||||
|   /// Transmit via IR the state of this climate controller. |   /// Transmit via IR the state of this climate controller. | ||||||
|   virtual void transmit_state() = 0; |   virtual void transmit_state() = 0; | ||||||
|  |  | ||||||
|  |   // Dummy implement on_receive so implementation is optional for inheritors | ||||||
|  |   bool on_receive(remote_base::RemoteReceiveData data) override { return false; }; | ||||||
|  |  | ||||||
|   bool supports_cool_{true}; |   bool supports_cool_{true}; | ||||||
|   bool supports_heat_{true}; |   bool supports_heat_{true}; | ||||||
|   bool supports_dry_{false}; |   bool supports_dry_{false}; | ||||||
|   | |||||||
| @@ -667,7 +667,7 @@ sensor: | |||||||
|       name: "Windspeed" |       name: "Windspeed" | ||||||
|     wind_direction_degrees: |     wind_direction_degrees: | ||||||
|       name: "Winddirection Degrees" |       name: "Winddirection Degrees" | ||||||
|     pin:  |     pin: | ||||||
|       number: GPIO04 |       number: GPIO04 | ||||||
|       mode: INPUT |       mode: INPUT | ||||||
|   - platform: zyaura |   - platform: zyaura | ||||||
| @@ -1082,7 +1082,7 @@ light: | |||||||
|           name: "Test For Custom Lambda Effect" |           name: "Test For Custom Lambda Effect" | ||||||
|           lambda: |- |           lambda: |- | ||||||
|             it[0] = current_color; |             it[0] = current_color; | ||||||
|                  |  | ||||||
|     - automation: |     - automation: | ||||||
|         name: Custom Effect |         name: Custom Effect | ||||||
|         sequence: |         sequence: | ||||||
| @@ -1154,6 +1154,11 @@ climate: | |||||||
|     sensor: my_sensor |     sensor: my_sensor | ||||||
|   - platform: coolix |   - platform: coolix | ||||||
|     name: Coolix Climate |     name: Coolix Climate | ||||||
|  |   - platform: fujitsu_general | ||||||
|  |     name: Fujitsu General Climate | ||||||
|  |   - platform: yashima | ||||||
|  |     name: Yashima Climate | ||||||
|  |  | ||||||
|  |  | ||||||
| switch: | switch: | ||||||
|   - platform: gpio |   - platform: gpio | ||||||
| @@ -1351,7 +1356,7 @@ interval: | |||||||
|             static uint16_t btn_left_state = id(btn_left)->get_value(); |             static uint16_t btn_left_state = id(btn_left)->get_value(); | ||||||
|  |  | ||||||
|             ESP_LOGD("adaptive touch", "___  Touch Pad '%s' (T%u): val: %u state: %u tres:%u", id(btn_left)->get_name().c_str(), id(btn_left)->get_touch_pad(), id(btn_left)->get_value(), btn_left_state, id(btn_left)->get_threshold()); |             ESP_LOGD("adaptive touch", "___  Touch Pad '%s' (T%u): val: %u state: %u tres:%u", id(btn_left)->get_name().c_str(), id(btn_left)->get_touch_pad(), id(btn_left)->get_value(), btn_left_state, id(btn_left)->get_threshold()); | ||||||
|              |  | ||||||
|             btn_left_state = ((uint32_t) id(btn_left)->get_value()  +  63 * (uint32_t)btn_left_state) >> 6; |             btn_left_state = ((uint32_t) id(btn_left)->get_value()  +  63 * (uint32_t)btn_left_state) >> 6; | ||||||
|  |  | ||||||
|             id(btn_left)->set_threshold(btn_left_state * 0.9); |             id(btn_left)->set_threshold(btn_left_state * 0.9); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user