Skip to content

Compilation error with homeassistant.tag_scanned with 2025.8.0 (fixed in 2025.8.1) #10263

@rlane

Description

@rlane

The problem

Using the homeassistant.tag_scanned action causes a compilation error. May have been introduced in #9900.

Enabling homeassistant_services manually fixes it:

api:
  homeassistant_services: true

Which version of ESPHome has the issue?

2025.8.0b2

What type of installation are you using?

pip

What platform are you using?

ESP32

Component causing the issue

api

YAML Config

esp32:
  board: esp32dev

api:

wifi:
  ssid: test

esphome:
  name: test
  on_boot:
    then:
      - homeassistant.tag_scanned: 'test'

Anything in the logs that might be useful for us?

Compilation error:

src/main.cpp:14:6: error: 'HomeAssistantServiceCallAction' in namespace 'esphome::api' does not name a template type
   14 | api::HomeAssistantServiceCallAction<> *api_homeassistantservicecallaction_id;
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp: In function 'void setup()':
src/main.cpp:104:3: error: 'api_homeassistantservicecallaction_id' was not declared in this scope
  104 |   api_homeassistantservicecallaction_id = new api::HomeAssistantServiceCallAction<>(api_apiserver_id, true);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:104:52: error: 'HomeAssistantServiceCallAction' in namespace 'esphome::api' does not name a template type
  104 |   api_homeassistantservicecallaction_id = new api::HomeAssistantServiceCallAction<>(api_apiserver_id, true);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:104:83: error: expected primary-expression before '>' token
  104 |   api_homeassistantservicecallaction_id = new api::HomeAssistantServiceCallAction<>(api_apiserver_id, true);
      |                                                                                   ^
src/main.cpp:107:29: error: cannot convert '<brace-enclosed initializer list>' to 'const std::vector<esphome::Action<>*, std::allocator<esphome::Action<>*> >&'
  107 |   automation_id->add_actions({api_homeassistantservicecallaction_id});
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/api/api_server.h:9,
                 from src/esphome/components/api/api_connection.h:8,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/core/automation.h:289:56: note:   initializing argument 1 of 'void esphome::Automation<Ts>::add_actions(const std::vector<esphome::Action<Ts ...>*>&) [with Ts = {}]'
  289 |   void add_actions(const std::vector<Action<Ts...> *> &actions) { this->actions_.add_actions(actions); }
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions