mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
471b82f727
* Renamed Nameable to EntityBase (cpp) * Renamed NAMEABLE_SCHEMA to ENTITY_BASE_SCHEMA (Python) * Renamed cg.Nameable to cg.EntityBase (Python) * Remove redundant use of CONF_NAME from esp32_touch * Remove redundant use of CONF_NAME from mcp3008 * Updated test * Moved EntityBase from Component.h and Component.cpp * Added icon property to EntityBase * Added CONF_ICON to ENTITY_BASE_SCHEMA and added setup_entity function to cpp_helpers * Added MQTT component getters for icon and disabled_by_default * Lint * Removed icon field from MQTT components * Code generation now uses setup_entity to setENTITY_BASE_SCHEMA fields * Removed unused import * Added cstdint include * Optimisation: don't set icon if it is empty * Remove icon from NumberTraits and SelectTraits * Removed unused import * Integration and Total Daily Energy sensors now inherit icons from their parents during code generation * Minor comment correction * Removed redundant icon-handling code from sensor, switch, and text_sensor * Update esphome/components/tsl2591/tsl2591.h Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl> * Added icon property to binary sensor, climate, cover, and fan component tests * Added icons for Binary Sensor, Climate, Cover, Fan, and Light to API * Consolidated EntityBase fields in MQTT components Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
175 lines
3.4 KiB
YAML
175 lines
3.4 KiB
YAML
esphome:
|
|
name: test5
|
|
build_path: build/test5
|
|
project:
|
|
name: esphome.test5_project
|
|
version: "1.0.0"
|
|
|
|
esp32:
|
|
board: nodemcu-32s
|
|
framework:
|
|
type: esp-idf
|
|
advanced:
|
|
ignore_efuse_mac_crc: true
|
|
|
|
wifi:
|
|
networks:
|
|
- ssid: 'MySSID'
|
|
password: 'password1'
|
|
|
|
api:
|
|
|
|
ota:
|
|
|
|
logger:
|
|
|
|
uart:
|
|
- id: uart1
|
|
tx_pin: 1
|
|
rx_pin: 3
|
|
baud_rate: 9600
|
|
- id: uart2
|
|
tx_pin: 17
|
|
rx_pin: 16
|
|
baud_rate: 19200
|
|
|
|
i2c:
|
|
|
|
|
|
modbus:
|
|
uart_id: uart1
|
|
flow_control_pin: 5
|
|
id: mod_bus1
|
|
|
|
modbus_controller:
|
|
- id: modbus_controller_test
|
|
address: 0x2
|
|
modbus_id: mod_bus1
|
|
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin: GPIO0
|
|
id: io0_button
|
|
icon: mdi:gesture-tap-button
|
|
|
|
tlc5947:
|
|
data_pin: GPIO12
|
|
clock_pin: GPIO14
|
|
lat_pin: GPIO15
|
|
|
|
output:
|
|
- platform: gpio
|
|
pin: GPIO2
|
|
id: built_in_led
|
|
|
|
- platform: tlc5947
|
|
id: output_red
|
|
channel: 0
|
|
max_power: 0.8
|
|
|
|
demo:
|
|
|
|
esp32_ble:
|
|
|
|
esp32_ble_server:
|
|
manufacturer: "ESPHome"
|
|
model: "Test5"
|
|
|
|
esp32_improv:
|
|
authorizer: io0_button
|
|
authorized_duration: 1min
|
|
status_indicator: built_in_led
|
|
|
|
number:
|
|
- platform: template
|
|
name: My template number
|
|
id: template_number_id
|
|
optimistic: true
|
|
on_value:
|
|
- logger.log:
|
|
format: "Number changed to %f"
|
|
args: ["x"]
|
|
set_action:
|
|
- logger.log:
|
|
format: "Template Number set to %f"
|
|
args: ["x"]
|
|
max_value: 100
|
|
min_value: 0
|
|
step: 5
|
|
|
|
select:
|
|
- platform: template
|
|
name: My template select
|
|
id: template_select_id
|
|
optimistic: true
|
|
initial_option: two
|
|
restore_value: true
|
|
on_value:
|
|
- logger.log:
|
|
format: "Select changed to %s"
|
|
args: ["x.c_str()"]
|
|
set_action:
|
|
- logger.log:
|
|
format: "Template Select set to %s"
|
|
args: ["x.c_str()"]
|
|
- select.set:
|
|
id: template_select_id
|
|
option: two
|
|
options:
|
|
- one
|
|
- two
|
|
- three
|
|
|
|
sensor:
|
|
- platform: selec_meter
|
|
total_active_energy:
|
|
name: "SelecEM2M Total Active Energy"
|
|
import_active_energy:
|
|
name: "SelecEM2M Import Active Energy"
|
|
export_active_energy:
|
|
name: "SelecEM2M Export Active Energy"
|
|
total_reactive_energy:
|
|
name: "SelecEM2M Total Reactive Energy"
|
|
import_reactive_energy:
|
|
name: "SelecEM2M Import Reactive Energy"
|
|
export_reactive_energy:
|
|
name: "SelecEM2M Export Reactive Energy"
|
|
apparent_energy:
|
|
name: "SelecEM2M Apparent Energy"
|
|
active_power:
|
|
name: "SelecEM2M Active Power"
|
|
reactive_power:
|
|
name: "SelecEM2M Reactive Power"
|
|
apparent_power:
|
|
name: "SelecEM2M Apparent Power"
|
|
voltage:
|
|
name: "SelecEM2M Voltage"
|
|
current:
|
|
name: "SelecEM2M Current"
|
|
power_factor:
|
|
name: "SelecEM2M Power Factor"
|
|
frequency:
|
|
name: "SelecEM2M Frequency"
|
|
maximum_demand_active_power:
|
|
name: "SelecEM2M Maximum Demand Active Power"
|
|
disabled_by_default: true
|
|
maximum_demand_reactive_power:
|
|
name: "SelecEM2M Maximum Demand Reactive Power"
|
|
disabled_by_default: true
|
|
maximum_demand_apparent_power:
|
|
name: "SelecEM2M Maximum Demand Apparent Power"
|
|
disabled_by_default: true
|
|
|
|
- id: battery_voltage
|
|
name: "Battery voltage2"
|
|
platform: modbus_controller
|
|
modbus_controller_id: modbus_controller_test
|
|
address: 0x331A
|
|
register_type: read
|
|
value_type: U_WORD
|
|
|
|
- platform: t6615
|
|
uart_id: uart2
|
|
co2:
|
|
name: CO2 Sensor
|