1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 20:02:22 +01:00

Merge remote-tracking branch 'origin/dev' into nrf52

This commit is contained in:
Tomasz Duda
2024-05-05 21:38:47 +02:00
168 changed files with 6817 additions and 1808 deletions

View File

@@ -476,7 +476,7 @@ def lint_no_byte_datatype(fname, match):
def lint_constants_usage():
errs = []
for constant, uses in CONSTANTS_USES.items():
if len(uses) < 4:
if len(uses) < 3:
continue
errs.append(
f"Constant {highlight(constant)} is defined in {len(uses)} files. Please move all definitions of the "

View File

@@ -69,7 +69,9 @@ def create_components_graph():
sys.exit(1)
for dependency in comp.dependencies:
add_item_to_components_graph(components_graph, dependency, name)
add_item_to_components_graph(
components_graph, dependency.split(".")[0], name
)
for target_config in TARGET_CONFIGURATIONS:
CORE.data[KEY_CORE] = target_config
@@ -87,7 +89,9 @@ def create_components_graph():
add_item_to_components_graph(components_graph, platform_name, name)
for dependency in platform.dependencies:
add_item_to_components_graph(components_graph, dependency, name)
add_item_to_components_graph(
components_graph, dependency.split(".")[0], name
)
for target_config in TARGET_CONFIGURATIONS:
CORE.data[KEY_CORE] = target_config

View File

@@ -10,7 +10,6 @@ from homeassistant.components.event import EventDeviceClass
from homeassistant.components.number import NumberDeviceClass
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.components.text_sensor import TextSensorDeviceClass
from homeassistant.components.valve import ValveDeviceClass
# pylint: enable=import-error
@@ -28,7 +27,6 @@ DOMAINS = {
"number": NumberDeviceClass,
"sensor": SensorDeviceClass,
"switch": SwitchDeviceClass,
"text_sensor": TextSensorDeviceClass,
"valve": ValveDeviceClass,
}

View File

@@ -37,9 +37,9 @@ start_esphome() {
# Start esphome process
echo "> [$target_component] [$test_name] [$target_platform]"
echo "esphome -s component_name $target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file"
echo "esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file"
# TODO: Validate escape of Command line substitution value
esphome -s component_name $target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file
esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file
}
# Find all test yaml files.