Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.26k stars 234 forks source link

Unknown Service - xxxx_init_page_home #1951

Closed ThePragmaticArt closed 3 months ago

ThePragmaticArt commented 3 months ago

TFT Version

4.3.1

ESPHome Version

2024.3.0

Blueprint Version

4.3.1

Panel Model

US

What is the bug?

When attempting to load a blueprint (after the NSPanel has been flashed and connected into Home Assistant), The following errors emit from Settings:

NSPanel Configuration - Master Bedroom uses an unknown service
The automation "NSPanel Configuration - Master Bedroom" (automation.nspanel_configuration_master_bedroom) has an action that calls an unknown service: esphome.nspanel_master_bedroom_init_page_home.

This error prevents the automation from running correctly. Maybe this service is no longer available, or perhaps a typo caused it.

To fix this error, [edit the automation](http://homeassistant.local:8123/config/automation/edit/1710958688989) and remove the action that calls this service.

Click on SUBMIT below to confirm you have fixed this automation.

This is a single example, a few errors with other services have a tendency to surface as well.

Steps to Reproduce

  1. Flash ESPHome device (NSPanel) and integrate into Home Assistant following the setup guide here
  2. Note the tft file copied to your www folder (or local hosting path) following the guide here -- in this case we're using the spaniel_us.tft file found on the v4.3.1 repository. Our YAML is pointing to this and has emitted a version mismatched when installing the ESPHome config, but still succeeds.
  3. Import the Blueprint and attach it to the appropriate device (what was just setup) -- note you should only add the bare minimum to setup the blueprint as shown in the sample YAML below. Ensure you are pointing everything to v4.3.1 versions.
  4. Watch as you end up in the following error state where the blueprint is not detected and errors start emitting from the device/services section of Home Assistant.

Your Panel's YAML

Blueprint YAML:

alias: NSPanel Configuration - Master Bedroom
description: ""
use_blueprint:
  path: Blackymas/nspanel_blueprint.yaml
  input:
    nspanel_name: a1856d8262dcb53cdfb9172b6f339fe0
    time_format: "%-I:%M %p"
    date_format: "%A, %-m/%-d"
    weather_entity: weather.baybrook_daily_weather

Panel YAML:

substitutions:
  # Settings - Editable values
  device_name: "nspanel--master-bedroom"
  friendly_name: "NSPanel - Master Bedroom"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: !secret nextion_update_url  # http://mylocalhost:8123/local/nspanel_us.tft"
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####
# Enable Home Assistant API
api:
  encryption:
    key: !secret encryption_key
##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: v4.3.1
    files:
      - nspanel_esphome.yaml # Basic package
      # Optional advanced and add-on configurations
      - esphome/nspanel_esphome_advanced.yaml
      # - nspanel_esphome_addon_climate_cool.yaml
      # - nspanel_esphome_addon_climate_heat.yaml
      # - nspanel_esphome_addon_climate_dual.yaml
    refresh: 300s

ESPHome Logs

There's not much worth showing here as evens (like button clicks) are showing appropriately.

Home Assistant Logs

2024-03-20 14:18:16.262 ERROR (MainThread) [homeassistant.components.automation.nspanel_configuration_master_bedroom] NSPanel Configuration - Master Bedroom: Main choices: Automation reloaded: Error executing script. Service not found for if at pos 3: Service esphome.nspanel_master_bedroom_init_page_home not found.
2024-03-20 14:18:16.262 ERROR (MainThread) [homeassistant.components.automation.nspanel_configuration_master_bedroom] NSPanel Configuration - Master Bedroom: Error executing script. Service not found for choose at pos 3: Service esphome.nspanel_master_bedroom_init_page_home not found.
edwardtfn commented 3 months ago

Please try changing device_name: "nspanel--master-bedroom" to device_name: "nspanel-master-bedroom".

ThePragmaticArt commented 3 months ago

I had to blow away the entry in ESPHome via HA then re-add everything removing the extra -. Yay configs. Thank you.