mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-03 16:41:50 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			816 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			816 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
esphome:
 | 
						|
  name: test
 | 
						|
 | 
						|
esp32:
 | 
						|
  board: esp32dev
 | 
						|
 | 
						|
text:
 | 
						|
  - platform: template
 | 
						|
    name: "test 1 text"
 | 
						|
    id: "it_1"
 | 
						|
    optimistic: true
 | 
						|
    mode: text
 | 
						|
 | 
						|
  - platform: template
 | 
						|
    name: "test 2 text"
 | 
						|
    id: "it_2"
 | 
						|
    icon: "mdi:text"
 | 
						|
    optimistic: true
 | 
						|
    min_length: 5
 | 
						|
    max_length: 255
 | 
						|
    internal: false
 | 
						|
    initial_value: "Welcome ESPHOME"
 | 
						|
    restore_value: true
 | 
						|
    mode: text
 | 
						|
 | 
						|
  - platform: template
 | 
						|
    name: "test 3 key"
 | 
						|
    id: "it_3"
 | 
						|
    icon: "mdi:text"
 | 
						|
    mode: "password"
 | 
						|
    optimistic: true
 | 
						|
    internal: true
 | 
						|
    max_length: 255
 | 
						|
 | 
						|
  - platform: template
 | 
						|
    name: "test 4 key"
 | 
						|
    id: "it_4"
 | 
						|
    mode: text
 | 
						|
    set_action:
 | 
						|
      - then:
 | 
						|
          - logger.log:
 | 
						|
              format: Template text set to %s
 | 
						|
              args: ["x.c_str()"]
 | 
						|
    lambda: |
 | 
						|
      return std::string{"Hello"};
 |