# Basic configuration example # Available icons can be found in 'components\nspanel_lovelace\icons.json'. Icon colors range from 0 to 65535. # NOTE: This project is in the beta stage so the configuration is subject to change without notice. # Please check your own configuration againist the latest example when updating. esphome: name: nspanel name_add_mac_suffix: true comment: "ESPHome Basic NSPanel Example" build_path: ./.build/nspanel-basic esp32: board: esp32dev framework: # ESP-IDF is requried so we can access the NSPanel PSRAM # which is on non-standard pins. ESP-IDF also uses less flash than Arduino! # note: Arduino support is deprecated and will be dropped in the future type: esp-idf external_components: - source: type: git url: https://github.com/olicooper/esphome-nspanel-lovelace-native ref: dev refresh: 3h components: [nspanel_lovelace] nspanel_lovelace: id: nspanel screensaver: time_id: homeassistant_time weather: entity_id: !secret weather_entity_id ## NOTE: Please see README for more info on weather 'forecast_method' options. Default is 'template_sensor' (deprecated). ## This option uses a Home Assistant action to send forecast data to the nspanel (see README for the HA automation template). forecast_method: service cards: - type: cardGrid id: front_room title: Front Room entities: - entity_id: light.front_room_all name: All - entity_id: light.front_room_inner name: Inner - entity_id: light.front_room_outer name: Outer - entity_id: scene.front_room_all_default name: Default logger: baud_rate: 115200 wifi: ssid: !secret wifi_ssid password: !secret wifi_password api: ## NOTE: This is automatically set when using `forecast_method: service` for weather updates # custom_services: true services: ## Service to update the TFT firmware using a URL that is accessible to the nspanel - service: upload_tft variables: url: string then: - lambda: 'id(nspanel).upload_tft(url);' ota: platform: esphome ## UART for the Nextion display uart: id: uart_nextion tx_pin: 16 rx_pin: 17 baud_rate: 115200 time: - platform: homeassistant id: homeassistant_time timezone: Europe/London switch: ## Physical relay 1 - platform: gpio name: Relay 1 id: relay_1 pin: number: 19 restore_mode: ALWAYS_ON ## Physical relay 2 - platform: gpio name: Relay 2 id: relay_2 pin: number: 22 restore_mode: ALWAYS_ON ## Turn screen power on/off ## NOTE: When using weather forecast_method 'service', this entity is used by the HA automation template ## to send a forecast update when the nspanel comes online. It is not required but is recommended. - platform: gpio name: Screen Power id: screen_power entity_category: config pin: number: 4 inverted: true restore_mode: ALWAYS_ON binary_sensor: ## Left button below the display - platform: gpio name: Left Button pin: number: GPIO14 inverted: true id: left_button internal: true on_click: - switch.toggle: relay_1 ## Right button below the display - platform: gpio name: Right Button pin: number: GPIO27 inverted: true id: right_button internal: true on_click: - switch.toggle: relay_2