From e92c7897951f0b7681871967a7c8b31d267dd7a9 Mon Sep 17 00:00:00 2001 From: ale1800 <53172176+ale1800@users.noreply.github.com> Date: Fri, 10 Mar 2023 14:37:45 +0100 Subject: [PATCH] Update esphome-esp360remote.yaml Added services for raw and pronto IR signals --- .../esphome-esp360remote.yaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ESPHome Configuration/esphome-esp360remote.yaml b/ESPHome Configuration/esphome-esp360remote.yaml index 7c1fda6..8370dc8 100644 --- a/ESPHome Configuration/esphome-esp360remote.yaml +++ b/ESPHome Configuration/esphome-esp360remote.yaml @@ -96,7 +96,26 @@ remote_receiver: number: GPIO19 inverted: True dump: all - + on_raw: + - homeassistant.event: + event: esphome.ir_raw_code_received + data: + code: !lambda ' + reverse(x.begin(), x.end()); + std::string str = ""; + for (auto it = x.begin(); it != x.end(); ++it) + { + str += to_string(*it); + str += ","; + if (it != x.end() - 1) str += " "; + } + if (str.size() > 0) str.erase( str.end() - 2); + return esphome::to_string("[" + str + "]");' + on_pronto: + - homeassistant.event: + event: esphome.ir_pronto_code_received + data: + code: !lambda 'return x.data;' #Setting up IR and RF transmitters remote_transmitter: