mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 21:36:52 +00:00
Merge branch 'current' into rc
This commit is contained in:
commit
a6969a087b
2
.github/workflows/lock.yml
vendored
2
.github/workflows/lock.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2.0.1
|
||||
- uses: dessant/lock-threads@v2.0.3
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-inactive-days: "30"
|
||||
|
2
Gemfile
2
Gemfile
@ -19,7 +19,7 @@ group :jekyll_plugins do
|
||||
end
|
||||
|
||||
gem 'sinatra', '2.1.0'
|
||||
gem 'nokogiri', '1.10.10'
|
||||
gem 'nokogiri', '1.11.1'
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
# and associated library
|
||||
|
20
Gemfile.lock
20
Gemfile.lock
@ -29,7 +29,7 @@ GEM
|
||||
ffi (1.14.2-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.5)
|
||||
i18n (1.8.7)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.2.0)
|
||||
addressable (~> 2.4)
|
||||
@ -66,21 +66,23 @@ GEM
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.3.3)
|
||||
listen (3.4.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_portile2 (2.5.0)
|
||||
multi_json (1.15.0)
|
||||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogiri (1.10.10-x64-mingw32)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogiri (1.11.1)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.11.1-x64-mingw32)
|
||||
racc (~> 1.4)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
racc (1.5.2)
|
||||
rack (2.2.3)
|
||||
rack-protection (2.1.0)
|
||||
rack
|
||||
@ -112,7 +114,7 @@ GEM
|
||||
tilt (2.0.10)
|
||||
tzinfo (2.0.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo-data (1.2020.5)
|
||||
tzinfo-data (1.2020.6)
|
||||
tzinfo (>= 1.0.0)
|
||||
unicode-display_width (1.7.0)
|
||||
|
||||
@ -128,7 +130,7 @@ DEPENDENCIES
|
||||
jekyll-sitemap (= 1.4.0)
|
||||
jekyll-time-to-read (= 0.1.2)
|
||||
jekyll-toc (= 0.16.1)
|
||||
nokogiri (= 1.10.10)
|
||||
nokogiri (= 1.11.1)
|
||||
rake (= 13.0.3)
|
||||
sass-globbing (= 1.1.5)
|
||||
sinatra (= 2.1.0)
|
||||
|
@ -266,18 +266,19 @@ Supported abbreviations for device registry configuration:
|
||||
|
||||
The following software has built-in support for MQTT discovery:
|
||||
|
||||
- [Tasmota](https://github.com/arendst/Tasmota) (starting with 5.11.1e)
|
||||
- [Arilux AL-LC0X LED controllers](https://github.com/mertenats/Arilux_AL-LC0X)
|
||||
- [ESPHome](https://esphome.io)
|
||||
- [ESPurna](https://github.com/xoseperez/espurna)
|
||||
- [SmartHome](https://github.com/roncoa/SmartHome)
|
||||
- [Arilux AL-LC0X LED controllers](https://github.com/mertenats/Arilux_AL-LC0X)
|
||||
- [room-assistant](https://github.com/mKeRix/room-assistant) (starting with 1.1.0)
|
||||
- [Zigbee2mqtt](https://github.com/koenkk/zigbee2mqtt)
|
||||
- [Zwave2Mqtt](https://github.com/OpenZWave/Zwave2Mqtt) (starting with 2.0.1)
|
||||
- [IOTLink](https://iotlink.gitlab.io) (starting with 2.0.0)
|
||||
- [WyzeSense2MQTT](https://github.com/raetha/wyzesense2mqtt)
|
||||
- [MiFlora MQTT Daemon](https://github.com/ThomDietrich/miflora-mqtt-daemon)
|
||||
- [OpenMQTTGateway](https://github.com/1technophile/OpenMQTTGateway)
|
||||
- [room-assistant](https://github.com/mKeRix/room-assistant) (starting with 1.1.0)
|
||||
- [SmartHome](https://github.com/roncoa/SmartHome)
|
||||
- [Tasmota](https://github.com/arendst/Tasmota) (starting with 5.11.1e, development halted)
|
||||
- [WyzeSense2MQTT](https://github.com/raetha/wyzesense2mqtt)
|
||||
- [Xiaomi DaFang Hacks](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks)
|
||||
- [Zigbee2mqtt](https://github.com/koenkk/zigbee2mqtt)
|
||||
- [Zwave2Mqtt](https://github.com/OpenZWave/Zwave2Mqtt) (starting with 2.0.1)
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -52,6 +52,21 @@ echo -e -n "...turn on/off string from examples above..." | cu -l /dev/zstick -s
|
||||
|
||||
You need to disable the on-board Bluetooth since the board requires the use of the hardware UART (and there's only one on the Pi3). You do this by adding the following to the end of `/boot/config.txt`:
|
||||
|
||||
For both processes below you will need to insert your SD card into your PC and open the `/boot/config.txt` file with your favorite text editor.
|
||||
|
||||
#### Raspberry Pi 4 procedure
|
||||
|
||||
Add the following paramaters to the bottom of the `/boot/config.txt` file.
|
||||
|
||||
```text
|
||||
dtoverlay=disable-bt
|
||||
enable_uart=1
|
||||
```
|
||||
|
||||
Reboot your Pi 4 without the Razberry Z-Wave hat first. Then shutdown, add the hat back, and boot again.
|
||||
|
||||
#### Raspberry Pi 3 procedure
|
||||
|
||||
```text
|
||||
dtoverlay=pi3-disable-bt
|
||||
```
|
||||
|
@ -306,23 +306,24 @@ First create a file called `alexa_confirm.yaml` with something like the followin
|
||||
{% raw %}
|
||||
|
||||
```text
|
||||
{{ [
|
||||
"OK",
|
||||
"Sure",
|
||||
"If you insist",
|
||||
"Done",
|
||||
"No worries",
|
||||
"I can do that",
|
||||
"Leave it to me",
|
||||
"Consider it done",
|
||||
"As you wish",
|
||||
"By your command",
|
||||
"Affirmative",
|
||||
"Yes oh revered one",
|
||||
"I will",
|
||||
"As you decree, so shall it be",
|
||||
"No Problem"
|
||||
] | random }}
|
||||
>
|
||||
{{ [
|
||||
"OK",
|
||||
"Sure",
|
||||
"If you insist",
|
||||
"Done",
|
||||
"No worries",
|
||||
"I can do that",
|
||||
"Leave it to me",
|
||||
"Consider it done",
|
||||
"As you wish",
|
||||
"By your command",
|
||||
"Affirmative",
|
||||
"Yes oh revered one",
|
||||
"I will",
|
||||
"As you decree, so shall it be",
|
||||
"No Problem"
|
||||
] | random }}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -35,7 +35,7 @@ To ensure a clean re-configuration, please perform the following steps:
|
||||
|
||||
If you have previously set up your TV with any Home Assistant instances, you must remove Home Assistant from your TV in order for your TV to generate a new pin. To do this, you must do **one** of the following:
|
||||
|
||||
- On your TV, go to: **Settings** -> **Network** -> **Remote device settings** -> **Deregister remote device**. Menu titles may differ slightly between models. If needed, refer to your specific model's [manual](https://www.sony.com/electronics/support/manuals) for additional guidiance.
|
||||
- On your TV, go to: **Settings** -> **Network** -> **Remote device settings** -> **Deregister remote device**. Disable and re-enable the **Control remotely** after. Menu titles may differ slightly between models. If needed, refer to your specific model's [manual](https://www.sony.com/electronics/support/manuals) for additional guidiance.
|
||||
- Reset your TV to factory condition.
|
||||
|
||||
## Configuration using YAML
|
||||
|
@ -24,7 +24,7 @@ The Broadlink integration allows you to control and monitor Broadlink universal
|
||||
|
||||
## Configuration
|
||||
|
||||
To set up a Broadlink device, click _Configuration_ in the sidebar and click _Integrations_. If you see your device there, click _Configure_. If not, click the + icon in the lower right, enter the hostname or IP address of the device and follow the instructions to complete the setup.
|
||||
To set up a Broadlink device, click _Configuration_ in the sidebar and click _Integrations_. If you see your device there, click _Configure_. If not, click the + icon in the lower right, select Broadlink from the list, enter the hostname or IP address of the device and follow the instructions to complete the setup.
|
||||
|
||||
### Entities and subdomains
|
||||
|
||||
|
@ -26,3 +26,10 @@ To add `Brother Printer` to your installation, go to **Configuration** >> **Inte
|
||||
Some very old Brother printers use different data format and these models are not supported. The integration will show information about that during configuration.
|
||||
|
||||
</div>
|
||||
|
||||
## Configuring the printer
|
||||
|
||||
To set SNMP, navigate to the printer's web interface (for example: `http://192.168.5.6`) and turn it on under Network / Protocol / SNMP.
|
||||
For some Brother devices, `SNMPv3 read-write access and v1/v2c read-only access` is the option required (under advanced settings).
|
||||
|
||||

|
||||
|
@ -31,7 +31,8 @@ Generate a Client ID and Client Secret on
|
||||
1. You then need to select a `Support email`. To do this, simply click the drop down box and select your email address.
|
||||
1. You finally need to complete the section: `Developer contact information`. To do this, simply enter your email address (same as above is fine).
|
||||
1. Scroll to the bottom and click `save`. (You don't have to fill out anything else)
|
||||
1. You will then be automatically taken to the OAuth consent screen, you don't need to do anything here. Instead, click Credentials in the menu on the left hand side of the screen, then click `+ Create credentials` (at the top of the screen), then select `OAuth client ID`.
|
||||
1. You will then be automatically taken to the OAuth consent screen, you do not need to add any scopes here so click `SAVE AND CONTINUE` to move to the `Test users` page. You will need to add the Gmail address you will be using with this integration as a test user before you will be allowed to use the API. Once you have added your email address under `Test users` click `SAVE AND CONTINUE` which will take to to the 'Summary' page (you do not need to do anything here).
|
||||
1. Click Credentials in the menu on the left hand side of the screen, then click `+ Create credentials` (at the top of the screen), then select `OAuth client ID`.
|
||||
1. Set the Application type to `TV and Limited Input` and give this credential set a name (like "Home Assistant Credentials") then click 'Create'.
|
||||
1. You will then be presented with a pop-up saying 'OAuth client created' showing `Your Client ID` and `Your Client Secret`. Make a note of these (for example, copy and paste them into a text editor) as you will need to put these in your `configuration.yaml` file shortly. Once you have noted these strings, click `OK`. If you need to find these credentials again at any point then simply nagivate to `APIs & Services` > `Credentials` and you will see `Home Assistant Credentials` (or whatever you named them in the previous step) under `OAuth 2.0 Clident IDs`. To view both the `Client ID` and `Client secret`, click on the pencil icon, this will take you to the settings page for these credentials and the information will be on the right hand side of the page.
|
||||
1. We need to double check that the "Google Calendar API" has been automatically enabled. To do this, select `Library` from the menu, then search for "Google Calendar API". If it is enabled you will see `API Enabled` with a green tick next to it. If it is not enabled, then enable it.
|
||||
@ -75,8 +76,7 @@ track_new_calendar:
|
||||
default: true
|
||||
{% endconfiguration %}
|
||||
|
||||
The next time you run or restart Home Assistant, you should find a new notification (the little bell icon in the lower left corner). Click on that notification it will give you a link and an authentication code. Click on that link to open a Google website where you should enter the code found in the notification. This will grant your Home Assistant service read-only access to all the Google Calendars that the account you
|
||||
authenticate with can read.
|
||||
The next time you run or restart Home Assistant, you should find a new notification (the little bell icon in the lower-left corner). Click on that notification it will give you a link and an authentication code. Click on that link to open a Google website where you should enter the code found in the notification (**NOTE**: You may get a message telling you that the API has not been verified and you will need to acknowledge that in order to proceed). This will grant your Home Assistant service read-only access to all the Google Calendars that the account you authenticate with can read.
|
||||
|
||||
## Calendar Configuration
|
||||
|
||||
|
@ -65,6 +65,7 @@ Known supported devices:
|
||||
- Marantz NR1602
|
||||
- Marantz NR1604
|
||||
- Marantz NR1607
|
||||
- Marantz NR1710
|
||||
- Other Denon AVR receivers (untested)
|
||||
- Marantz receivers (experimental)
|
||||
|
||||
|
@ -219,7 +219,7 @@ All Evohome entities may have faults, and these can be turned into sensors, or:
|
||||
|
||||
```text
|
||||
{% if state_attr('climate.bedroom', 'status').active_faults %}
|
||||
{% if state_attr('climate.bedroom', 'status').active_faults[0].fault_type == 'TempZoneActuatorLowBattery' %}
|
||||
{% if state_attr('climate.bedroom', 'status').active_faults[0].faultType == 'TempZoneActuatorLowBattery' %}
|
||||
There is a low battery
|
||||
{% endif %}
|
||||
There is a Fault!
|
||||
|
@ -57,6 +57,7 @@ and has been confirmed to work with the following models:
|
||||
- DS-2CD2042WD-I
|
||||
- DS-2CD2142FWD-I
|
||||
- DS-2CD2155FWD-IS
|
||||
- DS-2CD2385G1
|
||||
- IPC-D140H(-M)
|
||||
- DS-7616NI-K2 (NVR)
|
||||
|
||||
|
@ -25,6 +25,10 @@ switch:
|
||||
host: 192.168.1.32
|
||||
```
|
||||
|
||||
In the Hikvision camera settings you also need to make a few changes:
|
||||
- In the camera menu navigate to Network >> Advanced Settings >> Integration Protocol. Check the 'Enable Hikvision-CGI' box and set the 'Hikvision-CGI Authentication' to 'digest/basic'.
|
||||
- Make sure the camera user has the rights to change parameter settings. In the menu navigate to System Settings >> User Management >> User Management. Select the correct user, click 'Modify' en check the 'Remote: Parameters Settings' box.
|
||||
|
||||
{% configuration %}
|
||||
host:
|
||||
description: The IP address of your Hikvision camera, e.g., `192.168.1.32`.
|
||||
|
@ -16,7 +16,7 @@ The `mcp23017` integration is the base for all related mcp23017 platforms in Hom
|
||||
|
||||
For more details about the MCP23017 I2C I/O port expander you can find its datasheet here: [MCP23017](https://www.microchip.com/wwwproducts/en/MCP23017).
|
||||
|
||||
If you are using the Home Assistant Operating System you can’t use existing methods to enable the I2C bus on a Raspberry Pi, you will have to [enable the I2C interface manually](https://github.com/home-assistant/hassos/blob/dev/Documentation/boards/raspberrypi.md#i2c) using a USB stick. To accomplish that, follow this step by step instructions: [Enable Home Assistant Operating System i2c](https://www.home-assistant.io/hassio/enable_i2c).
|
||||
If you are using the Home Assistant Operating System you can’t use existing methods to enable the I2C bus on a Raspberry Pi, you will have to [enable the I2C interface manually](https://github.com/home-assistant/operating-system/tree/dev/Documentation/boards/raspberrypi#i2c) using a USB stick. To accomplish that, follow this step by step instructions: [Enable Home Assistant Operating System i2c](/hassio/enable_i2c).
|
||||
|
||||
## Binary Sensor
|
||||
|
||||
|
@ -121,6 +121,7 @@ script:
|
||||
- TX-65EXW784
|
||||
- TX-65FX720W
|
||||
- TX-L42ET50
|
||||
- TX-L47ET60E (can't power on)
|
||||
- TX-P42STW50
|
||||
- TX-P50GT30Y
|
||||
- TX-P50GT60E
|
||||
|
@ -86,18 +86,18 @@ To use this presence detection in your installation, add the following to your `
|
||||
device_tracker:
|
||||
- platform: ping
|
||||
hosts:
|
||||
hostname: 192.168.2.10
|
||||
device_name_1: 192.168.2.10
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
hosts:
|
||||
description: List of device names and their corresponding IP address or hostname. Device names must conform to the standard requirements of lower case, numbers and underscore only - see [entity names](/docs/configuration/troubleshooting/#entity-names).
|
||||
description: Map of device names and their corresponding IP address or hostname. Device names must conform to the standard requirements of lower case, numbers and underscore only - see [entity names](/docs/configuration/troubleshooting/#entity-names).
|
||||
required: true
|
||||
type: list
|
||||
type: map
|
||||
count:
|
||||
description: Number of packet used for each device (avoid false detection).
|
||||
required: false
|
||||
type: integer
|
||||
{% endconfiguration %}
|
||||
|
||||
See the [device tracker integration page](/integrations/device_tracker/) for instructions how to configure the people to be tracked.
|
||||
See the [person integration page](/integrations/person/) for instructions on how to configure the people to be tracked.
|
||||
|
@ -50,6 +50,8 @@ spotify:
|
||||
client_secret: YOUR_CLIENT_SECRET
|
||||
```
|
||||
|
||||
Restart your Home Assistant instance before continuing with the next step.
|
||||
|
||||
{% configuration %}
|
||||
client_id:
|
||||
description: Client ID from your Spotify Developer application.
|
||||
@ -66,8 +68,8 @@ client_secret:
|
||||
- Access Home Assistant using the URL that you used in the **Redirect URI** step above
|
||||
- Go to the **Configuration** page in the Home Assistant frontend.
|
||||
- Click on **Integrations**.
|
||||
- Click the orange **+** on the bottom-right.
|
||||
- Click on "Spotify".
|
||||
- Click the **Add Integration** button in the bottom-right.
|
||||
- Select "Spotify".
|
||||
- Once the new Spotify tab opens, enter your Spotify credentials and allow Home Assistant to access your Spotify account.
|
||||
|
||||
<div class='note'>
|
||||
|
@ -5,6 +5,7 @@ ha_category:
|
||||
- Energy
|
||||
ha_release: 2020.12
|
||||
ha_iot_class: Cloud Polling
|
||||
ha_domain: srp_energy
|
||||
---
|
||||
|
||||
The SRP Energy integration shows information from SRP hourly energy usage report for their customers.
|
||||
|
@ -38,6 +38,7 @@ Plugs are type `switch` when autodiscovery has been disabled.
|
||||
- HS105
|
||||
- HS110 (This device is capable of reporting energy usage data to template sensors)
|
||||
- KP105
|
||||
- KP115
|
||||
|
||||
### Strip (Multi-Plug)
|
||||
|
||||
@ -140,6 +141,7 @@ tplink:
|
||||
Devices that are confirmed to support Consumption Reading;
|
||||
1. HS110
|
||||
2. HS300
|
||||
3. KP115
|
||||
|
||||
In order to get the power consumption readings from a TP-Link HS110 device, you'll have to create a [template sensor](/integrations/template/).
|
||||
In the example below, change all of the `my_tp_switch`'s to match your device's entity ID (without the domain). For example, if your entity is `switch.whale_heater` then replace `my_tp_switch` with `whale_heater`:
|
||||
|
@ -41,3 +41,9 @@ password:
|
||||
required: true
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## Velux Active (KIX 300)
|
||||
|
||||
The Velux Active (KIX 300) set is not supported by this integration. To integrate Velux Active (KIX 300) with Home Assistant, you can use the [HomeKit Controller](/integrations/homekit_controller) integration and get full control over your windows, curtains, covers, the air quality sensor KLA 300, etc.
|
||||
|
||||
Add the Velux Active gateway using HomeKit pairing (with the pairing code on the sticker at the bottom of the Velux Active gateway) and the devices connected to the gateway - including sensors - will be automatically discovered and added to Home Assistant.
|
||||
|
@ -105,7 +105,7 @@ The date February 24th, 2020 is a Monday but will be excluded because it was add
|
||||
binary_sensor:
|
||||
- platform: workday
|
||||
country: DE
|
||||
workdays: [mon, wed, fri]
|
||||
workdays: [mon, tue, wed, thu, fri]
|
||||
excludes: [sat, sun, holiday]
|
||||
add_holidays:
|
||||
- '2020-02-24'
|
||||
@ -114,7 +114,7 @@ binary_sensor:
|
||||
This example excludes Saturdays, Sundays and holidays. Two holidays are removed: November 26, 2020 and December 25, 2020.
|
||||
|
||||
```yaml
|
||||
# Example 2 configuration.yaml entry
|
||||
# Example 3 configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: workday
|
||||
country: US
|
||||
|
@ -12,7 +12,7 @@ The `wunderground` platform uses [Weather Underground](https://www.wunderground.
|
||||
|
||||
<div class='note warning'>
|
||||
|
||||
Obtain a WUnderground API key [here](https://www.wunderground.com/weather/api). They no longer offer free API keys, and all keys must be paid for. At this time existing free keys will continue to work, but will be disabled Dec 31, 2018, except you own a personal weather station and provide your data to WU (PWS Uploader). As of Sept 6, 2018 Weather Underground states they are declaring the End of Service for the Weather Underground API. They say they will develop new plans for non-commercial users. No timeline for this has been announced.
|
||||
Weather Underground API no longer offers API keys. The API is generally not available for use, except if you own a personal weather station and provide your data to WU (PWS Uploader).
|
||||
|
||||
Please consider this when using the following information.
|
||||
|
||||
|
@ -16,7 +16,7 @@ ha_config_flow: true
|
||||
|
||||
The Xbox integration allows you to control Xbox One (or newer) consoles from Home Assistant.
|
||||
|
||||
Home Assistant authenticates with Xbox Live through OAuth2 using the Home Assistant Cloud account linking service. Set up the integration through **Configuration -> Integrations -> Xbox**. Ensure you login using the Microsoft account that is linked to your Xbox consoles. Note that for the media player and remote entities to be added your Xbox will need to have remote features enabled via Settings-Remote Features (you may need to uprade your controller firmware).
|
||||
Home Assistant authenticates with Xbox Live through OAuth2 using the Home Assistant Cloud account linking service. Set up the integration through **Configuration -> Integrations -> Xbox**. Ensure you login using the Microsoft account that is linked to your Xbox consoles. Note that for the media player and remote entities to be added your Xbox will need to have remote features enabled via **Settings -> Devices & conections -> Remote Features** (you may need to uprade your controller firmware).
|
||||
|
||||
<div class='note'>
|
||||
|
||||
|
BIN
source/images/integrations/brother/brother-printer-webui.png
Normal file
BIN
source/images/integrations/brother/brother-printer-webui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
@ -118,8 +118,17 @@ allComponents.pop(); // remove placeholder element at the end
|
||||
|
||||
function init() {
|
||||
// do the lowerCase transformation once
|
||||
for (i = 0; i < (allComponents.length); i++) {
|
||||
allComponents[i].titleLC = allComponents[i].title.toLowerCase();
|
||||
for (i = 0; i < allComponents.length; i++) {
|
||||
title = allComponents[i].title.toLowerCase();
|
||||
domain = allComponents[i].domain;
|
||||
title_normalized = title
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "");
|
||||
title_dedashed = title.replace(/[-_]/g, " ");
|
||||
title_normalized_dedashed = title_normalized.replace(/[-_]/g, " ");
|
||||
|
||||
allComponents[i].titleLC = title;
|
||||
allComponents[i].search = `${title} ${title_normalized} ${title_dedashed} ${title_normalized_dedashed} ${domain}`;
|
||||
}
|
||||
|
||||
// sort the components alphabetically
|
||||
@ -175,8 +184,10 @@ allComponents.pop(); // remove placeholder element at the end
|
||||
// search through title and category
|
||||
search = decodeURIComponent(hash).substring(8).toLowerCase();
|
||||
filter = function (comp) {
|
||||
return (comp.titleLC.indexOf(search) !== -1) ||
|
||||
(comp.cat.find(c => c.includes("#")) != undefined);
|
||||
return (
|
||||
comp.search.indexOf(search) !== -1 ||
|
||||
comp.cat.find((c) => c.includes("#")) != undefined
|
||||
);
|
||||
};
|
||||
|
||||
} else if (hash === '#featured' || hash === '') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user