chore: enforce config placement

This commit is contained in:
2025-11-08 22:46:42 +01:00
parent b3716b7de0
commit c0465c7f26
3 changed files with 15 additions and 9 deletions

View File

@@ -10,10 +10,6 @@
Edit the CONFIG table below to match your Home Assistant deployment; the script ignores script-opts files.
]]
local mp = require("mp")
local utils = require("mp.utils")
local msg = require("mp.msg")
local CONFIG = {
sensor_id = "sensor.ac_power", -- Home Assistant entity id
ha_base_url = "http://homeassistant.local:8123",
@@ -35,6 +31,12 @@ local CONFIG = {
initial_message_duration = 0, -- 0 keeps OSD up until refreshed
}
-- No edits are required below unless you want to change script behavior.
local mp = require("mp")
local utils = require("mp.utils")
local msg = require("mp.msg")
local last_watts
local last_display_ts = 0
local last_unit