Merge branch '86-hope-fix' into 'dev'
fix dimmer scene state Closes #86 See merge request sa4-2020/the-sanmarinoes/frontend!101
This commit is contained in:
commit
13f75e986e
1 changed files with 8 additions and 2 deletions
|
@ -169,7 +169,7 @@ class Light extends Component {
|
|||
|
||||
return (
|
||||
<div>
|
||||
{this.props.stateOrDevice.kind === "dimmableLight"
|
||||
{this.props.device.kind === "dimmableLight"
|
||||
? intensityLightView
|
||||
: normalLightView}
|
||||
</div>
|
||||
|
@ -185,7 +185,13 @@ const mapStateToProps = (state, ownProps) => ({
|
|||
return state.sceneStates[ownProps.id];
|
||||
}
|
||||
},
|
||||
//device: state.devices[ownProps.id],
|
||||
get device() {
|
||||
if (state.active.activeTab === "Devices") {
|
||||
return state.devices[ownProps.id];
|
||||
} else {
|
||||
return state.devices[state.sceneStates[ownProps.id].deviceId];
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const LightContainer = connect(mapStateToProps, RemoteService)(Light);
|
||||
|
|
Loading…
Reference in a new issue