Fix typos

This commit is contained in:
Koen Kanters
2021-07-24 16:13:11 +02:00
parent 236b751bd1
commit 6e84c149fe
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -43,11 +43,11 @@ class HomeAssistant extends Extension {
this.legacyApi = settings.get().advanced.legacy_api;
if (!settings.get().advanced.cache_state) {
logger.warn('In order for HomeAssistant integration to work properly set `cache_state: true');
logger.warn('In order for Home Assistant integration to work properly set `cache_state: true');
}
if (settings.get().experimental.output === 'attribute') {
throw new Error('Home Assitant integration is not possible with attribute output!');
throw new Error('Home Assistant integration is not possible with attribute output!');
}
this.discoveryTopic = settings.get().advanced.homeassistant_discovery_topic;
+2 -2
View File
@@ -803,14 +803,14 @@ describe('HomeAssistant extension', () => {
settings.set(['experimental', 'output'], 'attribute')
expect(() => {
const controller = new Controller(false);
}).toThrowError('Home Assitant integration is not possible with attribute output!');
}).toThrowError('Home Assistant integration is not possible with attribute output!');
});
it('Should warn when starting with cache_state false', async () => {
settings.set(['advanced', 'cache_state'], false);
logger.warn.mockClear();
const controller = new Controller(false);
expect(logger.warn).toHaveBeenCalledWith("In order for HomeAssistant integration to work properly set `cache_state: true");
expect(logger.warn).toHaveBeenCalledWith("In order for Home Assistant integration to work properly set `cache_state: true");
});
it('Should set missing values to null', async () => {