mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Co-authored-by: Samuel Sieb <samuel@sieb.net> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
		
			
				
	
	
		
			45 lines
		
	
	
		
			773 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			773 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| i2c:
 | |
|   - id: i2c_sx1509
 | |
|     scl: ${scl_pin}
 | |
|     sda: ${sda_pin}
 | |
| 
 | |
| sx1509:
 | |
|   - id: sx1509_hub
 | |
|     address: 0x3E
 | |
|     keypad:
 | |
|       key_rows: 2
 | |
|       key_columns: 2
 | |
|       keys: abcd
 | |
|       on_key:
 | |
|         - lambda: ESP_LOGD("test", "got key '%c'", x);
 | |
| 
 | |
| binary_sensor:
 | |
|   - platform: gpio
 | |
|     name: GPIO SX1509 Test
 | |
|     pin:
 | |
|       sx1509: sx1509_hub
 | |
|       number: 3
 | |
|   - platform: sx1509
 | |
|     sx1509_id: sx1509_hub
 | |
|     name: "keypadkey_0"
 | |
|     row: 0
 | |
|     col: 0
 | |
| 
 | |
| switch:
 | |
|   - platform: gpio
 | |
|     name: GPIO SX1509 Test Out Open Drain
 | |
|     pin:
 | |
|       sx1509: sx1509_hub
 | |
|       number: 0
 | |
|       mode:
 | |
|         output: true
 | |
|         open_drain: true
 | |
| 
 | |
|   - platform: gpio
 | |
|     name: GPIO SX1509 Test Out Standard
 | |
|     pin:
 | |
|       sx1509: sx1509_hub
 | |
|       number: 1
 | |
|       mode:
 | |
|         output: true
 |