Showing 754 of 2,690 total issues
Function exports
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const deviceFeatureState = sequelize.define(
't_device_feature_state_aggregate',
{
id: {
Function newValueSingleWiredSwitchNeutral
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newValueSingleWiredSwitchNeutral(message, data) {
const { sid } = message;
logger.debug(`Xiaomi : New value single wired switch neutral, sid = ${sid}`);
const EXTERNAL_ID_BINARY = `xiaomi:${sid}:single-wired-switch-neutral:binary`;
const newSensor = {
Function setValue
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function setValue(device, deviceFeature, value) {
const externalId = deviceFeature.external_id;
const [prefix, topic] = deviceFeature.external_id.split(':');
if (prefix !== 'melcloud') {
throw new BadParameters(`MELCloud device external_id is invalid: "${externalId}" should starts with "melcloud:"`);
Function newValueSingleWiredSwitch
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newValueSingleWiredSwitch(message, data) {
const { sid } = message;
logger.debug(`Xiaomi : New value single wired switch, sid = ${sid}`);
const EXTERNAL_ID_BINARY = `xiaomi:${sid}:single-wired-switch:binary`;
const newSensor = {
Function init
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init() {
this.wss.on('connection', (ws) => {
let user;
let authenticated = false;
ws.on('close', () => {
Function kelvinToRGB
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function kelvinToRGB(kelvin) {
const temperature = kelvin / 100;
let red;
let green;
let blue;
Function buildPeripheral
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildPeripheral(broadlinkDevice) {
const deviceMapper = this.loadMapper(broadlinkDevice);
if (!deviceMapper) {
return null;
Function loadThermostatDetails
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function loadThermostatDetails() {
logger.debug('loading Thermostats details...');
let plugs;
const thermostats = [];
try {
Function getConfiguration
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getConfiguration() {
const mqttUrl = await this.gladys.variable.getValue(CONFIGURATION.MQTT_URL_KEY, this.serviceId);
const mqttUsername = await this.gladys.variable.getValue(CONFIGURATION.MQTT_USERNAME_KEY, this.serviceId);
const mqttPassword = await this.gladys.variable.getValue(CONFIGURATION.MQTT_PASSWORD_KEY, this.serviceId);
Function onNewCameraFile
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function onNewCameraFile(
cameraSelector,
folderPath,
cameraFolder,
filename,
Function createActions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const actions = {
async getSessions(state) {
store.setState({
sessionsGetStatus: RequestStatus.Getting
Function get
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function get(options) {
const optionsWithDefault = { ...DEFAULT_OPTIONS, ...options };
// add ability to get house
const includeExpand = [];
Function ACTIONS.CALENDAR.IS_EVENT_RUNNING
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[ACTIONS.CALENDAR.IS_EVENT_RUNNING]: async (self, action, scope, columnIndex, rowIndex) => {
// find if one event match the condition
const events = await self.calendar.findCurrentlyRunningEvent(
action.calendars,
action.calendar_event_name_comparator,
Function handleGoogleHomeMessage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function handleGoogleHomeMessage(data, rawMessage, cb) {
const service = this.serviceManager.getService('google-actions');
try {
const body = {
...data.data,
Function updateUser
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async updateUser(state, e) {
e.preventDefault();
store.setState({
ProfilePatchStatus: RequestStatus.Getting
});
Function login
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async login(state, e) {
if (e) {
e.preventDefault();
}
if (!validateEmail(state.gatewayLoginEmail)) {
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({ ipMask, disabled }) {
const { networkInterface, enabled, mask, name } = ipMask;
const editable = !networkInterface;
return (
<tr>
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({}, {}) {
return (
<div>
<p>
<Text id="editScene.triggersCard.mqttReceived.description" />
Function SceneManager
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
stateManager,
event,
device,
message,
variable,
Function Gateway
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
variable,
event,
system,
sequelize,
config,