mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Merge pull request #1845 from proddy/dev
github action update for forks (sonar) and test data cleanup
This commit is contained in:
1
.github/workflows/sonar_check.yml
vendored
1
.github/workflows/sonar_check.yml
vendored
@@ -11,6 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and analyze
|
name: Build and analyze
|
||||||
|
if: github.repository == 'emsesp/EMS-ESP32'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
BUILD_WRAPPER_OUT_DIR: bw-output
|
BUILD_WRAPPER_OUT_DIR: bw-output
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ bool TemperatureSensor::Sensor::apply_customization() {
|
|||||||
#if defined(EMSESP_TEST)
|
#if defined(EMSESP_TEST)
|
||||||
void TemperatureSensor::test() {
|
void TemperatureSensor::test() {
|
||||||
// add 2 temperature sensors
|
// add 2 temperature sensors
|
||||||
// Sensor ID: 01-0203-0405-0607
|
// Sensor ID: 01_0203_0405_0607
|
||||||
uint8_t addr[ADDR_LEN] = {1, 2, 3, 4, 5, 6, 7, 8};
|
uint8_t addr[ADDR_LEN] = {1, 2, 3, 4, 5, 6, 7, 8};
|
||||||
sensors_.emplace_back(addr);
|
sensors_.emplace_back(addr);
|
||||||
sensors_.back().apply_customization();
|
sensors_.back().apply_customization();
|
||||||
|
|||||||
@@ -377,13 +377,13 @@ void WebCustomizationService::test() {
|
|||||||
// Temperature sensors
|
// Temperature sensors
|
||||||
webCustomization.sensorCustomizations.clear();
|
webCustomization.sensorCustomizations.clear();
|
||||||
auto sensor = SensorCustomization();
|
auto sensor = SensorCustomization();
|
||||||
sensor.id = "01-0203-0405-0607";
|
sensor.id = "01_0203_0405_0607";
|
||||||
sensor.name = "test_sensor1";
|
sensor.name = "test_sensor1";
|
||||||
sensor.offset = 0;
|
sensor.offset = 0;
|
||||||
webCustomization.sensorCustomizations.push_back(sensor);
|
webCustomization.sensorCustomizations.push_back(sensor);
|
||||||
|
|
||||||
auto sensor2 = SensorCustomization();
|
auto sensor2 = SensorCustomization();
|
||||||
sensor2.id = "0B-0C0D-0E0F-1011";
|
sensor2.id = "0B_0C0D_0E0F_1011";
|
||||||
sensor2.name = "test_sensor2";
|
sensor2.name = "test_sensor2";
|
||||||
sensor2.offset = 4;
|
sensor2.offset = 4;
|
||||||
webCustomization.sensorCustomizations.push_back(sensor2);
|
webCustomization.sensorCustomizations.push_back(sensor2);
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
"Customizations": {
|
"Customizations": {
|
||||||
"ts": [
|
"ts": [
|
||||||
{
|
{
|
||||||
"id": "01-0203-0405-0607",
|
"id": "01_0203_0405_0607",
|
||||||
"name": "test_sensor1",
|
"name": "test_sensor1",
|
||||||
"offset": 0
|
"offset": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "0B-0C0D-0E0F-1011",
|
"id": "0B_0C0D_0E0F_1011",
|
||||||
"name": "test_sensor2",
|
"name": "test_sensor2",
|
||||||
"offset": 4
|
"offset": 4
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
{
|
{
|
||||||
"product_id": 123,
|
"product_id": 123,
|
||||||
"device_id": 8,
|
"device_id": 8,
|
||||||
|
"custom_name": "Trendline",
|
||||||
"entity_ids": [
|
"entity_ids": [
|
||||||
"08heatingactive|is my heating on?"
|
"08heatingactive|is my heating on?"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user