From 0e0feec862992d36235e043808333eb5532d9e11 Mon Sep 17 00:00:00 2001 From: Nick Kinnan Date: Tue, 15 Oct 2024 22:55:08 -0700 Subject: [PATCH] Update api_connection.cpp --- esphome/components/api/api_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index c98f27e099..af79b0930d 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1660,7 +1660,7 @@ void APIConnection::send_event_info(event::Event *event) { } bool APIConnection::try_send_event(APIConnection *api, void *v_event) { event::Event *event = reinterpret_cast(v_event); - return APIConnection::try_send_event(api, event, *(event->state)); + return APIConnection::try_send_event(api, event, *(event->last_event_type)); } bool APIConnection::try_send_event(APIConnection *api, event::Event *event, std::string event_type) { EventResponse resp{};