mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-03 00:21:56 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			728 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			728 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
sx1509:
 | 
						|
  - id: sx1509_hub
 | 
						|
    i2c_id: i2c_bus
 | 
						|
    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
 |