Skip to content

Commit

Permalink
Fixed sensor naming and definition for outdoor temperature. Updated p…
Browse files Browse the repository at this point in the history
…rotocol to match outdoor_temperature naming in code and configuration.
  • Loading branch information
omerfaruk-aran committed Oct 29, 2024
1 parent 692ef9c commit 39a3f82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/samsung_ac/protocol_non_nasa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace esphome
namespace samsung_ac
{
std::list<NonNasaRequestQueueItem> nonnasa_requests;
esphome::sensor::Sensor *outdoor_temperature = nullptr;
bool controller_registered = false;
bool indoor_unit_awake = true;

Expand Down Expand Up @@ -644,9 +645,9 @@ namespace esphome
}
else if (nonpacket_.cmd == NonNasaCommand::CmdC0)
{
if (outdoor_temperature.has_value())
if (outdoor_temperature != nullptr)
{
outdoor_temperature->publish_state(commandC0.outdoor_unit_outdoor_temp_c);
outdoor_temperature->publish_state(nonpacket_.commandC0.outdoor_unit_outdoor_temp_c);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions components/samsung_ac/protocol_non_nasa.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <optional>
#include "protocol.h"
#include "util.h"
#include "esphome/components/sensor/sensor.h"

namespace esphome
{
Expand Down

0 comments on commit 39a3f82

Please sign in to comment.