mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Grove amend name (#5093)
This commit is contained in:
		| @@ -104,7 +104,7 @@ esphome/components/gp8403/* @jesserockz | |||||||
| esphome/components/gpio/* @esphome/core | esphome/components/gpio/* @esphome/core | ||||||
| esphome/components/gps/* @coogle | esphome/components/gps/* @coogle | ||||||
| esphome/components/graph/* @synco | esphome/components/graph/* @synco | ||||||
| esphome/components/grove_i2c_motor/* @max246 | esphome/components/grove_tb6612fng/* @max246 | ||||||
| esphome/components/growatt_solar/* @leeuwte | esphome/components/growatt_solar/* @leeuwte | ||||||
| esphome/components/haier/* @paveldn | esphome/components/haier/* @paveldn | ||||||
| esphome/components/havells_solar/* @sourabhjaiswal | esphome/components/havells_solar/* @sourabhjaiswal | ||||||
|   | |||||||
| @@ -14,23 +14,23 @@ DEPENDENCIES = ["i2c"] | |||||||
| 
 | 
 | ||||||
| CODEOWNERS = ["@max246"] | CODEOWNERS = ["@max246"] | ||||||
| 
 | 
 | ||||||
| grove_i2c_motor_ns = cg.esphome_ns.namespace("grove_i2c_motor") | grove_tb6612fng_ns = cg.esphome_ns.namespace("grove_tb6612fng") | ||||||
| GROVE_TB6612FNG = grove_i2c_motor_ns.class_( | GROVE_TB6612FNG = grove_tb6612fng_ns.class_( | ||||||
|     "GroveMotorDriveTB6612FNG", cg.Component, i2c.I2CDevice |     "GroveMotorDriveTB6612FNG", cg.Component, i2c.I2CDevice | ||||||
| ) | ) | ||||||
| GROVETB6612FNGMotorRunAction = grove_i2c_motor_ns.class_( | GROVETB6612FNGMotorRunAction = grove_tb6612fng_ns.class_( | ||||||
|     "GROVETB6612FNGMotorRunAction", automation.Action |     "GROVETB6612FNGMotorRunAction", automation.Action | ||||||
| ) | ) | ||||||
| GROVETB6612FNGMotorBrakeAction = grove_i2c_motor_ns.class_( | GROVETB6612FNGMotorBrakeAction = grove_tb6612fng_ns.class_( | ||||||
|     "GROVETB6612FNGMotorBrakeAction", automation.Action |     "GROVETB6612FNGMotorBrakeAction", automation.Action | ||||||
| ) | ) | ||||||
| GROVETB6612FNGMotorStopAction = grove_i2c_motor_ns.class_( | GROVETB6612FNGMotorStopAction = grove_tb6612fng_ns.class_( | ||||||
|     "GROVETB6612FNGMotorStopAction", automation.Action |     "GROVETB6612FNGMotorStopAction", automation.Action | ||||||
| ) | ) | ||||||
| GROVETB6612FNGMotorStandbyAction = grove_i2c_motor_ns.class_( | GROVETB6612FNGMotorStandbyAction = grove_tb6612fng_ns.class_( | ||||||
|     "GROVETB6612FNGMotorStandbyAction", automation.Action |     "GROVETB6612FNGMotorStandbyAction", automation.Action | ||||||
| ) | ) | ||||||
| GROVETB6612FNGMotorNoStandbyAction = grove_i2c_motor_ns.class_( | GROVETB6612FNGMotorNoStandbyAction = grove_tb6612fng_ns.class_( | ||||||
|     "GROVETB6612FNGMotorNoStandbyAction", automation.Action |     "GROVETB6612FNGMotorNoStandbyAction", automation.Action | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| @@ -57,7 +57,7 @@ async def to_code(config): | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @automation.register_action( | @automation.register_action( | ||||||
|     "grove_i2c_motor.run", |     "grove_tb6612fng.run", | ||||||
|     GROVETB6612FNGMotorRunAction, |     GROVETB6612FNGMotorRunAction, | ||||||
|     cv.Schema( |     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) |     var = cg.new_Pvariable(action_id, template_arg) | ||||||
|     await cg.register_parented(var, config[CONF_ID]) |     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( | @automation.register_action( | ||||||
|     "grove_i2c_motor.break", |     "grove_tb6612fng.break", | ||||||
|     GROVETB6612FNGMotorBrakeAction, |     GROVETB6612FNGMotorBrakeAction, | ||||||
|     cv.Schema( |     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) |     var = cg.new_Pvariable(action_id, template_arg) | ||||||
|     await cg.register_parented(var, config[CONF_ID]) |     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( | @automation.register_action( | ||||||
|     "grove_i2c_motor.stop", |     "grove_tb6612fng.stop", | ||||||
|     GROVETB6612FNGMotorStopAction, |     GROVETB6612FNGMotorStopAction, | ||||||
|     cv.Schema( |     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) |     var = cg.new_Pvariable(action_id, template_arg) | ||||||
|     await cg.register_parented(var, config[CONF_ID]) |     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( | @automation.register_action( | ||||||
|     "grove_i2c_motor.standby", |     "grove_tb6612fng.standby", | ||||||
|     GROVETB6612FNGMotorStandbyAction, |     GROVETB6612FNGMotorStandbyAction, | ||||||
|     cv.Schema( |     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) |     var = cg.new_Pvariable(action_id, template_arg) | ||||||
|     await cg.register_parented(var, config[CONF_ID]) |     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( | @automation.register_action( | ||||||
|     "grove_i2c_motor.no_standby", |     "grove_tb6612fng.no_standby", | ||||||
|     GROVETB6612FNGMotorNoStandbyAction, |     GROVETB6612FNGMotorNoStandbyAction, | ||||||
|     cv.Schema( |     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) |     var = cg.new_Pvariable(action_id, template_arg) | ||||||
|     await cg.register_parented(var, config[CONF_ID]) |     await cg.register_parented(var, config[CONF_ID]) | ||||||
| 
 | 
 | ||||||
| @@ -1,9 +1,9 @@ | |||||||
| #include "grove_i2c_motor.h" | #include "grove_tb6612fng.h" | ||||||
| #include "esphome/core/log.h" | #include "esphome/core/log.h" | ||||||
| #include "esphome/core/hal.h" | #include "esphome/core/hal.h" | ||||||
| 
 | 
 | ||||||
| namespace esphome { | namespace esphome { | ||||||
| namespace grove_i2c_motor { | namespace grove_tb6612fng { | ||||||
| 
 | 
 | ||||||
| static const char *const TAG = "GroveMotorDriveTB6612FNG"; | static const char *const TAG = "GroveMotorDriveTB6612FNG"; | ||||||
| 
 | 
 | ||||||
| @@ -167,5 +167,5 @@ void GroveMotorDriveTB6612FNG::stepper_keep_run(StepperModeTypeT mode, uint16_t | |||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| } | } | ||||||
| }  // namespace grove_i2c_motor
 | }  // namespace grove_tb6612fng
 | ||||||
| }  // namespace esphome
 | }  // namespace esphome
 | ||||||
| @@ -34,7 +34,7 @@ | |||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| namespace esphome { | namespace esphome { | ||||||
| namespace grove_i2c_motor { | namespace grove_tb6612fng { | ||||||
| 
 | 
 | ||||||
| enum MotorChannelTypeT { | enum MotorChannelTypeT { | ||||||
|   MOTOR_CHA = 0, |   MOTOR_CHA = 0, | ||||||
| @@ -204,5 +204,5 @@ class GROVETB6612FNGMotorNoStandbyAction : public Action<Ts...>, public Parented | |||||||
|   void play(Ts... x) override { this->parent_->not_standby(); } |   void play(Ts... x) override { this->parent_->not_standby(); } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| }  // namespace grove_i2c_motor
 | }  // namespace grove_tb6612fng
 | ||||||
| }  // namespace esphome
 | }  // namespace esphome
 | ||||||
| @@ -303,7 +303,7 @@ sm2135: | |||||||
|   rgb_current: 20mA |   rgb_current: 20mA | ||||||
|   cw_current: 60mA |   cw_current: 60mA | ||||||
|  |  | ||||||
| grove_i2c_motor: | grove_tb6612fng: | ||||||
|   id: test_motor |   id: test_motor | ||||||
|   address: 0x14 |   address: 0x14 | ||||||
|  |  | ||||||
| @@ -363,7 +363,7 @@ switch: | |||||||
|     optimistic: True |     optimistic: True | ||||||
|     on_turn_on: |     on_turn_on: | ||||||
|       then: |       then: | ||||||
|         - grove_i2c_motor.run: |         - grove_tb6612fng.run: | ||||||
|             channel: 1 |             channel: 1 | ||||||
|             speed: 255 |             speed: 255 | ||||||
|             direction: BACKWARD |             direction: BACKWARD | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user