chore: clean up emitter-and-signal library design

This commit is contained in:
J / Jacob Babich
2026-07-15 14:33:51 -04:00
parent a09a97d06d
commit 4786b1e6ba
5 changed files with 8 additions and 14 deletions

View File

@@ -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,
},
}

View File

@@ -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,
},
}

View File

@@ -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 },