Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Airzone Aidoo Zigbee - AZAI6ZBEMHI #7636

Merged
merged 21 commits into from
Jun 20, 2024

Conversation

GitCharlieHub
Copy link
Contributor

Added support for Airzone Aidoo Zigbee - AZAI6ZBEMHI

tz.fan_mode,
],
exposes: [
e.local_temperature(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use e.climate() instead (search this repo for examples)

endpoint: (device: Device): { [key: string]: number } => {
return { 'system': 1 };
},
meta: { configureKey: 1 } as any,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

e.enum('fan_mode', ea.ALL, ['off', 'low', 'medium', 'high', 'on', 'auto'])
.withDescription('Fan mode'),
],
endpoint: (device: Device): { [key: string]: number } => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

@@ -0,0 +1,66 @@
import {Definition, Device, Endpoint, Logger} from 'zigbee-herdsman-converters';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import {Definition, Device, Endpoint, Logger} from 'zigbee-herdsman-converters';
import {Definition, Device, Endpoint, Logger} from '../lib/types';


const definition: Definition = {
zigbeeModel: ['Aidoo Zigbee'],
model: 'Aidoo Zigbee AZAI6ZBEMHI',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
model: 'Aidoo Zigbee AZAI6ZBEMHI',
model: 'AZAI6ZBEMHI',

.withDescription('Specifies the cooling mode setpoint when the room is occupied.'),
e.enum('system_mode', ea.ALL, ['off', 'auto', 'cool', 'heat', 'fan_only', 'dry'])
.withDescription('Specifies the current operating mode of the thermostat. Supported values are:\n- 0x00 = OFF\n- 0x01 = Auto\n- 0x03 = Cool\n- 0x04 = Heat\n- 0x07 = Fan Only\n- 0x08 = Dry'),
e.binary('switch', ea.ALL),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
e.binary('switch', ea.ALL),
e.switch(),

e.enum('system_mode', ea.ALL, ['off', 'auto', 'cool', 'heat', 'fan_only', 'dry'])
.withDescription('Specifies the current operating mode of the thermostat. Supported values are:\n- 0x00 = OFF\n- 0x01 = Auto\n- 0x03 = Cool\n- 0x04 = Heat\n- 0x07 = Fan Only\n- 0x08 = Dry'),
e.binary('switch', ea.ALL),
e.enum('fan_mode', ea.ALL, ['off', 'low', 'medium', 'high', 'on', 'auto'])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
e.enum('fan_mode', ea.ALL, ['off', 'low', 'medium', 'high', 'on', 'auto'])
e.fan().withModes(['off', 'low', 'medium', 'high', 'on', 'auto'])

await reporting.onOff(endpoint, logger);
await reporting.fanMode(endpoint, logger);
},
device: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used, can be removed

.withSetpoint('occupied_cooling_setpoint', 5, 30, 0.5)
]
},
ha_category: 'climate'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used, can be removed

@GitCharlieHub
Copy link
Contributor Author

@Koenkk thanks for there pointers. used e.climate as you pointed out.

Still getting the following build error and clueless as on how to fix:
Error: src/devices/AirzoneAidoo.ts(1,21): error TS2305: Module '"../lib/types"' has no exported member 'Device'.
Error: src/devices/AirzoneAidoo.ts(1,29): error TS2305: Module '"../lib/types"' has no exported member 'Endpoint'.
Error: src/devices/AirzoneAidoo.ts(33,16): error TS7006: Parameter 'device' implicitly has an 'any' type.
Error: src/devices/AirzoneAidoo.ts(37,23): error TS7006: Parameter 'device' implicitly has an 'any' type.
Error: src/devices/AirzoneAidoo.ts(37,31): error TS7006: Parameter 'coordinatorEndpoint' implicitly has an 'any' type.
Error: src/devices/AirzoneAidoo.ts(37,52): error TS7006: Parameter 'logger' implicitly has an 'any' type.

I did the swap you mentioned above:

- import {Definition, Device, Endpoint, Logger} from 'zigbee-herdsman-converters';
+ import {Definition, Device, Endpoint, Logger} from '../lib/types';

@Koenkk Koenkk merged commit b64bf08 into Koenkk:master Jun 20, 2024
2 checks passed
@AlexisPolegato
Copy link
Contributor

File name shouldn't be "airzone.ts" ?
Airzone is the manufacturer name and Aidoo is the device name.

Regarding the Model / Desciption : The device can be used to control remotely an AC, it is compatible with many different kinds of AC Brands. Here you mention only the version compatible with Mitshubishi.
=> https://myzone.airzonefrance.fr/airzone-products/current-product-lines/aidoo/zigbee/?limit=15&page=1

In terms of Zigbee functionnality, it is only 1 product, so I think it would make more sense to make something generic as done in #7405 otherwise we would need to create dozens of reference.

Also, the ACLouverPosition Attribute is missing here.

@Koenkk
Copy link
Owner

Koenkk commented Jun 21, 2024

@AlexisPolegato could you submit a pr to fix these problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants