Grove amend name (#5093)

This commit is contained in:
Christian 2023-07-12 21:13:50 +01:00 committed by GitHub
parent 8c5978599a
commit 119bbba254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 25 deletions

View file

@ -104,7 +104,7 @@ esphome/components/gp8403/* @jesserockz
esphome/components/gpio/* @esphome/core
esphome/components/gps/* @coogle
esphome/components/graph/* @synco
esphome/components/grove_i2c_motor/* @max246
esphome/components/grove_tb6612fng/* @max246
esphome/components/growatt_solar/* @leeuwte
esphome/components/haier/* @paveldn
esphome/components/havells_solar/* @sourabhjaiswal

View file

@ -14,23 +14,23 @@ DEPENDENCIES = ["i2c"]
CODEOWNERS = ["@max246"]
grove_i2c_motor_ns = cg.esphome_ns.namespace("grove_i2c_motor")
GROVE_TB6612FNG = grove_i2c_motor_ns.class_(
grove_tb6612fng_ns = cg.esphome_ns.namespace("grove_tb6612fng")
GROVE_TB6612FNG = grove_tb6612fng_ns.class_(
"GroveMotorDriveTB6612FNG", cg.Component, i2c.I2CDevice
)
GROVETB6612FNGMotorRunAction = grove_i2c_motor_ns.class_(
GROVETB6612FNGMotorRunAction = grove_tb6612fng_ns.class_(
"GROVETB6612FNGMotorRunAction", automation.Action
)
GROVETB6612FNGMotorBrakeAction = grove_i2c_motor_ns.class_(
GROVETB6612FNGMotorBrakeAction = grove_tb6612fng_ns.class_(
"GROVETB6612FNGMotorBrakeAction", automation.Action
)
GROVETB6612FNGMotorStopAction = grove_i2c_motor_ns.class_(
GROVETB6612FNGMotorStopAction = grove_tb6612fng_ns.class_(
"GROVETB6612FNGMotorStopAction", automation.Action
)
GROVETB6612FNGMotorStandbyAction = grove_i2c_motor_ns.class_(
GROVETB6612FNGMotorStandbyAction = grove_tb6612fng_ns.class_(
"GROVETB6612FNGMotorStandbyAction", automation.Action
)
GROVETB6612FNGMotorNoStandbyAction = grove_i2c_motor_ns.class_(
GROVETB6612FNGMotorNoStandbyAction = grove_tb6612fng_ns.class_(
"GROVETB6612FNGMotorNoStandbyAction", automation.Action
)
@ -57,7 +57,7 @@ async def to_code(config):
@automation.register_action(
"grove_i2c_motor.run",
"grove_tb6612fng.run",
GROVETB6612FNGMotorRunAction,
cv.Schema(
{
@ -68,7 +68,7 @@ async def to_code(config):
}
),
)
async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
async def grove_tb6612fng_run_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
await cg.register_parented(var, config[CONF_ID])
@ -83,7 +83,7 @@ async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
@automation.register_action(
"grove_i2c_motor.break",
"grove_tb6612fng.break",
GROVETB6612FNGMotorBrakeAction,
cv.Schema(
{
@ -92,7 +92,7 @@ async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
}
),
)
async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
async def grove_tb6612fng_break_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
await cg.register_parented(var, config[CONF_ID])
@ -102,7 +102,7 @@ async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
@automation.register_action(
"grove_i2c_motor.stop",
"grove_tb6612fng.stop",
GROVETB6612FNGMotorStopAction,
cv.Schema(
{
@ -111,7 +111,7 @@ async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
}
),
)
async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
async def grove_tb6612fng_stop_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
await cg.register_parented(var, config[CONF_ID])
@ -121,7 +121,7 @@ async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
@automation.register_action(
"grove_i2c_motor.standby",
"grove_tb6612fng.standby",
GROVETB6612FNGMotorStandbyAction,
cv.Schema(
{
@ -129,7 +129,7 @@ async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
}
),
)
async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args):
async def grove_tb6612fng_standby_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
await cg.register_parented(var, config[CONF_ID])
@ -137,7 +137,7 @@ async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args)
@automation.register_action(
"grove_i2c_motor.no_standby",
"grove_tb6612fng.no_standby",
GROVETB6612FNGMotorNoStandbyAction,
cv.Schema(
{
@ -145,7 +145,7 @@ async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args)
}
),
)
async def grove_i2c_motor_no_standby_to_code(config, action_id, template_arg, args):
async def grove_tb6612fng_no_standby_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
await cg.register_parented(var, config[CONF_ID])

View file

@ -1,9 +1,9 @@
#include "grove_i2c_motor.h"
#include "grove_tb6612fng.h"
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace grove_i2c_motor {
namespace grove_tb6612fng {
static const char *const TAG = "GroveMotorDriveTB6612FNG";
@ -167,5 +167,5 @@ void GroveMotorDriveTB6612FNG::stepper_keep_run(StepperModeTypeT mode, uint16_t
return;
}
}
} // namespace grove_i2c_motor
} // namespace grove_tb6612fng
} // namespace esphome

View file

@ -34,7 +34,7 @@
*/
namespace esphome {
namespace grove_i2c_motor {
namespace grove_tb6612fng {
enum MotorChannelTypeT {
MOTOR_CHA = 0,
@ -204,5 +204,5 @@ class GROVETB6612FNGMotorNoStandbyAction : public Action<Ts...>, public Parented
void play(Ts... x) override { this->parent_->not_standby(); }
};
} // namespace grove_i2c_motor
} // namespace grove_tb6612fng
} // namespace esphome

View file

@ -303,7 +303,7 @@ sm2135:
rgb_current: 20mA
cw_current: 60mA
grove_i2c_motor:
grove_tb6612fng:
id: test_motor
address: 0x14
@ -363,7 +363,7 @@ switch:
optimistic: True
on_turn_on:
then:
- grove_i2c_motor.run:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD