mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4b988b735 | ||
|
|
d3ab908507 | ||
|
|
2ee79debd0 | ||
|
|
d536957255 | ||
|
|
b4fe08ba43 | ||
|
|
e4a4917932 | ||
|
|
d17f8c636c | ||
|
|
9fc6ccf901 | ||
|
|
4f760da1aa | ||
|
|
ac2df9e431 | ||
|
|
cd4d68d590 | ||
|
|
2fd5363131 | ||
|
|
c2df6a953a |
12
.github/issue-close-app.yml
vendored
12
.github/issue-close-app.yml
vendored
@@ -5,10 +5,10 @@
|
||||
|
||||
# Comment that will be sent if an issue is judged to be closed.
|
||||
comment: >-
|
||||
This issue has been automatically closed because the TEMPLATE is missing or incomplete.
|
||||
This issue has been automatically closed because the TEMPLATE (it's the stuff you deleted from the issue while opening) is missing or incomplete.
|
||||
|
||||
Filling the template is required so standard questions don't need to be asked again each time.
|
||||
THe ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template
|
||||
The ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template
|
||||
with the requested information. The details requested potentially affect which options to pursue. The small amount
|
||||
of time you will spend completing the template will also help the volunteers, providing assistance to you, to reduce
|
||||
the time required to help you.
|
||||
@@ -19,14 +19,16 @@ comment: >-
|
||||
|
||||
[Docs](https://docs.nspanel.pky.eu) for more information.
|
||||
|
||||
IF YOU THINK THIS IS WAS CLOSED AS A FALSE POSITIVE or you just didn't find a template that matches your request, please do not open another issue, closed issues will also be monitored.
|
||||
|
||||
issueConfigs:
|
||||
# There can be several configs for different kind of issues.
|
||||
- content:
|
||||
# template 1: bug report
|
||||
- "PROBLEM DESCRIPTION"
|
||||
# - "REQUESTED INFORMATION"
|
||||
# - "TO REPRODUCE"
|
||||
# - "EXPECTED BEHAVIOUR"
|
||||
- "REQUESTED INFORMATION"
|
||||
- "TO REPRODUCE"
|
||||
- "EXPECTED BEHAVIOUR"
|
||||
- content:
|
||||
# template 2: feature request
|
||||
- "FEATURE DESCRIPTION"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
+++ /dev/fd/62 2022-12-21 20:15:25.252534958 +0000
|
||||
+++ /dev/fd/62 2022-12-23 15:58:39.712878570 +0000
|
||||
+I/n2t-out/Program.s.txt
|
||||
++ HMI/US/portrait/n2t-out/Program.s.txt
|
||||
+I/n2t-out/cardEntities.txt
|
||||
|
||||
@@ -30,6 +30,10 @@ pageStartup
|
||||
19 Component(s)
|
||||
181 Line(s) of event code
|
||||
129 Unique line(s) of event code
|
||||
screensaver
|
||||
45 Component(s)
|
||||
410 Line(s) of event code
|
||||
298 Unique line(s) of event code
|
||||
popupShutter
|
||||
25 Component(s)
|
||||
398 Line(s) of event code
|
||||
@@ -50,10 +54,6 @@ cardMedia
|
||||
57 Component(s)
|
||||
660 Line(s) of event code
|
||||
325 Unique line(s) of event code
|
||||
screensaver
|
||||
45 Component(s)
|
||||
410 Line(s) of event code
|
||||
298 Unique line(s) of event code
|
||||
cardQR
|
||||
32 Component(s)
|
||||
425 Line(s) of event code
|
||||
|
||||
@@ -126,9 +126,9 @@ Text t10
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 49
|
||||
y coordinate : 240
|
||||
Width : 225
|
||||
x coordinate : 53
|
||||
y coordinate : 245
|
||||
Width : 215
|
||||
Height : 2
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
@@ -576,10 +576,10 @@ Text tIcon1
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 8
|
||||
x coordinate : 0
|
||||
y coordinate : 227
|
||||
Width : 33
|
||||
Height : 30
|
||||
Width : 45
|
||||
Height : 45
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
@@ -589,7 +589,7 @@ Text tIcon1
|
||||
Font ID : 1
|
||||
Back. Color : 0
|
||||
Font Color : 17299
|
||||
Horizontal Alignment : center
|
||||
Horizontal Alignment : left
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
@@ -606,10 +606,10 @@ Text tIcon2
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 282
|
||||
x coordinate : 275
|
||||
y coordinate : 227
|
||||
Width : 33
|
||||
Height : 30
|
||||
Width : 45
|
||||
Height : 45
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
@@ -619,7 +619,7 @@ Text tIcon2
|
||||
Font ID : 1
|
||||
Back. Color : 0
|
||||
Font Color : 17299
|
||||
Horizontal Alignment : center
|
||||
Horizontal Alignment : right
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
@@ -817,7 +817,7 @@ Text tNotifyHead
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 0
|
||||
y coordinate : 257
|
||||
y coordinate : 272
|
||||
Width : 320
|
||||
Height : 58
|
||||
Effect : load
|
||||
@@ -847,7 +847,7 @@ Text tNotifyText
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 0
|
||||
y coordinate : 315
|
||||
y coordinate : 330
|
||||
Width : 320
|
||||
Height : 58
|
||||
Effect : load
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -3,19 +3,65 @@ import json
|
||||
from collections import defaultdict
|
||||
|
||||
keys = {
|
||||
'frontend.ui.card.light.brightness': 'lights.Brightness',
|
||||
# 'frontend.ui.card.light.brightness': 'lights.Color',
|
||||
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
|
||||
'backend.component.binary_sensor.state.window.off': 'window.closed',
|
||||
'backend.component.binary_sensor.state.window.on': 'window.opened',
|
||||
'backend.component.binary_sensor.state.door.off': 'door.closed',
|
||||
'backend.component.binary_sensor.state.door.on': 'door.opened',
|
||||
'frontend.ui.card.lock.lock': 'lock.LOCK',
|
||||
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
|
||||
'frontend.ui.card.cover.position': 'blinds.Position',
|
||||
'frontend.ui.card.climate.currently': 'thermostat.Currently',
|
||||
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
|
||||
'frontend.ui.card.climate.operation': 'thermostat.Action',
|
||||
'frontend.ui.card.light.brightness': 'lights.Brightness',
|
||||
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
|
||||
'backend.component.binary_sensor.state.window.off': 'window.closed',
|
||||
'backend.component.binary_sensor.state.window.on': 'window.opened',
|
||||
'backend.component.binary_sensor.state.door.off': 'door.closed',
|
||||
'backend.component.binary_sensor.state.door.on': 'door.opened',
|
||||
'frontend.ui.card.lock.lock': 'lock.LOCK',
|
||||
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
|
||||
'frontend.ui.card.cover.position': 'blinds.Position',
|
||||
'frontend.ui.card.climate.currently': 'thermostat.Currently',
|
||||
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
|
||||
'frontend.ui.card.climate.operation': 'thermostat.Action',
|
||||
|
||||
'frontend.ui.card.button.press': 'button.press',
|
||||
'frontend.ui.card.script.run': 'script.run',
|
||||
'frontend.ui.card.scene.activate': 'scene.activate',
|
||||
'frontend.ui.card.vacuum.actions.start_cleaning': 'vacuum.start_cleaning',
|
||||
'frontend.ui.card.vacuum.actions.return_to_base': 'vacuum.return_to_base',
|
||||
'frontend.ui.card.cover.tilt_position': 'blinds.tilt_position',
|
||||
'frontend.ui.card.fan.speed': 'fan.speed',
|
||||
'frontend.ui.card.timer.actions.start': 'timer.start',
|
||||
'frontend.ui.card.timer.actions.pause': 'timer.pause',
|
||||
'frontend.ui.card.timer.actions.cancel': 'timer.cancel',
|
||||
'frontend.ui.card.timer.actions.finish': 'timer.finish',
|
||||
'frontend.state_badge.alarm_control_panel.armed': 'alarm_control_panel.armed',
|
||||
'frontend.state_badge.alarm_control_panel.armed_away': 'alarm_control_panel.armed_away',
|
||||
'frontend.state_badge.alarm_control_panel.armed_custom_bypass': 'alarm_control_panel.armed_custom_bypass',
|
||||
'frontend.state_badge.alarm_control_panel.armed_home': 'alarm_control_panel.armed_home',
|
||||
'frontend.state_badge.alarm_control_panel.armed_night': 'alarm_control_panel.armed_night',
|
||||
'frontend.state_badge.alarm_control_panel.armed_vacation': 'alarm_control_panel.armed_vacation',
|
||||
'frontend.state_badge.alarm_control_panel.arming': 'alarm_control_panel.arming',
|
||||
'frontend.state_badge.alarm_control_panel.disarmed': 'alarm_control_panel.disarmed',
|
||||
'frontend.state_badge.alarm_control_panel.disarming': 'alarm_control_panel.disarming',
|
||||
'frontend.state_badge.alarm_control_panel.pending': 'alarm_control_panel.pending',
|
||||
'frontend.state_badge.alarm_control_panel.triggered': 'alarm_control_panel.triggered',
|
||||
'frontend.state_attributes.climate.hvac_action.cooling': 'hvac_action.cooling',
|
||||
'frontend.state_attributes.climate.hvac_action.drying': 'hvac_action.drying',
|
||||
'frontend.state_attributes.climate.hvac_action.fan': 'hvac_action.fan',
|
||||
'frontend.state_attributes.climate.hvac_action.heating': 'hvac_action.heating',
|
||||
'frontend.state_attributes.climate.hvac_action.idle': 'hvac_action.idle',
|
||||
'frontend.state_attributes.climate.hvac_action.off': 'hvac_action.off',
|
||||
'frontend.ui.card.alarm_control_panel.arm_away': 'alarm_control_panel.arm_away',
|
||||
'frontend.ui.card.alarm_control_panel.arm_custom_bypass': 'alarm_control_panel.arm_custom_bypass',
|
||||
'frontend.ui.card.alarm_control_panel.arm_home': 'alarm_control_panel.arm_home',
|
||||
'frontend.ui.card.alarm_control_panel.arm_night': 'alarm_control_panel.arm_night',
|
||||
'frontend.ui.card.alarm_control_panel.arm_vacation': 'alarm_control_panel.arm_vacation',
|
||||
'frontend.ui.card.alarm_control_panel.clear_code': 'alarm_control_panel.clear_code',
|
||||
'frontend.ui.card.alarm_control_panel.code': 'alarm_control_panel.code',
|
||||
'frontend.ui.card.alarm_control_panel.disarm': 'alarm_control_panel.disarm',
|
||||
'backend.component.climate.state._.off': 'climate.off',
|
||||
'backend.component.climate.state._.heat': 'climate.heat',
|
||||
'backend.component.climate.state._.cool': 'climate.cool',
|
||||
'backend.component.climate.state._.heat_cool': 'climate.heat_cool',
|
||||
'backend.component.climate.state._.auto': 'climate.auto',
|
||||
'backend.component.climate.state._.dry': 'climate.dry',
|
||||
'backend.component.climate.state._.fan_only': 'climate.fan_only',
|
||||
'backend.component.timer.state._.active': 'timer.active',
|
||||
'backend.component.timer.state._.idle': 'timer.idle',
|
||||
'backend.component.timer.state._.paused': 'timer.paused',
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +97,8 @@ def lookup(path_frontend_file, path_backend_file, lookupstr):
|
||||
if k in res:
|
||||
res = res[k]
|
||||
if type(res) is not str:
|
||||
print("Warning result is not a String")
|
||||
print(f"Warning result is not a String: {lookupstr}")
|
||||
res = ""
|
||||
return res
|
||||
|
||||
def get_translation(locale, lookupstr):
|
||||
@@ -69,5 +116,5 @@ for src, dst in keys.items():
|
||||
|
||||
#print(json.dumps(out, indent=4, ensure_ascii=False))
|
||||
|
||||
with open("ioBroker_NSPanel_locales.json", "wb") as text_file:
|
||||
with open("ioBroker_NSPanel_locales_beta.json", "wb") as text_file:
|
||||
text_file.write(json.dumps(out, indent=4, ensure_ascii=False).encode('utf8'))
|
||||
|
||||
@@ -486,7 +486,7 @@ class LuiPagesGen(object):
|
||||
else:
|
||||
media_icon = self.generate_entities_item(entity, "cardGrid")
|
||||
ha_entity = apis.ha_api.get_entity(entityId)
|
||||
heading = title if title != "unknown" else entity.attributes.friendly_name
|
||||
heading = title if title != "unknown" else ha_entity.attributes.friendly_name
|
||||
title = get_attr_safe(ha_entity, "media_title", "")
|
||||
author = get_attr_safe(ha_entity, "media_artist", "")
|
||||
volume = int(get_attr_safe(ha_entity, "volume_level", 0)*100)
|
||||
|
||||
@@ -34,7 +34,7 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
||||
# eu version
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
||||
|
||||
desired_tasmota_driver_version = 6
|
||||
desired_tasmota_driver_version = 7
|
||||
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
|
||||
|
||||
mode = cfg.get("updateMode")
|
||||
|
||||
@@ -20,7 +20,7 @@ List of supported config keys of this card:
|
||||
key | optional | type | default | description
|
||||
-- | -- | -- | -- | --
|
||||
`type` | False | string | `None` | Type of the card
|
||||
`entities` | False | complex | `None` | contains a list of entities of this card
|
||||
`entity` | False | string | `None` | contains the entitiy of this card
|
||||
`title` | True | string | `None` | Title of the Page
|
||||
`temperatureUnit` | True | string | `celsius` | set this to fahrenheit to change the temperatureUnit on the page
|
||||
`key` | True | string | `None` | Used by navigate items in combination with the type (cardEntities_key)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2410
ioBroker/ioBroker_NSPanel_locales_beta.json
Normal file
2410
ioBroker/ioBroker_NSPanel_locales_beta.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -153,6 +153,7 @@ class Nextion : Driver
|
||||
if (self.flash_mode==1)
|
||||
var strv = msg[0..-4].asstring()
|
||||
if string.find(strv,"comok 2")>=0
|
||||
tasmota.delay(50)
|
||||
log("FLH: Send (High Speed) flash start")
|
||||
self.flash_start_millis = tasmota.millis()
|
||||
#self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
||||
@@ -162,6 +163,7 @@ class Nextion : Driver
|
||||
self.sendnx(string.format("whmi-wris %d,%d,res0",self.flash_size,self.flash_proto_baud))
|
||||
end
|
||||
if self.flash_proto_baud != 115200
|
||||
tasmota.delay(50)
|
||||
self.ser.deinit()
|
||||
self.ser = serial(17, 16, self.flash_proto_baud, serial.SERIAL_8N1)
|
||||
end
|
||||
@@ -319,7 +321,7 @@ tasmota.add_driver(nextion)
|
||||
|
||||
def get_current_version(cmd, idx, payload, payload_json)
|
||||
import string
|
||||
var version_of_this_script = 6
|
||||
var version_of_this_script = 7
|
||||
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user