Skip to content

Esphome service / action definition to be called by homeassistant #1498

@gpaesano

Description

@gpaesano

the api example wont work due to new implementation of FixedVector in ESPHome, here is my solution:

actions:
- action: send_raw_command
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
#' this is not working anymore due to different types conversions command: int[] is now a esphome::FixedVector
#' code: !lambda 'return command;'
#' this is the workaround:
code: !lambda ' std::vector v; v.reserve(command.size()); for (auto &x : command) {v.push_back(x);} return v;'
carrier_frequency: 38000hz

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