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

Add Select for modbus (#3032)

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
stegm
2022-02-08 10:27:22 +01:00
committed by GitHub
parent 94f944dc9c
commit 58fa63ad88
9 changed files with 361 additions and 83 deletions

View File

@@ -773,9 +773,11 @@ class MockObj(Expression):
return MockObj(f"{self.base} &", "")
if name == "ptr":
return MockObj(f"{self.base} *", "")
if name == "const_ptr":
return MockObj(f"{self.base} *const", "")
if name == "const":
return MockObj(f"const {self.base}", "")
raise ValueError("Expected one of ref, ptr, const.")
raise ValueError("Expected one of ref, ptr, const_ptr, const.")
@property
def using(self) -> "MockObj":