Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Errror #68

Merged
merged 25 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.esphome/
.vscode/
.vs/
/tests/.gitignore
/secrets.yaml
*/__pycache__/
Expand Down
3 changes: 3 additions & 0 deletions components/philips_coffee_machine/localization.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace esphome
const std::string state_water_empty = "Wasser leer";
const std::string state_waste_warning = "Abfallcontainerwarnung";
const std::string state_error = "Fehler";
const std::string state_internal_error = "Interner Fehler";

const std::string state_ground_coffee_selected = "Vorgemahlener Kaffee ausgewählt";
const std::string state_coffee_programming_mode = "Kaffee Programmiermodus ausgewählt";
Expand Down Expand Up @@ -64,6 +65,7 @@ namespace esphome
const std::string state_water_empty = "Serbatoio Acqua Vuoto";
const std::string state_waste_warning = "Attenzione Contenitore Fondi Caffè";
const std::string state_error = "Errore";
const std::string state_internal_error = "Errore interno";

const std::string state_ground_coffee_selected = "Selezionato Caffè Premacinato";
const std::string state_coffee_programming_mode = "Selezionata Modalità programmazione Caffè";
Expand Down Expand Up @@ -115,6 +117,7 @@ namespace esphome
const std::string state_water_empty = "Water empty";
const std::string state_waste_warning = "Waste container warning";
const std::string state_error = "Error";
const std::string state_internal_error = "Internal Error";

const std::string state_ground_coffee_selected = "Pre-ground Coffee selected";
const std::string state_coffee_programming_mode = "Coffee programming mode selected";
Expand Down
21 changes: 14 additions & 7 deletions components/philips_coffee_machine/text_sensor/status_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ namespace esphome
return;
}

// 3 warning lights indicate an internal error (i.e. overheating)
if (data[15] != led_off && data[14] == led_second)
{
update_state(state_internal_error);
return;
}

// Warning/Error led
if (data[15] == led_second)
{
update_state(state_error);
return;
}

// Water empty led
if (data[14] == led_second)
{
Expand All @@ -81,13 +95,6 @@ namespace esphome
return;
}

// Warning/Error led
if (data[15] == led_second)
{
update_state(state_error);
return;
}

// Coffee selected
if (data[3] == led_off && data[4] == led_off && (data[5] == led_on || data[5] == led_second) && data[6] == led_off)
{
Expand Down
Loading