mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
looks like pythons match isn't recognized yet
This commit is contained in:
parent
d4493eb3f4
commit
579443593b
4 changed files with 11 additions and 7 deletions
|
@ -472,8 +472,7 @@ async def to_code(config):
|
|||
|
||||
async def new_sensor(c, args, setter):
|
||||
s = None
|
||||
match args[1]:
|
||||
case "binary_sensor":
|
||||
if args[1] == "binary_sensor":
|
||||
s = await binary_sensor.new_binary_sensor(c)
|
||||
cg.add(getattr(var, setter + "_" + args[1])(s))
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace kt0803 {
|
||||
|
||||
#ifndef SUB_TEXT
|
||||
#define SUB_TEXT(name) \
|
||||
protected: \
|
||||
|
@ -50,3 +53,5 @@
|
|||
void publish_##name##_text_sensor() { this->publish(this->name##_text_sensor_, this->get_##name##_text_sensor()); } \
|
||||
std::string get_##name##_text_sensor();
|
||||
|
||||
} // namespace kt0803
|
||||
} // namespace esphome
|
||||
|
|
|
@ -24,7 +24,7 @@ kt0803:
|
|||
au_enhance: False
|
||||
ref_clk:
|
||||
enable: False
|
||||
ref_clk: '32.768kHz'
|
||||
sel: '32.768kHz'
|
||||
xtal:
|
||||
enable: True
|
||||
sel: '32.768kHz'
|
||||
|
@ -109,7 +109,7 @@ select:
|
|||
sel:
|
||||
name: Xtal Selection
|
||||
ref_clk:
|
||||
ref_clk:
|
||||
sel:
|
||||
name: Refence Clock
|
||||
alc:
|
||||
attack_time:
|
||||
|
|
|
@ -24,7 +24,7 @@ kt0803:
|
|||
au_enhance: False
|
||||
ref_clk:
|
||||
enable: False
|
||||
ref_clk: '32.768kHz'
|
||||
sel: '32.768kHz'
|
||||
xtal:
|
||||
enable: True
|
||||
sel: '32.768kHz'
|
||||
|
@ -109,7 +109,7 @@ select:
|
|||
sel:
|
||||
name: Xtal Selection
|
||||
ref_clk:
|
||||
ref_clk:
|
||||
sel:
|
||||
name: Refence Clock
|
||||
alc:
|
||||
attack_time:
|
||||
|
|
Loading…
Reference in a new issue