chore: clean up emitter-and-signal library design
This commit is contained in:
@@ -19,7 +19,7 @@ mod mode;
|
||||
pub use attributes::InputNumberAttributes;
|
||||
pub use mode::InputNumberMode;
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
#[derive(Debug, Clone, Snafu)]
|
||||
pub enum CreateSignalError {
|
||||
/// couldn't get the underlying state object signal
|
||||
StateObjectSignalError {
|
||||
@@ -28,7 +28,7 @@ pub enum CreateSignalError {
|
||||
|
||||
/// couldn't map the state object to a power value
|
||||
MappedSignalError {
|
||||
source: emitter_and_signal::signal_ext::ProducerAlreadyExited,
|
||||
source: emitter_and_signal::ProducerExited,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ pub enum CreateSignalError {
|
||||
|
||||
/// couldn't map the state object to a power value
|
||||
MappedSignalError {
|
||||
source: emitter_and_signal::signal_ext::ProducerAlreadyExited,
|
||||
source: emitter_and_signal::ProducerExited,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ pub struct StateObject<State, Attributes, ContextEvent> {
|
||||
pub type ExtractStateObjectError<'a, 'py, State, Attributes, ContextEvent> =
|
||||
<StateObject<State, Attributes, ContextEvent> as FromPyObject<'a, 'py>>::Error;
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
#[derive(Debug, Clone, Snafu)]
|
||||
pub enum CreateSignalError {
|
||||
/// couldn't get the state machine from the Home Assistant object
|
||||
GetStatesError { source: GetStatesError },
|
||||
|
||||
Reference in New Issue
Block a user