Update CLAUDE.md and fix final Tortoise handler return value
- Add dashboard development commands (just dashboard, mix phx.server)
- Document Dashboard.Application and Dashboard.MqttSubscriber components
- Add comprehensive dashboard section with MQTT configuration details
- Include critical implementation notes for Tortoise handler return values
- Fix handle_message to return {:ok, state} instead of [] to prevent crashes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,7 @@ defmodule Dashboard.MqttSubscriber do
|
||||
{:ok, state}
|
||||
end
|
||||
|
||||
def handle_message(topic, payload, _state) do
|
||||
def handle_message(topic, payload, state) do
|
||||
topic_parts = if is_binary(topic), do: String.split(topic, "/"), else: topic
|
||||
case topic_parts do
|
||||
["systant", hostname, "stats"] ->
|
||||
@@ -83,7 +83,7 @@ defmodule Dashboard.MqttSubscriber do
|
||||
_ ->
|
||||
:ok
|
||||
end
|
||||
[]
|
||||
{:ok, state}
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
||||
Reference in New Issue
Block a user