Advertisement
Otisburgh_its

Untitled

Jun 1st, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.75 KB | None | 0 0
  1. esphome:
  2.   name: foobar
  3.   platform: ESP8266
  4.   board: d1_mini
  5.   includes:
  6.    - "Foobar.h"
  7.  
  8. globals:
  9.   - id: send_input_text
  10.     type: std::string
  11.  
  12. text_sensor:
  13.   - platform: homeassistant
  14.     entity_id: input_text.foo
  15.     id: input_text_value
  16.  
  17. script:
  18.   - id: send_input_text
  19.     then:
  20.     - homeassistant.call:
  21.         service: input_text.select
  22.         data_template:
  23.           entity_id: input_text.foo
  24.           value: {{ value }}
  25.         variables:
  26.           value: !lambda 'return id(send_input_text);'
  27.  
  28. sensor:
  29. - platform: custom
  30.   lambda: |-
  31.     auto mysensor = new Foobar(1000);
  32.     App.register_component(mysensor);
  33.     return {mysensor};
  34.  
  35.   sensors:
  36.     name: "foobar"
  37.     unit_of_measurement: foos
  38.     accuracy_decimals: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement