Advertisement
Guest User

Display

a guest
Nov 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.32 KB | None | 0 0
  1. esphome:
  2.   name: display
  3.   platform: ESP8266
  4.   board: nodemcuv2
  5.  
  6. wifi:
  7.   ssid: XXXXXX
  8.   password: XXXXX
  9.  
  10.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  11.   ap:
  12.     ssid: "Display Fallback Hotspot"
  13.     password: "tPnpzpNCGLRy"
  14.  
  15. captive_portal:
  16. # Enable logging
  17. logger:
  18. # Enable Home Assistant API
  19. api:
  20. ota:
  21. mqtt:
  22.   broker: 10.0.1.2
  23.  
  24. # Example configuration entry
  25. i2c:
  26.   sda: D1
  27.   scl: D2
  28.  
  29. text_sensor:
  30. # Wavin Værksted
  31.  
  32.   - platform: homeassistant
  33.     id: status_wavin_vaerksted
  34.     entity_id: climate.vaerksted
  35.     internal: true
  36.    
  37.   - platform: mqtt_subscribe
  38.     id: target_wavin_vaerksted
  39.     topic: heat/floorB4E62D292F41/0/target
  40.     internal: true
  41.    
  42.   - platform: mqtt_subscribe
  43.     id: temp_wavin_vaerksted
  44.     topic: heat/floorB4E62D292F41/0/current
  45.     internal: true    
  46.    
  47. # Wavin Victors værelse
  48.  
  49.   - platform: homeassistant
  50.     id: status_wavin_victor
  51.     entity_id: climate.victors_vaerelse
  52.     internal: true
  53.    
  54.   - platform: mqtt_subscribe
  55.     id: target_wavin_victor
  56.     topic: heat/floorB4E62D292F41/1/target
  57.     internal: true
  58.    
  59.   - platform: mqtt_subscribe
  60.     id: temp_wavin_victor
  61.     topic: heat/floorB4E62D292F41/1/current
  62.     internal: true  
  63.    
  64. # Wavin Gæstebadeværelse
  65.  
  66.   - platform: homeassistant
  67.     id: status_wavin_gaestebadevaerelse
  68.     entity_id: climate.gaestebadevaerelse
  69.     internal: true
  70.    
  71.   - platform: mqtt_subscribe
  72.     id: target_wavin_gaestebadevaerelse
  73.     topic: heat/floorB4E62D292F41/2/target
  74.     internal: true
  75.    
  76.   - platform: mqtt_subscribe
  77.     id: temp_wavin_gaestebadevaerelse
  78.     topic: heat/floorB4E62D292F41/2/current
  79.     internal: true            
  80.  
  81. # Wavin Gang Bryggers
  82.  
  83.   - platform: homeassistant
  84.     id: status_wavin_gang_bryggers
  85.     entity_id: climate.gang_bryggers
  86.     internal: true
  87.    
  88.   - platform: mqtt_subscribe
  89.     id: target_wavin_gang_bryggers
  90.     topic: heat/floorB4E62D292F41/3/target
  91.     internal: true
  92.    
  93.   - platform: mqtt_subscribe
  94.     id: temp_wavin_gang_bryggers
  95.     topic: heat/floorB4E62D292F41/3/current
  96.     internal: true            
  97.  
  98.  
  99. display:
  100.   - platform: lcd_pcf8574
  101.     dimensions: 20x4
  102.     address: 0x27
  103.     lambda: |-
  104.          
  105.          
  106.          
  107.           it.print(0,0,"1:");
  108.          
  109.           if (id(status_wavin_vaerksted).has_state()){
  110.           it.printf(2,0,"%s", id(status_wavin_vaerksted).state.c_str());}
  111.          
  112.           if (id(target_wavin_vaerksted).has_state()) {
  113.           it.printf(7,0,"S:%s", id(target_wavin_vaerksted).state.c_str());}
  114.          
  115.           if (id(temp_wavin_vaerksted).has_state()){
  116.           it.printf(14,0,"T:%s", id(temp_wavin_vaerksted).state.c_str());}
  117.          
  118.          
  119.          
  120.          
  121.          
  122.           it.print(0,1,"2:");
  123.          
  124.           if (id(status_wavin_victor).has_state()){
  125.           it.printf(2,1,"%s", id(status_wavin_victor).state.c_str());}
  126.          
  127.           if (id(target_wavin_victor).has_state()) {
  128.           it.printf(7,1,"S:%s", id(target_wavin_victor).state.c_str());}
  129.          
  130.           if (id(temp_wavin_victor).has_state()){
  131.           it.printf(14,1,"T:%s", id(temp_wavin_victor).state.c_str());}
  132.          
  133.          
  134.          
  135.          
  136.          
  137.           it.print(0,2,"3:");
  138.          
  139.           if (id(status_wavin_gaestebadevaerelse).has_state()){
  140.           it.printf(2,2,"%s", id(status_wavin_gaestebadevaerelse).state.c_str());}
  141.          
  142.           if (id(target_wavin_gaestebadevaerelse).has_state()) {
  143.           it.printf(7,2,"S:%s", id(target_wavin_gaestebadevaerelse).state.c_str());}
  144.          
  145.           if (id(temp_wavin_gaestebadevaerelse).has_state()){
  146.           it.printf(14,2,"T:%s", id(temp_wavin_gaestebadevaerelse).state.c_str());}
  147.          
  148.          
  149.          
  150.          
  151.          
  152.           it.print(0,3,"4:");
  153.          
  154.           if (id(status_wavin_gang_bryggers).has_state()){
  155.           it.printf(2,3,"%s", id(status_wavin_gang_bryggers).state.c_str());}
  156.          
  157.           if (id(target_wavin_gang_bryggers).has_state()) {
  158.           it.printf(7,3,"S:%s", id(target_wavin_gang_bryggers).state.c_str());}
  159.          
  160.           if (id(temp_wavin_gang_bryggers).has_state()){
  161.           it.printf(14,3,"T:%s", id(temp_wavin_gang_bryggers).state.c_str());}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement