Merge pull request #335 from edwardtfn/patch-3
Convert "Update TFT display" into a button
This commit is contained in:
@@ -107,12 +107,22 @@ uart:
|
|||||||
baud_rate: 115200
|
baud_rate: 115200
|
||||||
id: tf_uart
|
id: tf_uart
|
||||||
|
|
||||||
###### REBOOT BUTTON #####
|
##### START - BUTTON CONFIGURATION #####
|
||||||
button:
|
button:
|
||||||
|
###### REBOOT BUTTON #####
|
||||||
- platform: restart
|
- platform: restart
|
||||||
name: ${device_name} Restart
|
name: ${device_name} Restart
|
||||||
id: restart_nspanel
|
id: restart_nspanel
|
||||||
|
|
||||||
|
##### UPDATE TFT DISPLAY #####
|
||||||
|
- platform: template
|
||||||
|
name: ${device_name} Update TFT display
|
||||||
|
icon: mdi:file-sync
|
||||||
|
id: tft_update
|
||||||
|
entity_category: config
|
||||||
|
on_press:
|
||||||
|
- delay: 16ms
|
||||||
|
- lambda: id(disp1).upload_tft();
|
||||||
|
|
||||||
##### START - API CONFIGURATION #####
|
##### START - API CONFIGURATION #####
|
||||||
api:
|
api:
|
||||||
@@ -748,16 +758,6 @@ switch:
|
|||||||
restore_state: false
|
restore_state: false
|
||||||
optimistic: true
|
optimistic: true
|
||||||
|
|
||||||
##### UPDATE TFT DISPLAY #####
|
|
||||||
- platform: template
|
|
||||||
name: ${device_name} Update TFT display
|
|
||||||
id: tft_update
|
|
||||||
entity_category: config
|
|
||||||
turn_on_action:
|
|
||||||
- delay: 16ms
|
|
||||||
- lambda: id(disp1).upload_tft();
|
|
||||||
- switch.turn_off: tft_update
|
|
||||||
|
|
||||||
##### PHYSICAL SWITCH 1 #####
|
##### PHYSICAL SWITCH 1 #####
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: ${device_name} Relay 1
|
name: ${device_name} Relay 1
|
||||||
|
|||||||
Reference in New Issue
Block a user